# Contributor: Sören Tempel # Contributor: Jonathan Curran # Maintainer: Jonathan Curran pkgname=opensmtpd pkgver=5.7.3p1 pkgrel=1 pkgdesc="secure, reliable, lean, and easy-to configure SMTP server" url="http://www.opensmtpd.org" arch="x86_64" license="ISC" depends="" depends_dev="" makedepends="automake autoconf libtool mdocml db-dev libasr-dev libevent-dev fts-dev openssl-dev bison flex-dev" install="$pkgname.pre-install $pkgname.post-install" subpackages="$pkgname-doc" source="https://www.opensmtpd.org/archives/opensmtpd-${pkgver}.tar.gz 00-opensmtpd.patch smtpd.initd aliases" _builddir=${srcdir}/${pkgname}-${pkgver} prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$_builddir" aclocal -I m4 autoconf autoheader automake --foreign --add-missing --copy ./configure --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc/smtpd \ --enable-table-db \ --with-privsep-user=smtpd \ --with-queue-user=smtpq \ --with-maildir=/var/spool/mail \ --with-sock-dir=/run \ --with-libs="-lfts" \ --with-pie \ --with-Werror \ --mandir=/usr/share/man \ --libexecdir=/usr/lib/$pkgname \ --with-ca-file=/etc/ssl/certs/ca-certificates.crt \ --with-mantype=doc || return 1 make || return 1 } package() { make DESTDIR=${pkgdir} -C "$_builddir" install || return 1 sed -i 's#/etc/mail#/etc/smtpd#g' "$pkgdir"/etc/smtpd/smtpd.conf install -Dm755 "$srcdir"/smtpd.initd "$pkgdir"/etc/init.d/smtpd || return 1 install -Dm644 "$srcdir"/aliases "$pkgdir"/etc/smtpd/aliases || return 1 # Move sendmail to /usr/sbin to overwrite busyboxs sendmail. mv "$pkgdir"/usr/bin/sendmail "$pkgdir"/usr/sbin/ || return 1 } md5sums="754abb7f08c094273f098d761c8c2221 opensmtpd-5.7.3p1.tar.gz e90e077ee170c7806a4657f0fd5778b1 00-opensmtpd.patch a2f311a82c9a85f5c52975c4dbbdbd53 smtpd.initd 561d2aead043a64a4ce5d66b4f78223e aliases" sha256sums="848a3c72dd22b216bb924b69dc356fc297e8b3671ec30856978950208cba74dd opensmtpd-5.7.3p1.tar.gz 1daa9b94e598db9b34e9a1fc717c834519824bdf7e87f1d6729c815ea5ca6acf 00-opensmtpd.patch ab4b7f066a38dadd7a2dc6d7c3a06c3a8ac2367340d97e2a8b54f571ea0f8cf8 smtpd.initd 7bef80f8d86aa5463c864681482a4908d22ff8b6f3e47d2a410ef2d59b316b53 aliases" sha512sums="e75ed2e148d25716df3af7b6746332c475eb671b91d3832b9a56b11a1e567749065f1332cd06d928cf6bd5122427cd33cc3e0f5f4e2bec0f2269db695be65b7e opensmtpd-5.7.3p1.tar.gz c3a60ec3785903b3118feebde6021e20f1eb26a8d6e8b8c72ae19c6f9d6a9a2ceaee32c45a0ac3ff29d24018d169273f931378c1269eec32d7e36e5d98dd475d 00-opensmtpd.patch 8152fecadeb1d818b7865eae040123f855e81fafbb4b40d12a64336e09dc486c10e6828809182c8172bfd9f54dc7d050a154b61d5e6049df6ffd8a7b6e5e1277 smtpd.initd 929ba0b8befca6cad558602f9793a9c653923924ee524902916b8ef4952d1ea8a391895e7450ed9768eb82a07bd307b49561f5d49ea4711bd87a1a73eb8d7dad aliases"