diff options
author | Maarten de Vries | 2019-05-17 12:15:48 +0200 |
---|---|---|
committer | Maarten de Vries | 2019-05-17 12:29:13 +0200 |
commit | 3318a668c9b7b8695d5866cbf92c55fc5bcfc38e (patch) | |
tree | f5aefb5d56ae2d22302be3af45cb3be45227e6eb /PKGBUILD | |
download | aur-3318a668c9b7b8695d5866cbf92c55fc5bcfc38e.tar.gz |
Initial commit at 6.4.1p2
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..671371dbb53b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,76 @@ +# Maintainer: Maarten de Vries <maarten@de-vri.es> +# Contributor: Lukas Fleischer <lfleischer@archlinux.org> +# Contributor: Hugo Osvaldo Barrera <hugo@barrera.io> +# Contributor: Sébastien Luttringer +# Contributor: parchd <parchd@archlinux.info> + +pkgname=opensmtpd-libressl +pkgver=6.4.1p2 +pkgrel=1 +pkgdesc='A FREE implementation of the server-side SMTP protocol. Latest snapshot.' +arch=('i686' 'x86_64') +url="http://www.opensmtpd.org/" +license=('BSD') +depends=('libressl-side' 'libevent' 'pam' 'libasr') +provides=('smtp-server' 'smtp-forwarder' 'opensmtpd') +conflicts=('smtp-server' 'smtp-forwarder' 'opensmtpd') +backup=("etc/smtpd/smtpd.conf" "etc/smtpd/aliases") +options=(emptydirs) +source=( + "https://www.opensmtpd.org/archives/opensmtpd-$pkgver.tar.gz" + 'opensmtpd.sysusers' + 'opensmtpd.tmpfiles' + 'smtpd.service' + 'smtpd.socket' +) +sha256sums=('b69b84934bcc4893ca334504411cd47f86ea04ac5e971a5746d44c473ac5f732' + 'b38b64f1457b7227d55585edc711cce525e089516d16b093e6c44387380e6b13' + '107bc2a46fa885e355e551cc362dce5ef2362a8f4ad4cb12d6310a7b6d4edb54' + '5c0f60d7bcebb1a6d371e7254b20d8ed2cfd79db64b3c3e9a6e992955bd6678f' + '32d46de5562d01de445d04c93bcc9f94bf103539b676e449c32e3603a3866cf8') + +prepare() { + cd "opensmtpd-$pkgver" + + sed -i \ + -e 's#/etc/mail#/etc/smtpd#g' \ + -e 's/^listen on localhost$/listen on lo/' \ + smtpd/smtpd.conf + + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc/smtpd \ + --sbindir=/usr/bin \ + --libexecdir=/usr/lib/smtpd \ + --with-user-smtpd=smtpd \ + --with-user-queue=smtpq \ + --with-group-queue=smtpq \ + --with-path-CAfile=/etc/ssl/certs/ca-certificates.crt \ + --with-cflags='-I/usr/include/libressl -L/usr/lib/libressl -Wl,-rpath=/usr/lib/libressl' +} + +build() { + cd "opensmtpd-$pkgver" + make +} + +package() { + cd "opensmtpd-$pkgver" + + make DESTDIR="$pkgdir/" install + + ln -s /usr/bin/smtpctl "$pkgdir/usr/bin/sendmail" + ln -s /usr/bin/smtpctl "$pkgdir/usr/bin/mailq" + ln -s /usr/bin/smtpctl "$pkgdir/usr/bin/newaliases" + ln -s /usr/bin/smtpctl "$pkgdir/usr/bin/makemap" + + # install additional files + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -Dm644 "$srcdir/opensmtpd.sysusers" "$pkgdir/usr/lib/sysusers.d/opensmtpd.conf" + install -Dm644 "$srcdir/opensmtpd.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/opensmtpd.conf" + install -Dm644 "$srcdir/smtpd.service" "$pkgdir/usr/lib/systemd/system/smtpd.service" + install -Dm644 "$srcdir/smtpd.socket" "$pkgdir/usr/lib/systemd/system/smtpd.socket" + + # install an empty aliases file (used by the default config) + install -Dm644 /dev/null "$pkgdir/etc/smtpd/aliases" +} |