aboutsummaryrefslogtreecommitdiffstats
path: root/community/postsrsd/APKBUILD
blob: 1eb19cfc3920febefba77612308444dfcd04c048 (plain) (blame)
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
51
52
# Contributor: Kevin Daudt <ops@ikke.info>
# Maintainer: Kevin Daudt <ops@ikke.info>
pkgname=postsrsd
pkgver=1.4
pkgrel=1
pkgdesc="Postfix Sender Rewriting Scheme daemon"
url="https://github.com/roehling/postsrsd"
arch="all"
license="GPL2"
depends=""
makedepends="cmake help2man"
pkgusers="postsrsd"
install="$pkgname.pre-install"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/roehling/postsrsd/archive/$pkgver.tar.gz
	10-fix-defaults.patch
	set-socket-listen-address.patch
	postsrsd.initd"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"

	mkdir build
	cd build

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

check() {
	cd "$builddir"/build
	./postsrsd -v
}

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="e5b9d2091d562030dd8d35117a3c5fb7d99c0613120fc90f74be57af5e88a3fe0ce73a5ce702708047ae37f70c6aedb4a0df018dccbe480048ccb6ed4debbcef  postsrsd-1.4.tar.gz
bdafd3921fac6af21cf099ac63fd06692dca37366e197b23aaedd3cf748652bcc5b54cf545b24c7e6cb48d266233a29e9184481af99aa8d58a80e512d326c788  10-fix-defaults.patch
886dff5628bf17f0a18cd3d4fc5cd8245b35325c4d6476ba5d39552b102464d77dc8f33117b0c423a7ea776f102670092e75cd9e638ee34f1834865b219a1b54  set-socket-listen-address.patch
bec690156e60a10286f92470420e2caccd0cd8fd5707fefddeb768b36a4697b9651acd707c7de08a99832a8b27a0328560501fb1376fe39bc27f5fbe4dca7797  postsrsd.initd"