aboutsummaryrefslogtreecommitdiffstats
path: root/main/dkimproxy/APKBUILD
blob: f5898b7694e10a5c97adfe73419c37eb462f3e3c (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
51
52
53
54
55
56
57
58
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=dkimproxy
pkgver=1.4.1
pkgrel=4
pkgdesc="SMTP-proxy that signs and/or verifies emails, using the Mail::DKIM module"
url="http://dkimproxy.sourceforge.net/"
arch="noarch"
license="GPL"
depends="perl-mail-dkim perl-net-server perl-error"
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
	dkimproxy.in.initd
	dkimproxy.out.initd
	dkimproxy.in.confd
	dkimproxy.out.confd
	"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"

	local vendorlib=$(perl -V:vendorlib | sed -En "s|vendorlib='([^']+)';|\1|p")

	perllibdir="$vendorlib" ./configure --prefix=/usr \
		--sysconfdir=/etc/$pkgname \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--bindir=/usr/bin
	make
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir" install

	cd "$pkgdir"

	mkdir -p ./usr/sbin
	mv ./usr/bin/$pkgname.* ./usr/sbin/
	mv ./usr/bin/dkim_responder.pl ./usr/bin/dkim_responder

	local path; for path in ./etc/$pkgname/*.example; do
		mv $path ${path%.example}
	done

	local name; for name in $pkgname.in $pkgname.out; do
		install -D -m 755 "$srcdir"/$name.initd ./etc/init.d/$name
		install -D -m 644 "$srcdir"/$name.confd ./etc/conf.d/$name
	done
}

sha512sums="ad5ac961ea25cdd7ccc763521d1fa5e143ef93056ca4bdace1d0d8f564ab85cb128b4c97ace310bcbf9e4d49430dd5baf1e9f836f5a44a4b3f1e7498ebc352b6  dkimproxy-1.4.1.tar.gz
35368ff9d63103c7a17ce4320ad434daad1e0039d19e6777e0d226befdcc290c0737baf856a384bb915b0ca8f0311b10259fb2c0df1c9896445e748622b66a64  dkimproxy.in.initd
31a91b1bccb76210aad13329c55a0f1c9d499188fd73b0bc4fb2160790885e1f74a27328c8864744bdc4610b27fba1f13b10494ad9d789599c58bb1dbf33a5f5  dkimproxy.out.initd
aaea5eb0e7b7d400e2774a60c39d55fe9c905336f416db7dfe5477b6ffa6e243ba3897a7e0ce8bdb485a9b730a9b0d6531bd31c49af8cef9f208f895a19b483d  dkimproxy.in.confd
2882eebaf991b8b236cb345ec421c1ead103d2b6cd3e60203d9351587381a25d470c470f8869ce29f6a1cdbc3b9657378787d43da846efad93712983d7a56b32  dkimproxy.out.confd"