#Packager: Dimitris Tzemos # # You need to have a postfix user and postfix and postdrop groups setup # in your system for this to build properly. Read the README.Slackware # file for info about how to create them. pkgname=postfix pkgver=2.9.4 pkgrel=1dj source=("ftp://ftp.ntua.gr/pub/net/mail/postfix/official/$pkgname-$pkgver.tar.gz" "rc.postfix" "aliases.patch" "README.Slackware") sourcetemplate=http://people.salixos.org/djemos/salix/$pkgname url="http://www.postfix.org/" docs=('AAAREADME' 'COMPATIBILITY' 'COPYRIGHT' 'HISTORY' 'IPv6-ChangeLog' 'LICENSE' 'PORTING' 'RELEASE_NOTES' 'TLS_ACKNOWLEDGEMENTS' 'TLS_CHANGES' 'TLS_LICENSE' 'US_PATENT_6321267' 'implementation-notes' 'examples' 'readme*' 'install') options=('noautodotnew') dotnew=('etc/postfix/access' 'etc/postfix/aliases' 'etc/postfix/canonical' 'etc/postfix/generic' 'etc/postfix/header_checks' 'etc/postfix/main.cf' 'etc/postfix/main.cf.default' 'etc/postfix/makedefs.out' 'etc/postfix/master.cf' 'etc/postfix/relocated' 'etc/postfix/transport' 'etc/postfix/virtual') slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "postfix (alternative to the widely-used Sendmail program)" "Postfix attempts to be fast, easy to administer, and secure, while at" "the same time being sendmail compatible enough to not upset existing" "users. Thus, the outside has a sendmail-ish flavor, but the inside is" "completely different." "" "Make sure you read the documentation about how to set this up," "especially the info about creating postfix user and groups in" "/usr/doc/postfix-$pkgver/README.Slackware" ) build() { cd $startdir/src/${pkgname}-${pkgver} make makefiles \ CCARGS='-DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\" -DUSE_TLS' \ AUXLIBS="-lssl -lcrypto " \ OPT="${CFLAGS}" || return 1 make || return 1 make non-interactive-package \ install_root=$startdir/pkg \ tempdir=/tmp/$pkgname-temp \ config_directory=/etc/postfix \ daemon_directory=/usr/libexec/postfix \ command_directory=/usr/sbin \ queue_directory=/var/spool/postfix \ sendmail_path=/usr/sbin/sendmail \ newaliases_path=/usr/bin/newaliases \ mailq_path=/usr/bin/mailq \ mail_owner=postfix \ setgid_group=postdrop \ html_directory=/usr/doc/$pkgname-$pkgver/html \ manpage_directory=/usr/man \ readme_directory=/usr/doc/$pkgname-$pkgver/README_FILES || return 1 mkdir -p $startdir/pkg/etc/rc.d || return 1 cp $startdir/src/rc.postfix $startdir/pkg/etc/rc.d/rc.postfix || return 1 chmod 755 $startdir/pkg/etc/rc.d/rc.postfix || return 1 cd $startdir/pkg || return 1 patch -p0 -i $startdir/src/aliases.patch || return 1 # Since we gzip the manpages, let's fix the postfix-files to reflect that # so it won't throw errors during post-install sed 's/^\(\$manpage[^:]*\):/\1.gz:/' -i "usr/libexec/${pkgname}/postfix-files" || return 1 chown -R root:root $startdir/pkg/usr/sbin chown -R postfix:postdrop $startdir/pkg/var/spool/postfix chown -R postfix:postdrop $startdir/pkg/var/lib/postfix chown -R root:postdrop $startdir/pkg/var/spool/postfix/pid chown root:root $startdir/pkg/var/spool/postfix chown root:postdrop $startdir/pkg/usr/sbin/postqueue chown root:postdrop $startdir/pkg/usr/sbin/postdrop chmod 2755 $startdir/pkg/usr/sbin/postqueue chmod 2755 $startdir/pkg/usr/sbin/postdrop }