-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Description
DESTDIR is used by some package managers as a poor man’s sandbox, transparent to the package. Setting DESTDIR=$(out) PREFIX= in makeFlags
will place the files in the correct directory but the program itself will not be aware of the files’ location. For example, if the source code is hardcoding PREFIX "foo", it will try to open foo instead of $out/foo.
This is usually done when make install tries to create a $(DESTDIR)/var directory but as described above, it can have a negative side effect.
With autotools you can set installFlags = [ "localstatedir=${placeholder "out"}/var" ]; or installFlags = [ "sysconfdir=${placeholder "out"}/etc" ]; that should fix most instances of the issue. When the project using hand-written Makefiles, you need to check the files to see how to replace them. In the worst case, especially when the paths are hard-coded in the build files, you will need to patch the build files.