summaryrefslogtreecommitdiff
path: root/community/opensmtpd
diff options
context:
space:
mode:
Diffstat (limited to 'community/opensmtpd')
-rw-r--r--community/opensmtpd/PKGBUILD37
-rw-r--r--community/opensmtpd/opensmtpd.install18
2 files changed, 25 insertions, 30 deletions
diff --git a/community/opensmtpd/PKGBUILD b/community/opensmtpd/PKGBUILD
index e56eebe63..0e452fb82 100644
--- a/community/opensmtpd/PKGBUILD
+++ b/community/opensmtpd/PKGBUILD
@@ -1,50 +1,45 @@
-# $Id: PKGBUILD 93322 2013-07-01 22:20:09Z seblu $
+# $Id: PKGBUILD 102612 2013-12-16 18:31:48Z seblu $
# Maintainer: Sébastien Luttringer
pkgname=opensmtpd
-pkgver=5.3.3p1
-pkgrel=1
+pkgver=5.4.1p1
+pkgrel=2
pkgdesc='Free implementation of the server-side SMTP protocol'
arch=('i686' 'x86_64')
url='http://www.opensmtpd.org/'
license=('custom')
-depends=('libevent')
+depends=('libevent' 'openssl')
provides=('smtp-server' 'smtp-forwarder')
conflicts=('smtp-server' 'smtp-forwarder')
backup=('etc/smtpd/smtpd.conf' 'etc/smtpd/aliases')
+options=('emptydirs')
install=opensmtpd.install
source=("http://www.opensmtpd.org/archives/$pkgname-$pkgver.tar.gz"
'smtpd.service'
'smtpd.socket')
-md5sums=('795982f9b0b45c7645f897ba2ead0024'
+md5sums=('74551342985b78eb687995f7953d1790'
'a278f272d97a9fe5a8aac784a7c98d67'
'c2c01e9ca78df3f65efe40a7c0e17ee0')
prepare() {
- cd $pkgname-$pkgver
- sed -i 's,etc/aliases,etc/smtpd/aliases,' smtpd/smtpd.conf
- # regen configure. don't use bootstrap script (doesn't support automake 1.14)
- libtoolize --copy --force
- aclocal -I m4
- autoconf
- autoheader
- automake --foreign --add-missing --copy
+ sed -ri 's,/etc/mail,/etc/smtpd,g' $pkgname-$pkgver/smtpd/smtpd.conf
}
build() {
cd $pkgname-$pkgver
+ # Remove _FORTIFY_SOURCES: FS#38124
+ export CPPFLAGS=''
./configure \
--prefix=/usr \
--sysconfdir=/etc/smtpd \
--sbindir=/usr/bin \
- --libexecdir=/usr/bin \
+ --libexecdir=/usr/lib/smtpd \
--with-maildir=/var/spool/mail \
--with-privsep-path=/var/empty \
--with-sock-dir=/run \
+ --with-ca-file=/etc/ssl/certs/ca-certificates.crt \
--with-privsep-user=smtpd \
- --with-lookup-user=smtpd \
--with-queue-user=smtpq \
- --with-filter-user=smtpf \
--with-pam
make
}
@@ -56,17 +51,11 @@ package() {
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# working directory
cd "$pkgdir"
- install -dm711 var/spool/smtpd
+ # install systemd units
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 -vr usr/bin/opensmtpd
# empty aliases file (used by default config)
- install -Dm644 /dev/null "$pkgdir/etc/smtpd/aliases"
- # fake sendmail binary (used to be smtp-forwarder)
- # use hardlink as upstream does
- cd "$pkgdir/usr/bin"
- ln smtpctl "$pkgdir/usr/bin/sendmail"
+ install -Dm644 /dev/null etc/smtpd/aliases
}
# vim:set ts=2 sw=2 et:
diff --git a/community/opensmtpd/opensmtpd.install b/community/opensmtpd/opensmtpd.install
index 48366c15c..4b0df73c6 100644
--- a/community/opensmtpd/opensmtpd.install
+++ b/community/opensmtpd/opensmtpd.install
@@ -3,10 +3,7 @@ post_install() {
# create users
getent passwd smtpd >/dev/null || useradd -d / -u 91 -g 1 smtpd
getent passwd smtpq >/dev/null || useradd -d /var/spool/smtpd -u 92 -g 1 smtpq
- getent passwd smtpf >/dev/null || useradd -d / -u 93 -g 1 smtpf
- # initialise aliase db
- #[[ -e /etc/smtpd/aliases.db ]] || makemap -t aliases /etc/smtpd/aliases
- true
+ :
}
# arg 1: the new package version
@@ -17,13 +14,22 @@ post_upgrade() {
echo 'Configuration files have been moved to /etc/smtpd.'
echo 'New users have been added.'
echo 'Check your configuration!'
+ elif (( $(vercmp $2 5.4) < 0 )); then
+ echo 'User smtpf is no more required. It will be removed!'
+ echo 'Check your configuration!'
+ userdel -f smtpf
fi
+ :
}
# arg 1: the old package version
post_remove() {
- for _u in smtpd smtpq smtpf; do userdel -f "$_u"; done
- true
+ userdel -f smtpd
+ userdel -f smtpq
+ if (( $(vercmp $1 5.4) <= 0 )); then
+ userdel -f smtpf
+ fi
+ :
}
# vim:set ts=2 sw=2 et: