2012-01-31 15:45:13 +00:00
|
|
|
# Template file for 'postfix'
|
|
|
|
pkgname=postfix
|
2014-05-08 15:56:52 +00:00
|
|
|
version=2.11.1
|
2014-08-03 15:25:59 +00:00
|
|
|
revision=4
|
2012-01-31 15:45:13 +00:00
|
|
|
short_desc="High-performance mail transport agent"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
|
|
license="IBM Public License 1.0, BSD-alike"
|
2012-07-07 11:39:46 +00:00
|
|
|
homepage="http://www.postfix.org/"
|
|
|
|
distfiles="ftp://ftp.porcupine.org/mirrors/postfix-release/official/$pkgname-$version.tar.gz"
|
2014-05-08 15:56:52 +00:00
|
|
|
checksum=487f98a73b95a5799409caf21ec065efea91c1dcdfb84c038a0e3a265d6489e2
|
2012-01-31 15:45:13 +00:00
|
|
|
|
2013-04-14 09:13:30 +00:00
|
|
|
hostmakedepends="perl"
|
2014-07-18 13:01:53 +00:00
|
|
|
makedepends="libressl-devel db-devel>=5.3 pcre-devel>=8.30 libsasl-devel
|
2014-03-17 11:32:37 +00:00
|
|
|
libldap-devel libmysqlclient-devel>=5.5.27 postgresql-libs-devel sqlite-devel"
|
2012-01-31 15:45:13 +00:00
|
|
|
|
2013-12-12 21:38:56 +00:00
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
# XXX postfix-install needs native binaries.
|
2014-07-25 14:43:01 +00:00
|
|
|
hostmakedepends+=" ${pkgname}>=${version}_${revision}"
|
2013-12-12 21:38:56 +00:00
|
|
|
fi
|
|
|
|
|
2014-01-01 15:10:11 +00:00
|
|
|
conf_files="
|
|
|
|
/etc/postfix/access
|
|
|
|
/etc/postfix/aliases
|
|
|
|
/etc/postfix/canonical
|
|
|
|
/etc/postfix/generic
|
|
|
|
/etc/postfix/header_checks
|
|
|
|
/etc/postfix/main.cf
|
|
|
|
/etc/postfix/master.cf
|
|
|
|
/etc/postfix/relocated
|
|
|
|
/etc/postfix/transport
|
|
|
|
/etc/postfix/virtual"
|
|
|
|
systemd_services="postfix.service true"
|
|
|
|
system_accounts="postfix"
|
|
|
|
postfix_homedir="/var/spool/postfix"
|
|
|
|
system_groups="postdrop"
|
|
|
|
provides="smtp-server-0_1"
|
|
|
|
replaces="smtp-server>=0"
|
|
|
|
make_dirs="
|
2014-08-03 15:25:59 +00:00
|
|
|
/var/lib/postfix 0700 postfix root
|
|
|
|
/var/spool/postfix/active 0700 postfix root
|
|
|
|
/var/spool/postfix/bounce 0700 postfix root
|
|
|
|
/var/spool/postfix/corrupt 0700 postfix root
|
|
|
|
/var/spool/postfix/defer 0700 postfix root
|
|
|
|
/var/spool/postfix/deferred 0700 postfix root
|
|
|
|
/var/spool/postfix/flush 0700 postfix root
|
|
|
|
/var/spool/postfix/hold 0700 postfix root
|
|
|
|
/var/spool/postfix/incoming 0700 postfix root
|
|
|
|
/var/spool/postfix/private 0700 postfix root
|
|
|
|
/var/spool/postfix/maildrop 0730 postfix postdrop
|
|
|
|
/var/spool/postfix/public 0710 postfix postdrop
|
|
|
|
/var/spool/postfix/pid 0755 root root
|
|
|
|
/var/spool/postfix/saved 0700 postfix root
|
|
|
|
/var/spool/postfix/trace 0700 postfix root"
|
2014-01-01 15:10:11 +00:00
|
|
|
|
2012-01-31 15:45:13 +00:00
|
|
|
do_build() {
|
2013-12-12 21:43:19 +00:00
|
|
|
sed -e "s,\(/usr/include/db.h\),${XBPS_CROSS_BASE}/\1,g" -i makedefs
|
|
|
|
|
2012-01-31 15:45:13 +00: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 \
|
2013-12-12 21:38:56 +00:00
|
|
|
-DDEF_COMMAND_DIR=\"/usr/bin\" \
|
|
|
|
-DDEF_SENDMAIL_PATH=\"/usr/bin/sendmail\" \
|
|
|
|
-DDEF_README_DIR=\"/usr/share/doc/postfix\" \
|
|
|
|
-DDEF_SAMPLE_DIR=\"/usr/share/examples/postfix/\" \
|
|
|
|
-DDEF_MANPAGE_DIR=\"/usr/share/man\" \
|
2012-01-31 15:45:13 +00:00
|
|
|
' AUXLIBS=' \
|
|
|
|
-lsasl2 \
|
|
|
|
-lldap -llber \
|
|
|
|
-lssl -lcrypto \
|
|
|
|
-lmysqlclient -lz -lm \
|
|
|
|
-lpq \
|
|
|
|
-lsqlite3 -lpthread \
|
|
|
|
' OPT="${CFLAGS} ${LDFLAGS}"
|
|
|
|
|
2013-12-12 21:38:56 +00:00
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
sed -e "s,/usr/include,${XBPS_CROSS_BASE}/usr/include,g" -i Makefile
|
|
|
|
fi
|
2012-01-31 15:45:13 +00:00
|
|
|
make ${makejobs}
|
|
|
|
}
|
|
|
|
|
2013-12-12 21:38:56 +00:00
|
|
|
pre_install() {
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
sed -e 's,bin/postconf,/usr/bin/postconf,g' -i postfix-install
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2012-01-31 15:45:13 +00:00
|
|
|
do_install() {
|
2013-12-12 21:38:56 +00:00
|
|
|
sh postfix-install -non-interactive install_root=${DESTDIR}
|
2014-08-03 15:25:59 +00:00
|
|
|
vmkdir usr/sbin
|
|
|
|
ln -s /usr/bin/sendmail ${DESTDIR}/usr/sbin/sendmail
|
2012-01-31 15:45:13 +00:00
|
|
|
|
|
|
|
vinstall LICENSE 644 usr/share/licenses/${pkgname}
|
|
|
|
vinstall TLS_LICENSE 644 usr/share/licenses/${pkgname}
|
|
|
|
|
2013-12-12 21:38:56 +00:00
|
|
|
cd $DESTDIR
|
|
|
|
patch -p0 -i ${FILESDIR}/aliases.patch
|
2012-01-31 15:45:13 +00:00
|
|
|
|
|
|
|
# systemd.
|
2012-07-10 07:27:06 +00:00
|
|
|
vinstall ${FILESDIR}/postfix.service 644 usr/lib/systemd/system
|
2012-01-31 15:45:13 +00:00
|
|
|
}
|