3
0
Fork 0
forked from mirrors/nixpkgs

* Some disgusting DESTDIR hacking to make sure that state ends up

under /var instead of $out/var.

svn path=/nixpkgs/trunk/; revision=8533
This commit is contained in:
Eelco Dolstra 2007-04-02 17:30:11 +00:00
parent f5daf2b700
commit 5298c1f4c2

View file

@ -10,7 +10,22 @@ stdenv.mkDerivation {
buildInputs = [zlib libjpeg libpng libtiff pam];
preConfigure = "
configureFlags=\"--localstatedir=/var\"
";
preBuild = "
makeFlagsArray=(INITDIR=$out/etc/rc.d)
";
# Awful hack: CUPS' `make install' wants to write in /var, but it
# can't. So redirect it with a BUILDROOT (=DESTDIR).
preInstall = "
installFlagsArray=(BUILDROOT=$out/destdir)
";
postInstall = "
mv $out/destdir/$out/* $out
rm -rf $out/destdir
";
}