From 70035096a596bbfba7e10b81cf2aaa28c21760df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sat, 5 Nov 2011 18:50:43 +0000 Subject: [PATCH] Updating our super-old postfix. 2.8.6 builds. I don't know if it serves well. svn path=/nixpkgs/trunk/; revision=30244 --- pkgs/servers/mail/postfix/db-linux3.patch | 39 +++++++++++++++++++++++ pkgs/servers/mail/postfix/default.nix | 14 ++++---- 2 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 pkgs/servers/mail/postfix/db-linux3.patch diff --git a/pkgs/servers/mail/postfix/db-linux3.patch b/pkgs/servers/mail/postfix/db-linux3.patch new file mode 100644 index 000000000000..c9dd4646798a --- /dev/null +++ b/pkgs/servers/mail/postfix/db-linux3.patch @@ -0,0 +1,39 @@ +diff --git a/makedefs b/makedefs +index b8b98c8..94443c0 100644 +--- a/makedefs ++++ b/makedefs +@@ -341,20 +341,20 @@ EOF + esac + ;; + Linux.3*) SYSTYPE=LINUX3 +- if [ -f /usr/include/db.h ] +- then +- : we are all set +- elif [ -f /usr/include/db/db.h ] +- then +- CCARGS="$CCARGS -I/usr/include/db" +- else +- # On a properly installed system, Postfix builds +- # by including and by linking with -ldb +- echo "No include file found." 1>&2 +- echo "Install the appropriate db*-devel package first." 1>&2 +- echo "See the RELEASE_NOTES file for more information." 1>&2 +- exit 1 +- fi ++ #if [ -f /usr/include/db.h ] ++ #then ++ #: we are all set ++ #elif [ -f /usr/include/db/db.h ] ++ #then ++ #CCARGS="$CCARGS -I/usr/include/db" ++ #else ++ ## On a properly installed system, Postfix builds ++ ## by including and by linking with -ldb ++ #echo "No include file found." 1>&2 ++ #echo "Install the appropriate db*-devel package first." 1>&2 ++ #echo "See the RELEASE_NOTES file for more information." 1>&2 ++ #exit 1 ++ #fi + SYSLIBS="-ldb" + for name in nsl resolv + do diff --git a/pkgs/servers/mail/postfix/default.nix b/pkgs/servers/mail/postfix/default.nix index acd3342775f0..85dd89f72d74 100644 --- a/pkgs/servers/mail/postfix/default.nix +++ b/pkgs/servers/mail/postfix/default.nix @@ -1,15 +1,15 @@ { stdenv, fetchurl, db4, glibc, openssl, cyrus_sasl -, coreutils, findutils, gnused, gnugrep +, coreutils, findutils, gnused, gnugrep, bison, perl }: assert stdenv.isLinux; stdenv.mkDerivation { - name = "postfix-2.2.11"; + name = "postfix-2.8.6"; src = fetchurl { - url = ftp://ftp.cs.uu.nl/mirror/postfix/postfix-release/official/postfix-2.2.11.tar.gz; - sha256 = "04hxpyd3h1f48fnppjwqqxbil13bcwidzpfkra2pgm7h42d9blq7"; + url = ftp://ftp.cs.uu.nl/mirror/postfix/postfix-release/official/postfix-2.8.6.tar.gz; + sha256 = "1rfsfhna5hy5lc6hkg1zc2862pdc5c1y9z6aiy8rinlmzrfplhlb"; }; installTargets = ["non-interactive-package"]; @@ -43,12 +43,12 @@ stdenv.mkDerivation { export sample_directory=$out/share/postfix/doc/samples export readme_directory=$out/share/postfix/doc - make makefiles CCARGS='-DUSE_TLS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -DHAS_DB -I${cyrus_sasl}/include/sasl' AUXLIBS='-lssl -lcrypto -lsasl2 -ldb' + make makefiles CCARGS='-DUSE_TLS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I${cyrus_sasl}/include/sasl' AUXLIBS='-lssl -lcrypto -lsasl2 -ldb -lnsl' ''; - buildInputs = [db4 openssl cyrus_sasl]; + buildInputs = [db4 openssl cyrus_sasl bison perl]; - patches = [./postfix-2.2.9-db.patch ./postfix-2.2.9-lib.patch]; + patches = [ ./postfix-2.2.9-db.patch ./postfix-2.2.9-lib.patch ./db-linux3.patch ]; inherit glibc; }