pkgname=postfix pkgver=3.1.0 pkgrel=3 pkgdesc='Fast, easy to administer, secure mail server' url='http://www.postfix.org/' arch=('x86_64') license=('custom') depends=('openssl' 'pcre' 'icu' 'libsasl' 'libldap' 'db' 'libmariadbclient' 'postgresql-libs' 'sqlite3' 'tinycdb') source=("ftp://ftp.porcupine.org/mirrors/postfix-release/official/${pkgname}-${pkgver}.tar.gz"{,.gpg2} 'aliases.patch' 'postfix.service') sha1sums=('a79409958c0327dc605473d2522483219464cbd2' 'SKIP' '5fc3de6c7df1e5851a0a379e825148868808318b' 'dd12885d367bebaf0fc9d2e9823a7f82086b6ee9') backup=('etc/postfix/'{access,aliases,canonical,generic,header_checks,main.cf,master.cf,relocated,transport,virtual}) validpgpkeys=('622C7C012254C186677469C50C0B590E80CA15A7') # Wietse Venema conflicts=('smtp-server' 'smtp-forwarder' 'postfix-tools') provides=('smtp-server' 'smtp-forwarder' 'postfix-tools') replaces=('postfix-tools') install=postfix.install build() { cd $pkgname-$pkgver CCARGS=' -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl -DHAS_LDAP -DUSE_TLS -DHAS_MYSQL -I/usr/include/mysql -DHAS_PGSQL -I/usr/include/postgresql -DHAS_SQLITE -DDEF_COMMAND_DIR=\"/usr/bin\" -DDEF_DAEMON_DIR=\"/usr/lib/postfix\" -DDEF_SENDMAIL_PATH=\"/usr/bin/sendmail\" -DDEF_README_DIR=\"/usr/share/doc/postfix\" -DDEF_MANPAGE_DIR=\"/usr/share/man\" ' AUXLIBS=' -lsasl2 -lldap -llber -lssl -lcrypto -lmysqlclient -lz -lm -lpq -lsqlite3 -lpthread -lcdb ' make makefiles \ DEBUG='' \ pie=yes \ shared=yes \ CCARGS="${CCARGS//$'\n'/}" \ AUXLIBS="${AUXLIBS//$'\n'/}" \ OPT="${CFLAGS} ${LDFLAGS}" make } package() { cd $pkgname-$pkgver sed 's:bin/postconf -dhx:bin/postconf -c conf -dhx:g' -i postfix-install LD_LIBRARY_PATH=lib:$LD_LIBRARY_PATH \ sh postfix-install -non-interactive install_root="$pkgdir" install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" install -Dm644 $srcdir/postfix.service "$pkgdir/usr/lib/systemd/system/$pkgname.service" for name in posttls-finger {smtp,qmqp}-{sink,source}; do install -Dm644 "man/man1/${name}.1" "$pkgdir/usr/share/man/man1/${name}.1" install -Dm755 "bin/${name}" "$pkgdir/usr/bin/${name}" done cd "$pkgdir" patch -p0 -i "$srcdir"/aliases.patch sed 's/^\(\$manpage[^:]*\):/\1.gz:/' -i "etc/postfix/postfix-files" }