aboutsummaryrefslogtreecommitdiffstats
path: root/community/knot/APKBUILD
blob: 2e23294c71ced83b35441066883c948d4846c677 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Contributor: Dennis Przytarski <dennis@przytarski.com>
# Contributor: Francesco Zanini <francesco@zanini.me>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: tcely <knot+aports@tcely.33mail.com>
_pkgname="knot"
pkgname="${_pkgname}"
pkgver="2.8.4"
pkgrel=0
pkgdesc="An high-performance authoritative-only DNS server"
url="https://www.knot-dns.cz"
arch="all"
license="GPL-3.0-or-later"
depends=""
depends_dev="${pkgname} ${pkgname}-libs-static ${pkgname}-utils"
checkdepends="softhsm"
makedepends="gnutls-dev libedit-dev libcap-ng-dev libidn-dev lmdb-dev
	openssl-dev userspace-rcu-dev zlib-dev
	m4 bison flex perl sed jansson-dev libtool bsd-compat-headers"
install="${pkgname}.pre-install ${pkgname}.post-install ${pkgname}.post-upgrade"
pkgusers="${_pkgname}"
pkggroups="${_pkgname}"
subpackages="${pkgname}-libs
	${pkgname}-libs-static
	${pkgname}-utils
	${pkgname}-dev
	${pkgname}-doc
	${pkgname}-openrc
	"
source="https://secure.nic.cz/files/${_pkgname}-dns/${_pkgname}-${pkgver}.tar.xz
	test_net.patch
	knotd.confd
	knotd.initd
	"

prepare() {
	default_prepare

	cd "${builddir}"
	# Make sure embedded LMDB library is not used.
	rm -rf src/contrib/lmdb
}

build() {
	./configure \
		--build="${CBUILD}" \
		--host="${CHOST}" \
		--prefix=/usr \
		--sysconfdir=/etc \
		--libexecdir="/usr/lib/${_pkgname}" \
		--with-rundir="/run/${_pkgname}" \
		--with-storage="/var/lib/${_pkgname}" \
		--disable-silent-rules
	make
}

check() {
	make check
}

package() {
	make DESTDIR="${pkgdir}" install

	rm -rf "${pkgdir}/run"
	chown "${pkgusers%% *}:${pkggroups%% *}" "${pkgdir}/var/lib/${_pkgname}"
	chmod 750 "${pkgdir}/var/lib/${_pkgname}"

	install -Dm 644 "${srcdir}/knotd.confd" \
		"${pkgdir}/etc/conf.d/knotd"
	install -Dm 755 "${srcdir}/knotd.initd" \
		"${pkgdir}/etc/init.d/knotd"
}

libs() {
	pkgdesc="Libraries used by the Knot DNS server and client applications"

	cd "${pkgdir}"
	mkdir -p "${subpkgdir}/usr/lib"
	mv ./usr/lib/libdnssec.so.* \
		./usr/lib/libknot.so.* \
		./usr/lib/libzscanner.so.* \
		"${subpkgdir}/usr/lib/"
}

utils() {
	pkgdesc="DNS client utilities shipped with the Knot DNS server"

	mkdir -p "${subpkgdir}/usr"
	mv "${pkgdir}/usr/bin" "${subpkgdir}/usr/"
}

gpg_signature_extensions="asc"
gpgfingerprints="good:742F A4E9 5829 B6C5 EAC6  B857 10BB 7AF6 FEBB D6AB"

sha512sums="8f826f0e2259b346c84212f9b58fe756044b2549ae84e42d929a0e01269d9f72bce1791c98327b02de375c739e77090d0ea9bacba9fa91ded5b2ea16154ac588  knot-2.8.4.tar.xz
39503d16603eaff04cb34de97bff987952818d229ccb5b190567198505ece8077efdf230d5402e69ca4ab8acb282c53bfaaf495360dc11191c985a48fbb61318  test_net.patch
471d3c639a8235ba09491c99d36c0a4f1074d6055ccfd3807be02a30d3ed5bbe69a84f0414ea7810db6bbc1e38f5837108e5744fc59f949ed78a262a7de4597e  knotd.confd
979f06a83dd4326920a682f8190319577faf904e0e379b3c55e0420eb43dcb55d86c6727015634fa0c2dff1dddac43bbd5a216ff04f217ad91d670eb899dbefa  knotd.initd"