# $Id: PKGBUILD 92253 2013-06-03 11:15:25Z allan $ # Maintainer: Sébastien Luttringer pkgname=opensmtpd pkgver=5.3.2p1 pkgrel=2 pkgdesc='Free implementation of the server-side SMTP protocol' arch=('i686' 'x86_64' 'mips64el') url='http://www.opensmtpd.org/' license=('custom') depends=('libevent') provides=('smtp-server' 'smtp-forwarder') conflicts=('smtp-server' 'smtp-forwarder') backup=('etc/smtpd.conf' 'etc/aliases' 'etc/virtual' 'etc/secrets') install=opensmtpd.install source=("http://www.opensmtpd.org/archives/$pkgname-$pkgver.tar.gz" 'smtpd.service' 'smtpd.socket') md5sums=('8fc513dd632461f70e433103d75dbf50' 'a278f272d97a9fe5a8aac784a7c98d67' 'c2c01e9ca78df3f65efe40a7c0e17ee0') build() { cd $pkgname-$pkgver ./bootstrap ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --sbindir=/usr/bin \ --libexecdir=/usr/bin \ --with-maildir=/var/spool/mail \ --with-privsep-path=/var/empty \ --with-sock-dir=/run \ --with-privsep-user=mail \ --with-filter-user=mail \ --with-queue-user=mail \ --with-pam make } package() { cd $pkgname-$pkgver make DESTDIR="$pkgdir/" install install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" cd "$pkgdir" # working directory install -dm711 var/spool/smtpd # license install -Dm644 "$srcdir/smtpd.service" usr/lib/systemd/system/smtpd.service install -Dm644 "$srcdir/smtpd.socket" usr/lib/systemd/system/smtpd.socket # remove duplicate hardlink into a subfolder rm -r usr/bin/opensmtpd # empty aliases file install -Dm644 /dev/null "$pkgdir/etc/aliases" install -Dm644 /dev/null "$pkgdir/etc/virtual" install -Dm640 /dev/null "$pkgdir/etc/secrets" # fake sendmail binary (used to be smtp-forwarder) # use hardlink as upstream does... ln "$pkgdir/usr/bin/smtpctl" "$pkgdir/usr/bin/sendmail" } # vim:set ts=2 sw=2 et: