2021-01-15 09:19:50 +00:00
|
|
|
{lib, stdenv, fetchurl, gettext}:
|
2008-11-25 02:20:41 +00:00
|
|
|
|
2009-04-22 23:08:25 +00:00
|
|
|
assert stdenv.isLinux && stdenv ? glibc;
|
2009-03-27 14:25:00 +00:00
|
|
|
|
2008-11-25 02:20:41 +00:00
|
|
|
stdenv.mkDerivation {
|
2010-02-08 15:39:51 +00:00
|
|
|
name = "checkinstall-1.6.2";
|
2008-11-25 02:20:41 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2020-04-01 01:11:51 +00:00
|
|
|
url = "http://www.asic-linux.com.mx/~izto/checkinstall/files/source/checkinstall-1.6.2.tar.gz";
|
2010-02-08 15:39:51 +00:00
|
|
|
sha256 = "1x4kslyvfd6lm6zd1ylbq2pjxrafb77ydfjaqi16sa5qywn1jqfw";
|
2008-11-25 02:20:41 +00:00
|
|
|
};
|
|
|
|
|
2009-03-27 14:13:23 +00: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 17:49:19 +00:00
|
|
|
|
2009-03-27 21:49:46 +00: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 14:57:31 +00:00
|
|
|
|
|
|
|
# Don't include directories in the Debian `conffiles' file.
|
|
|
|
./etc-dirs.patch
|
2009-09-18 15:02:19 +00:00
|
|
|
|
|
|
|
# Support Glibc >= 2.8.
|
|
|
|
./glibc-check.patch
|
2010-02-08 15:39:51 +00:00
|
|
|
|
|
|
|
# Fix a `conflicting types for 'scandir'' error on Glibc 2.11.
|
|
|
|
./scandir.patch
|
2014-02-26 14:56:06 +00:00
|
|
|
|
|
|
|
# Fix a `conflicting types for 'readlink'' error since Glibc 2.19
|
|
|
|
./readlink-types.patch
|
2014-11-13 12:57:33 +00:00
|
|
|
|
|
|
|
# Fix BuildRoot handling in RPM builds.
|
|
|
|
./set-buildroot.patch
|
2013-05-03 11:43:47 +00:00
|
|
|
]
|
2013-03-15 13:01:11 +00:00
|
|
|
|
2021-01-15 09:19:50 +00:00
|
|
|
++ lib.optional (stdenv.hostPlatform.system == "x86_64-linux")
|
2013-03-15 13:01:11 +00:00
|
|
|
# Force use of old memcpy so that installwatch works on Glibc <
|
|
|
|
# 2.14.
|
2013-05-03 11:43:47 +00:00
|
|
|
./use-old-memcpy.patch;
|
2009-03-27 14:13:23 +00:00
|
|
|
|
2008-11-25 02:20:41 +00:00
|
|
|
buildInputs = [gettext];
|
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "fortify" ];
|
2016-02-09 01:03:24 +00:00
|
|
|
|
2008-11-25 02:20:41 +00:00
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(PREFIX=$out)
|
|
|
|
|
|
|
|
substituteInPlace checkinstall --replace /usr/local/lib/checkinstall $out/lib/checkinstall
|
|
|
|
substituteInPlace checkinstallrc-dist --replace /usr/local $out
|
2009-03-27 12:13:11 +00:00
|
|
|
|
|
|
|
substituteInPlace installwatch/create-localdecls \
|
2015-04-26 17:54:51 +00:00
|
|
|
--replace /usr/include/unistd.h ${stdenv.glibc.dev}/include/unistd.h
|
2008-11-25 02:20:41 +00:00
|
|
|
'';
|
|
|
|
|
2008-12-10 17:12:19 +00:00
|
|
|
postInstall =
|
2009-03-27 14:25:00 +00: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 17:12:19 +00:00
|
|
|
|
2008-11-25 02:20:41 +00:00
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://checkinstall.izto.org/";
|
2008-11-25 02:20:41 +00:00
|
|
|
description = "A tool for automatically generating Slackware, RPM or Debian packages when doing `make install'";
|
2021-01-15 09:19:50 +00:00
|
|
|
maintainers = [ lib.maintainers.eelco ];
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
license = lib.licenses.gpl2;
|
2008-11-25 02:20:41 +00:00
|
|
|
};
|
|
|
|
}
|