Re: Dealing with hardcoded paths
On Wed, Dec 01, 1999 at 04:46:47PM +0100, Lars Steinke wrote:
> Hi dear fellow developers,
> surely some of you had to deal with source packages producing binaries which
> contain hardcoded paths defined in the Makefile.
> If I set up the Makefile to install into $DESTDIR as ususal, i.e.
> debian/tmp/usr I end up with wrong locations in binaries which call other
> parts of the package e.g. in $HOME/debian/tmp/usr/lib/rt instead of
1. This is a question for -mentors, not really -devel.
2. Is the Makefile created by autoconf? What you can often do is to
run the "configure" and "make all" parts of the package build with
the correct /usr destination. Then during the "make install" part
of the program, you can do something like
make install prefix=`pwd`/debian/tmp/usr
or suchlike. You'll have to experiment to find the correct
3. If the package doesn't do as described in 2, you'll probably have
to hack the Makefile(s) manually. But the easiest thing to do is
to copy the idea in 2: to compile with the correct installation
path, but to install with a different path.
> Now, I can´t really let the package roll itself out under /usr lest I
> risk overwriting something, so am I to patch the binaries which are created
> or what ?
Of course you can't; the package build is not allowed to do something
like that: how would it work if fakeroot were being used? Package
builds have to install into a temporary directory.
Julian Gilbey, Dept of Maths, QMW, Univ. of London. J.D.Gilbey@qmw.ac.uk
Debian GNU/Linux Developer, see http://www.debian.org/~jdg
Donate free food to the world's hungry: see http://www.thehungersite.com/