void-packages/srcpkgs/postfix/template

97 lines
2.8 KiB
Text
Raw Normal View History

2012-01-31 15:45:13 +00:00
# Template file for 'postfix'
pkgname=postfix
2013-02-14 05:01:52 +00:00
version=2.10.0
2013-05-09 14:26:34 +00:00
revision=2
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"
2013-02-14 05:01:52 +00:00
checksum=4a42a6029af418cbd4a8668b4f8c7e1ea9975cbe9756df760649c0a941bfeb7b
2012-01-31 15:45:13 +00:00
hostmakedepends="perl"
2013-05-09 14:26:34 +00:00
makedepends="openssl-devel db-devel>=5.3 pcre-devel>=8.30 libsasl-devel
libldap-devel libmysqlclient-devel>=5.5.27 postgresql-libs-devel sqlite-devel"
2012-01-31 15:45:13 +00:00
do_build() {
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 \
' AUXLIBS=' \
-lsasl2 \
-lldap -llber \
-lssl -lcrypto \
-lmysqlclient -lz -lm \
-lpq \
-lsqlite3 -lpthread \
' OPT="${CFLAGS} ${LDFLAGS}"
make ${makejobs}
}
do_install() {
sh postfix-install -non-interactive \
install_root="${DESTDIR}" \
daemon_directory="/usr/lib/${pkgname}" \
sample_directory="/etc/${pkgname}/sample" \
manpage_directory="/usr/share/man"
vinstall LICENSE 644 usr/share/licenses/${pkgname}
vinstall TLS_LICENSE 644 usr/share/licenses/${pkgname}
sed 's/\(^\$manpage[^:]*\):/\1.gz:/' -i \
${DESTDIR}/usr/lib/${pkgname}/postfix-files
cd ${DESTDIR}; patch -p0 -i ${FILESDIR}/aliases.patch
# Remove unused stuff.
rm -f ${DESTDIR}/etc/postfix/*LICENSE
rm -f ${DESTDIR}/etc/postfix/*.default
# 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
}
postfix_package() {
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"
depends="shadow"
systemd_services="postfix.service true"
system_accounts="postfix"
postfix_homedir="/var/spool/postfix"
system_groups="postdrop"
provides="smtp-server-0"
replaces="smtp-server>=0"
make_dirs="
/var/lib/postfix 0750 postfix root
/var/spool/postfix/active 0750 postfix root
/var/spool/postfix/bounce 0750 postfix root
/var/spool/postfix/corrupt 0750 postfix root
/var/spool/postfix/defer 0750 postfix root
/var/spool/postfix/deferred 0750 postfix root
/var/spool/postfix/flush 0750 postfix root
/var/spool/postfix/hold 0750 postfix root
/var/spool/postfix/incoming 0750 postfix root
/var/spool/postfix/private 0750 postfix root
/var/spool/postfix/maildrop 0750 postfix postdrop
/var/spool/postfix/public 0750 postfix postdrop
/var/spool/postfix/pid 0750 root root
/var/spool/postfix/saved 0750 postfix root
/var/spool/postfix/trace 0750 postfix root"
pkg_install() {
2013-05-09 14:26:34 +00:00
vmove all
}
}