2008-11-25 05:20:41 +03:00
|
|
|
{stdenv, fetchurl, gettext}:
|
|
|
|
|
2009-04-23 03:08:25 +04:00
|
|
|
assert stdenv.isLinux && stdenv ? glibc;
|
2009-03-27 17:25:00 +03:00
|
|
|
|
2008-11-25 05:20:41 +03:00
|
|
|
stdenv.mkDerivation {
|
2009-03-27 15:13:11 +03:00
|
|
|
name = "checkinstall-1.6.2pre20081116";
|
2008-11-25 05:20:41 +03:00
|
|
|
|
|
|
|
src = fetchurl {
|
2009-03-27 15:13:11 +03:00
|
|
|
url = http://nixos.org/tarballs/checkinstall-1.6.2pre20081116.tar.bz2;
|
|
|
|
sha256 = "0k8i551rcn2g0jxskq2sgy4m85irdf5zsl2q4w9b7npgnybkzsmb";
|
2008-11-25 05:20:41 +03:00
|
|
|
};
|
|
|
|
|
2009-03-27 17:13:23 +03:00
|
|
|
patches = [
|
|
|
|
# Include empty directories created by the installation script in
|
|
|
|
# generated packages. (E.g., if a `make install' does `mkdir
|
|
|
|
# /var/lib/mystuff', then /var/lib/mystuff should be included in
|
|
|
|
# the package.)
|
|
|
|
./empty-dirs.patch
|
2009-03-27 20:49:19 +03:00
|
|
|
|
2009-03-28 00:49:46 +03:00
|
|
|
# Implement the getxattr(), lgetxattr(), __open_2() and
|
|
|
|
# __open64_2() functions. Needed for doing builds on Ubuntu 8.10.
|
|
|
|
./missing-functions.patch
|
2009-04-14 18:57:31 +04:00
|
|
|
|
|
|
|
# Don't include directories in the Debian `conffiles' file.
|
|
|
|
./etc-dirs.patch
|
2009-03-27 17:13:23 +03:00
|
|
|
];
|
|
|
|
|
2008-11-25 05:20:41 +03:00
|
|
|
buildInputs = [gettext];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(PREFIX=$out)
|
|
|
|
|
|
|
|
substituteInPlace checkinstall --replace /usr/local/lib/checkinstall $out/lib/checkinstall
|
|
|
|
substituteInPlace checkinstallrc-dist --replace /usr/local $out
|
2009-03-27 15:13:11 +03:00
|
|
|
|
|
|
|
substituteInPlace installwatch/create-localdecls \
|
|
|
|
--replace /usr/include/unistd.h ${stdenv.glibc}/include/unistd.h
|
2008-11-25 05:20:41 +03:00
|
|
|
'';
|
|
|
|
|
2008-12-10 20:12:19 +03:00
|
|
|
postInstall =
|
2009-03-27 17:25:00 +03:00
|
|
|
# Clear the RPATH, otherwise installwatch.so won't work properly
|
|
|
|
# as an LD_PRELOADed library on applications that load against a
|
|
|
|
# different Glibc.
|
|
|
|
''
|
|
|
|
patchelf --set-rpath "" $out/lib/installwatch.so
|
|
|
|
'';
|
2008-12-10 20:12:19 +03:00
|
|
|
|
2008-11-25 05:20:41 +03:00
|
|
|
meta = {
|
|
|
|
homepage = http://checkinstall.izto.org/;
|
|
|
|
description = "A tool for automatically generating Slackware, RPM or Debian packages when doing `make install'";
|
|
|
|
};
|
|
|
|
}
|