aboutsummaryrefslogtreecommitdiffstats
path: root/community/postsrsd/APKBUILD
blob: cee191ad6ead84a4a1f157d82796a391ef45a505 (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
42
43
44
45
46
47
48
49
50
# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=postsrsd
pkgver=1.6
pkgrel=2
pkgdesc="Postfix Sender Rewriting Scheme daemon"
url="https://github.com/roehling/postsrsd"
arch="all"
license="GPL-2.0"
depends=""
makedepends="cmake help2man"
pkgusers="postsrsd"
install="$pkgname.pre-install"
subpackages="$pkgname-doc $pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/roehling/postsrsd/archive/$pkgver.tar.gz
	10-fix-defaults.patch
	postsrsd.initd"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"

	mkdir build
	cd build

	cmake .. -DCMAKE_INSTALL_PREFIX=/usr/ \
		-DCMAKE_BUILD_TYPE=None \
		-DGENERATE_SRS_SECRET=OFF \
		-DCONFIG_DIR=/etc/postsrsd
	make all
}

check() {
	cd "$builddir"/build
	./postsrsd_tests
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir/" install

	install -d "$pkgdir/etc/postsrsd/"
	install -Dm0644 build/postsrsd.default "$pkgdir/etc/conf.d/postsrsd"
	install -Dm0755 "$srcdir/postsrsd.initd" "$pkgdir/etc/init.d/postsrsd"
}

sha512sums="b2df4cdec41361e15cd8c9207fb16564d607559bcb36dd73c9347b90e4f3c2414b88434ef1ffe6a18783f38c5960383516e40e4ffa28802a03539e52ca723aa1  postsrsd-1.6.tar.gz
96a1c4e04ded844b98e5b5e263af51389ad8f1424a0fcd923f8156a2f9491b67552fbe3b5ad972cf1279d7b0e022787d151b5151a27da43227176356848ec4d7  10-fix-defaults.patch
bec690156e60a10286f92470420e2caccd0cd8fd5707fefddeb768b36a4697b9651acd707c7de08a99832a8b27a0328560501fb1376fe39bc27f5fbe4dca7797  postsrsd.initd"