blob: d377f36ad03f5fedecf9e0dbd5e0298ca2abd0f1 (
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
38
39
40
41
|
# 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')
prepare() {
cd "$srcdir/${pkgname}-${pkgver}"
mkdir build
}
build() {
cd "$srcdir/${pkgname}-${pkgver}"
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DGENERATE_SRS_SECRET=OFF
make all
}
package() {
cd "$srcdir/${pkgname}-${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"
install -D -m644 "$srcdir/postsrsd.service" "$pkgdir/usr/lib/systemd/system/postsrsd.service"
}
|