# Maintainer: Natanael Copa pkgname=postfix pkgver=2.5.6 pkgrel=1 pkgdesc="Secure and fast drop-in replacement for Sendmail (MTA)" url="http://www.postfix.org/" license="IPL-1" depends="db pcre openssl" makedepends="db-dev pcre-dev openssl-dev" install=postfix.install subpackages="$pkgname-doc" source="ftp://ftp.porcupine.org/mirrors/$pkgname-release/official/$pkgname-$pkgver.tar.gz $pkgname.initd $install " build () { cd "$srcdir/$pkgname-$pkgver" sed -i -e "s|#define HAS_NIS|//#define HAS_NIS|g" \ -e "/^#define ALIAS_DB_MAP/s|:/etc/aliases|:/etc/postfix/aliases|" \ src/util/sys_defs.h || return 1 sed -i -e "s:/usr/local/:/usr/:g" conf/master.cf || return 1 make DEBUG="" \ OPT="$CFLAGS" \ CCARGS="-DHAS_PCRE -DUSE_TLS -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\"dovecot\\\"" \ AUXLIBS="$LDFLAGS -lpcre -lcrypt -lpthread -lssl -lcrypto" \ makefiles || return 1 make OPT="$CFLAGS" || return 1 sh postfix-install \ -non-interactive \ install_root="$pkgdir" \ config_directory=/usr/share/doc/$pkgname/defaults \ readme_directory=/usr/share/doc/$pkgname/readme \ manpage_directory=/usr/share/man \ || return 1 for i in postdrop postqueue; do chgrp postdrop "$pkgdir"/usr/sbin/$i chmod g+s "$pkgdir"/usr/sbin/$i done mkdir -p "$pkgdir"/etc/postfix mv "$pkgdir"/usr/share/doc/$pkgname/defaults/*.cf \ "$pkgdir"/usr/share/doc/$pkgname/defaults/post*-* \ "$pkgdir"/usr/share/doc/$pkgname/defaults/aliases \ "$pkgdir"/etc/postfix/ || return 1 install -d -o postfix -g postfix "$pkgdir"/var/spool/postfix install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/${pkgname}/LICENSE } md5sums="ec2cb63b53f5f36c3ca91da8f3bc9407 postfix-2.5.6.tar.gz 8416354d402f3be288fa98b60af86240 postfix.initd a62143036f227a7e781b57a97457d180 postfix.install"