diff options
author | Georg Schlisio | 2016-03-30 18:20:52 +0200 |
---|---|---|
committer | Georg Schlisio | 2016-03-30 18:20:52 +0200 |
commit | 541fbe83c2f98846dee345fe512a6caee26ac17b (patch) | |
tree | be74148634a4fbaffddcb771812c2a75ecbd513b | |
download | aur-541fbe83c2f98846dee345fe512a6caee26ac17b.tar.gz |
1.4
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 41 | ||||
-rw-r--r-- | postsrsd.install | 15 |
3 files changed, 76 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..57e5dc1bbc04 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = postsrsd + pkgdesc = Provides the Sender Rewriting Scheme (SRS) via TCP-based lookup tables for Postfix + pkgver = 1.4 + pkgrel = 1 + url = https://github.com/roehling/postsrsd + install = postsrsd.install + arch = i686 + arch = x86_64 + license = GPL2 + makedepends = cmake + makedepends = help2man + depends = glibc + provides = postsrsd + conflicts = postsrsd + backup = etc/postsrsd/postsrsd.conf + source = https://github.com/roehling/postsrsd/archive/1.4.tar.gz + md5sums = cb6e13a06d6bbd7d383efb9bbf0867ce + +pkgname = postsrsd + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..491a9a74ec01 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# derived from postsrsd-git PKGBUILD maintained by +# Radek Podgorny <radek@podgorny.cz> +# Thomas Haider <t.haider@deprecate.de> + +pkgname=postsrsd +pkgver=1.4 +pkgrel=1 +pkgdesc="Provides the Sender Rewriting Scheme (SRS) via TCP-based lookup tables for Postfix" +provides=(postsrsd) +conflicts=(postsrsd) +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.4.tar.gz') +md5sums=('cb6e13a06d6bbd7d383efb9bbf0867ce') + +build() { + cd "$srcdir/postsrsd-$pkgver" + ###sed -e 's|${SYSCONF_DIR}/systemd/system|/usr/lib/systemd/system|g' -i postinstall.cmake.in + mkdir build + cd build + cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DGENERATE_SRS_SECRET=OFF + make all +} + +package() { + cd "$srcdir/postsrsd-$pkgver/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" + mkdir -p "$pkgdir/usr/lib/systemd/system" + mv "$pkgdir/etc/systemd/system/postsrsd.service" "$pkgdir/usr/lib/systemd/system/" +} diff --git a/postsrsd.install b/postsrsd.install new file mode 100644 index 000000000000..b8e7f8d5aed1 --- /dev/null +++ b/postsrsd.install @@ -0,0 +1,15 @@ +post_install() { + useradd -r -g mail -d / postsrsd + chown -R postsrsd:root etc/postsrsd + + [ -e /etc/postsrsd/postsrsd.secret ] || dd if=/dev/urandom bs=18 count=1 status=none | base64 > /etc/postsrsd/postsrsd.secret + chown postsrsd:root /etc/postsrsd/postsrsd.secret + chmod 400 /etc/postsrsd/postsrsd.secret + cat << _EOF +Don't forget to set your domainname in /etc/postsrsd/postsrsd.conf +_EOF +} + +post_remove() { + userdel postsrsd +} |