2008-11-25 03:20:41 +01:00
|
|
|
{stdenv, fetchurl, gettext}:
|
|
|
|
|
2009-04-23 01:08:25 +02:00
|
|
|
assert stdenv.isLinux && stdenv ? glibc;
|
2009-03-27 15:25:00 +01:00
|
|
|
|
2008-11-25 03:20:41 +01:00
|
|
|
stdenv.mkDerivation {
|
2010-02-08 16:39:51 +01:00
|
|
|
name = "checkinstall-1.6.2";
|
2008-11-25 03:20:41 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2010-02-08 16:39:51 +01:00
|
|
|
url = http://www.asic-linux.com.mx/~izto/checkinstall/files/source/checkinstall-1.6.2.tar.gz;
|
|
|
|
sha256 = "1x4kslyvfd6lm6zd1ylbq2pjxrafb77ydfjaqi16sa5qywn1jqfw";
|
2008-11-25 03:20:41 +01:00
|
|
|
};
|
|
|
|
|
2009-03-27 15:13:23 +01: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 18:49:19 +01:00
|
|
|
|
2009-03-27 22:49:46 +01: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 16:57:31 +02:00
|
|
|
|
|
|
|
# Don't include directories in the Debian `conffiles' file.
|
|
|
|
./etc-dirs.patch
|
2009-09-18 17:02:19 +02:00
|
|
|
|
|
|
|
# Support Glibc >= 2.8.
|
|
|
|
./glibc-check.patch
|
2010-02-08 16:39:51 +01:00
|
|
|
|
|
|
|
# Fix a `conflicting types for 'scandir'' error on Glibc 2.11.
|
|
|
|
./scandir.patch
|
2009-03-27 15:13:23 +01:00
|
|
|
];
|
|
|
|
|
2008-11-25 03:20:41 +01: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 13:13:11 +01:00
|
|
|
|
|
|
|
substituteInPlace installwatch/create-localdecls \
|
|
|
|
--replace /usr/include/unistd.h ${stdenv.glibc}/include/unistd.h
|
2008-11-25 03:20:41 +01:00
|
|
|
'';
|
|
|
|
|
2008-12-10 18:12:19 +01:00
|
|
|
postInstall =
|
2009-03-27 15:25:00 +01: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 18:12:19 +01:00
|
|
|
|
2008-11-25 03:20:41 +01:00
|
|
|
meta = {
|
|
|
|
homepage = http://checkinstall.izto.org/;
|
|
|
|
description = "A tool for automatically generating Slackware, RPM or Debian packages when doing `make install'";
|
2010-03-02 17:33:17 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.eelco ];
|
2010-03-02 17:33:35 +01:00
|
|
|
platform = stdenv.lib.platforms.linux;
|
2008-11-25 03:20:41 +01:00
|
|
|
};
|
|
|
|
}
|