aboutsummaryrefslogtreecommitdiffstats
path: root/community/opendkim/APKBUILD
blob: a0841c3d4c422859215c1ad4d8e59f496000b53a (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
59
60
61
62
63
64
65
66
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Stefan Wagner <stw@bit-strickerei.de>
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
pkgname=opendkim
pkgver=2.10.3
pkgrel=10
pkgdesc="DKIM signing and verifying filter for MTAs"
url="http://www.opendkim.org"
arch="all"
license="custom"
depends=""
makedepends="openssl-dev libmilter-dev automake autoconf libtool"
pkgusers="opendkim"
pkggroups="opendkim"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-dbg $pkgname-utils"
install="$pkgname.pre-install"
source="https://downloads.sourceforge.net/project/$pkgname/$pkgname-$pkgver.tar.gz
	openssl_1.1.0_compat.patch
	$pkgname.confd
	$pkgname.initd"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd "$builddir"
	default_prepare
	autoreconf -vif
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc/$pkgname
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	install -d "$pkgdir"/etc/$pkgname
	install -dm750 -g mail "$pkgdir"/var/db/dkim
	cat "$pkgdir"/usr/share/doc/$pkgname/$pkgname.conf.simple | sed \
		-e '/^Socket.*$/a#Socket\t\t\tlocal:opendkim.sock' \
		-e '1s~.*~BaseDirectory\t\t/run/opendkim~' \
		> "$pkgdir"/etc/$pkgname/$pkgname.conf
	install -d "$pkgdir"/usr/share/licenses/$pkgname;
	mv "$pkgdir"/usr/share/doc/$pkgname/LICENSE* \
		"$pkgdir"/usr/share/licenses/$pkgname
	install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
}

utils() {
	pkgdesc="$pkgdesc (key and zone utilities)"
	depends="$pkgname openssl perl"
	install -d "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/sbin/$pkgname-* "$subpkgdir"/usr/bin
	rm -fr "$pkgdir"/usr/lib
}

sha512sums="97923e533d072c07ae4d16a46cbed95ee799aa50f19468d8bc6d1dc534025a8616c3b4b68b5842bc899b509349a2c9a67312d574a726b048c0ea46dd4fcc45d8  opendkim-2.10.3.tar.gz
f971979c5687286213218a5f0b420ed3593c262231717fb85eeee51762acde9b6e6fa0be5c7731e2da1fcf2d6761dfb3e9d6a1477ec9675fd2bbefceb734799f  openssl_1.1.0_compat.patch
1dd6ed6e4efd93463f8eeb4603e72cf3a77f0a70117164a34b45bf0d2f45d4520b62c86696f7d180cff61a73201253c1ff875efdcd5317d631118776db665ea1  opendkim.confd
a3c3b4d4af875903aec1ae9f565113dc6b10fb0c5c45df96f043735de9be772e6d2fca812ce2bd51f9759f4a7c18ac5ced62a7b5530924edd0981250cb88f91f  opendkim.initd"