2015-01-06 05:15:44 +08:00
|
|
|
pkgname=(postfix postfix-tools)
|
|
|
|
pkgbase=postfix
|
2015-12-04 02:08:11 +08:00
|
|
|
pkgver=3.0.3
|
2010-10-09 09:35:53 +08:00
|
|
|
pkgrel=1
|
2011-09-14 00:24:27 +08:00
|
|
|
pkgdesc='Secure, fast, easy to administer alternative to Sendmail'
|
|
|
|
url='http://www.postfix.org/'
|
2013-02-18 01:49:29 +08:00
|
|
|
arch=('x86_64')
|
2010-05-18 22:39:29 +08:00
|
|
|
license=('custom')
|
2015-01-06 05:15:44 +08:00
|
|
|
makedepends=('pcre' 'libsasl' 'libldap' 'db'
|
|
|
|
'libmariadbclient' 'postgresql-libs' 'sqlite3' 'openssl')
|
2012-10-22 00:44:36 +08:00
|
|
|
source=("ftp://ftp.porcupine.org/mirrors/postfix-release/official/${pkgname}-${pkgver}.tar.gz"
|
|
|
|
'aliases.patch'
|
|
|
|
'postfix.service')
|
2015-12-04 02:08:11 +08:00
|
|
|
md5sums=('61caffae689c11d09b4c972a394ae3b1'
|
|
|
|
'd37bc46fe542e1805d8546573b781bb6'
|
|
|
|
'f4d2c2019f8bc70619fef2a62732cbeb')
|
|
|
|
|
2010-05-18 22:39:29 +08:00
|
|
|
build() {
|
2015-01-06 05:15:44 +08:00
|
|
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
2011-09-14 00:24:27 +08:00
|
|
|
|
2015-01-06 05:15:44 +08:00
|
|
|
make makefiles DEBUG='' 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_SAMPLE_DIR=\"/etc/postfix/sample\" \
|
|
|
|
-DDEF_MANPAGE_DIR=\"/usr/share/man\" \
|
|
|
|
' AUXLIBS=' \
|
|
|
|
-lsasl2 \
|
|
|
|
-lldap -llber \
|
|
|
|
-lssl -lcrypto \
|
|
|
|
-lmysqlclient -lz -lm \
|
|
|
|
-lpq \
|
|
|
|
-lsqlite3 -lpthread \
|
|
|
|
' OPT="${CFLAGS} ${LDFLAGS}"
|
2011-09-14 00:24:27 +08:00
|
|
|
|
2015-01-06 05:15:44 +08:00
|
|
|
make
|
2011-09-14 00:24:27 +08:00
|
|
|
}
|
|
|
|
|
2015-01-06 05:15:44 +08:00
|
|
|
package_postfix() {
|
|
|
|
pkgdesc='Fast, easy to administer, secure mail server'
|
|
|
|
depends=('pcre' 'libsasl' 'libldap' 'db'
|
|
|
|
'libmariadbclient' 'postgresql-libs' 'sqlite3')
|
|
|
|
backup=('etc/postfix/'{access,aliases,canonical,generic,header_checks,main.cf,master.cf,relocated,transport,virtual})
|
|
|
|
provides=('smtp-server' 'smtp-forwarder')
|
|
|
|
replaces=('postfix-mysql' 'postfix-pgsql')
|
|
|
|
conflicts=('postfix-mysql' 'postfix-pgsql' 'smtp-server' 'smtp-forwarder')
|
|
|
|
install=$pkgname.install
|
|
|
|
cd "${srcdir}/postfix-${pkgver}"
|
2010-05-18 22:39:29 +08:00
|
|
|
|
2015-01-06 05:15:44 +08:00
|
|
|
sh postfix-install -non-interactive install_root="${pkgdir}"
|
2010-05-18 22:39:29 +08:00
|
|
|
|
2015-01-06 05:15:44 +08:00
|
|
|
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
|
|
|
install -Dm644 ../postfix.service "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
|
2010-05-18 22:39:29 +08:00
|
|
|
|
2015-01-06 05:15:44 +08:00
|
|
|
cd "${pkgdir}"
|
|
|
|
patch -p0 -i "${srcdir}"/aliases.patch
|
2015-12-04 02:08:11 +08:00
|
|
|
sed 's/^\(\$manpage[^:]*\):/\1.gz:/' -i "etc/postfix/postfix-files"
|
2015-01-06 05:15:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
package_postfix-tools() {
|
|
|
|
pkgdesc='SMTP/QMQP tools from the postfix distribution'
|
|
|
|
depends=('openssl')
|
|
|
|
cd "${srcdir}/postfix-${pkgver}"
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
2010-05-18 22:39:29 +08:00
|
|
|
}
|