Is it possible if I want to install in /usr/local

Asked by slightech-qa on 2018-08-08

I’m new to launchpad. I have a PPA and it will install all things into default folder ‘/build' . I know I don't have root permisson when build PPA on launchpad, but I see some other PPAs can install in /usr/lib , so how can do this?

Question information

English Edit question
Launchpad itself Edit question
No assignee Edit question
Last query:
Last reply:
Launchpad Janitor (janitor) said : #1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Colin Watson (cjwatson) said : #2

Sorry for the late reply.

Theory first: it's true that you don't have root access and thus can't write to the build's /usr, but that's not how building a package works anyway. The way it works is that you install files to a staging area under your package's build directory and then pack them up into a .deb. debhelper normally takes care of most of the details of this.

Looking at, the problems come from the Makefile of the project you're trying to package, which has lots of very wrong hardcoded behaviour. For instance, it installs files to $(DESTDIR)/build/samples/ and $(DESTDIR)/build/tools/, which means that they end up in /build/samples/ and /build/tools/ in the resulting .deb. And there's something else that I can't quite track down that's effectively installing files to $(DESTDIR) plus the current working directory plus _install, which isn't going to help anyone. I haven't quite worked out how all of this overlaps with cmake.

How you should fix this depends on how well you know the upstream build system, because it really needs to be rewritten to have more standard installation behaviour on Unix systems. Failing that, though, you can deal with this in debian/rules. Add an override_dh_auto_install target (see and make it do nothing; then add (for example) a debian/mynteye2-demo.install file (see for the syntax) that manually lists all the files you want to install in the package and where they should go in the .deb. You'll need to experiment a bit, but something along those lines should let you work around the inadequacies of the upstream build system.

None of this is specific to Launchpad. You can reproduce the exact same problems by building locally: for example, I recommend getting a local build environment up and running so that you can do your own test builds.

Can you help with this problem?

Provide an answer of your own, or ask slightech-qa for more information if necessary.

To post a message you must log in.