blob: d42ed0ccbf87515edc7fc57e4a692199dff656d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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"
}
|