aboutsummaryrefslogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2014-07-28 12:55:11 +0200
committerJohannes Löthberg <johannes@kyriasis.com>2015-06-01 16:03:40 +0200
commit3c24c1355f273ec7c7919c2d51e225cb7acf28e3 (patch)
tree6095e11b3c4e37ed28e57d826d5e81c673266f27 /PKGBUILD
downloadpkgbuilds-3c24c1355f273ec7c7919c2d51e225cb7acf28e3.tar.xz
opensmtp: initial import
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD59
1 files changed, 59 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..d17f53f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,59 @@
+pkgname=opensmtpd-ldap
+pkgver=5.4.2p1
+pkgrel=2
+pkgdesc='Free implementation of the server-side SMTP protocol'
+arch=('i686' 'x86_64')
+url='http://www.opensmtpd.org/'
+license=('custom')
+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=('c76b39a5fcc0ad05eea541e74b16e62a'
+ 'a278f272d97a9fe5a8aac784a7c98d67'
+ 'c2c01e9ca78df3f65efe40a7c0e17ee0')
+
+prepare() {
+ 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/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-queue-user=smtpq \
+ --with-experimental-ldap \
+ --with-pam
+
+ make
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir/" install
+
+ # install license and systemd unit files
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ 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"
+}