2022-06-16 17:23:12 +00:00
|
|
|
{lib, stdenv, fetchurl, gettext }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "checkinstall";
|
|
|
|
version = "1.6.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-05 21:33:18 +00:00
|
|
|
url = "https://www.asic-linux.com.mx/~izto/checkinstall/files/source/checkinstall-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "1x4kslyvfd6lm6zd1ylbq2pjxrafb77ydfjaqi16sa5qywn1jqfw";
|
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
# Implement the getxattr(), lgetxattr(), __open_2() and
|
|
|
|
# __open64_2() functions. Needed for doing builds on Ubuntu 8.10.
|
|
|
|
./missing-functions.patch
|
|
|
|
|
|
|
|
# Don't include directories in the Debian `conffiles' file.
|
|
|
|
./etc-dirs.patch
|
|
|
|
|
|
|
|
# Support Glibc >= 2.8.
|
|
|
|
./glibc-check.patch
|
|
|
|
|
|
|
|
# Fix a `conflicting types for 'scandir'' error on Glibc 2.11.
|
|
|
|
./scandir.patch
|
|
|
|
|
|
|
|
# Fix a `conflicting types for 'readlink'' error since Glibc 2.19
|
|
|
|
./readlink-types.patch
|
|
|
|
|
|
|
|
# Fix BuildRoot handling in RPM builds.
|
|
|
|
./set-buildroot.patch
|
2022-10-21 18:38:19 +00:00
|
|
|
|
|
|
|
(fetchurl {
|
|
|
|
url = "https://salsa.debian.org/debian/checkinstall/-/raw/7175ae9de0e45f42fdd7f185ab9a12043d5efeeb/debian/patches/0016-Define-_STAT_VER-_MKNOD_VER-locally-dropped-in-glibc.patch";
|
|
|
|
hash = "sha256-InodEfvVMuN708yjXPrVXb+q8aUcyFhCLx35PHls0Eo=";
|
|
|
|
})
|
2020-04-24 23:36:52 +00:00
|
|
|
]
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optional (stdenv.hostPlatform.system == "x86_64-linux")
|
2020-04-24 23:36:52 +00:00
|
|
|
# Force use of old memcpy so that installwatch works on Glibc <
|
|
|
|
# 2.14.
|
|
|
|
./use-old-memcpy.patch;
|
|
|
|
|
|
|
|
buildInputs = [gettext];
|
|
|
|
|
|
|
|
hardeningDisable = [ "fortify" ];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=(PREFIX=$out)
|
|
|
|
|
|
|
|
substituteInPlace checkinstall --replace /usr/local/lib/checkinstall $out/lib/checkinstall
|
|
|
|
substituteInPlace checkinstallrc-dist --replace /usr/local $out
|
|
|
|
|
|
|
|
substituteInPlace installwatch/create-localdecls \
|
2022-06-16 17:23:12 +00:00
|
|
|
--replace /usr/include/unistd.h ${stdenv.cc.libc.dev}/include/unistd.h
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall =
|
|
|
|
# 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
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://checkinstall.izto.org/";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Tool for automatically generating Slackware, RPM or Debian packages when doing `make install'";
|
2024-09-19 14:19:46 +00:00
|
|
|
maintainers = [ ];
|
2021-01-15 22:18:51 +00:00
|
|
|
platforms = lib.platforms.linux;
|
2024-05-15 15:35:15 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2021-02-05 17:12:51 +00:00
|
|
|
knownVulnerabilities = [
|
|
|
|
"CVE-2020-25031"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|