2022-10-13 09:08:36 +00:00
|
|
|
{ lib, stdenv, fetchurl, m4, fixDarwinDylibNames }:
|
2010-02-09 10:32:55 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "libmilter";
|
2023-01-02 22:09:42 +00:00
|
|
|
version = "8.17.1";
|
2016-10-21 00:04:38 +00:00
|
|
|
|
2010-02-09 10:32:55 +00:00
|
|
|
src = fetchurl {
|
2016-10-21 00:04:38 +00:00
|
|
|
url = "ftp://ftp.sendmail.org/pub/sendmail/sendmail.${version}.tar.gz";
|
2023-01-02 22:09:42 +00:00
|
|
|
sha256 = "sha256-BLx2tsiG5tERvn/Y2qMrjOABKKKItrUuBnvCnzhUpuY=";
|
2010-02-09 10:32:55 +00:00
|
|
|
};
|
|
|
|
|
2016-10-21 00:04:38 +00:00
|
|
|
buildPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/lib
|
2010-02-09 10:32:55 +00:00
|
|
|
cd libmilter
|
|
|
|
cat > a.m4 <<EOF
|
2018-12-11 23:05:32 +00:00
|
|
|
define(\`confCC', \`$CC')
|
|
|
|
define(\`confAR', \`$AR')
|
2010-02-09 10:32:55 +00:00
|
|
|
define(\`confEBINDIR', \`$out/libexec')
|
|
|
|
define(\`confINCLUDEDIR', \`$out/include')
|
|
|
|
define(\`confLIBDIR', \`$out/lib')
|
|
|
|
define(\`confMANROOT', \`$out/man/cat')
|
|
|
|
define(\`confMANROOTMAN', \`$out/man/man')
|
|
|
|
define(\`confMBINDIR', \`$out/sbin')
|
|
|
|
define(\`confSBINDIR', \`$out/sbin')
|
|
|
|
define(\`confSHAREDLIBDIR', \`$out/lib')
|
|
|
|
define(\`confUBINDIR', \`$out/bin')
|
|
|
|
define(\`confINCGRP', \`root')
|
|
|
|
define(\`confLIBGRP', \`root')
|
2015-01-19 09:44:28 +00:00
|
|
|
APPENDDEF(\`confENVDEF', \`-DNETINET6')
|
2010-02-09 10:32:55 +00:00
|
|
|
EOF
|
2020-05-18 15:37:16 +00:00
|
|
|
export MILTER_SOVER=1
|
2010-02-09 10:32:55 +00:00
|
|
|
sh Build -f ./a.m4
|
|
|
|
'';
|
|
|
|
|
2023-01-02 22:09:42 +00:00
|
|
|
patches = [ ./install.patch ./sharedlib.patch ./darwin.patch ];
|
2016-08-02 16:06:29 +00:00
|
|
|
|
2022-10-13 09:08:36 +00:00
|
|
|
nativeBuildInputs = [ m4 ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
|
|
|
|
|
|
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
|
|
|
fixDarwinDylibNames $out/lib/libmilter.dylib.1
|
|
|
|
'';
|
2016-10-21 00:04:38 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2016-10-21 00:04:38 +00:00
|
|
|
description = "Sendmail Milter mail filtering API library";
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ fpletz ];
|
2018-10-18 19:00:17 +00:00
|
|
|
license = licenses.sendmail;
|
2016-08-02 16:06:29 +00:00
|
|
|
};
|
2010-02-09 10:32:55 +00:00
|
|
|
}
|