summaryrefslogtreecommitdiff
path: root/pcr/postsrsd/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/postsrsd/PKGBUILD')
-rw-r--r--pcr/postsrsd/PKGBUILD37
1 files changed, 37 insertions, 0 deletions
diff --git a/pcr/postsrsd/PKGBUILD b/pcr/postsrsd/PKGBUILD
new file mode 100644
index 000000000..d42ed0ccb
--- /dev/null
+++ b/pcr/postsrsd/PKGBUILD
@@ -0,0 +1,37 @@
+# Based on
+# Maintainer: Thomas Haider <t.haider@deprecate.de>
+
+pkgname=postsrsd
+pkgver=1.1
+pkgrel=1
+pkgdesc="Provides the Sender Rewriting Scheme (SRS) via TCP-based lookup tables for Postfix"
+arch=('i686' 'x86_64')
+depends=('glibc')
+makedepends=('cmake' 'help2man')
+backup=('etc/postsrsd/postsrsd.conf')
+url="https://github.com/roehling/postsrsd"
+install=postsrsd.install
+license=('GPL2')
+source=('https://github.com/roehling/postsrsd/archive/1.1.tar.gz' 'postsrsd.service')
+md5sums=('5cde2c2ae7046347f5e17aef2ea8a4a8'
+ '64f31e8914f5063297371d36f699302d')
+
+build() {
+ cd "$srcdir/${pkgname}-${pkgver}"
+ mkdir build
+ cd build
+ cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DGENERATE_SRS_SECRET=OFF
+ make all
+}
+
+package() {
+ cd "$srcdir/postsrsd/build"
+ make DESTDIR="$pkgdir/" install
+
+ rm -rf $pkgdir/usr/lib
+ mv "$pkgdir/usr/sbin" "$pkgdir/usr/bin"
+ sed -e 's/^\(RUN_AS=\)nobody/#\1postsrsd/;s/\(\/etc\/postsrsd\)\(\.secret\)/\1\/postsrsd\2/' \
+ -e 's/^\(# is \).*$/\1localhost\.localdomain/'< ../postsrsd.default > postsrsd.conf
+ install -D -m644 "postsrsd.conf" "$pkgdir/etc/postsrsd/postsrsd.conf"
+ install -D -m644 "$srcdir/postsrsd.service" "$pkgdir/usr/lib/systemd/system/postsrsd.service"
+}