aboutsummaryrefslogtreecommitdiffstats
path: root/testing/knot/APKBUILD
blob: 5b2635da25af495bc541c73b8d985edbe903d258 (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Contributor: Dennis Przytarski <dennis@przytarski.com>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=knot
pkgver=2.0.2
pkgrel=1
pkgdesc="An high-performance authoritative-only DNS server"
url="https://www.knot-dns.cz"
arch="all"
license="GPL3"
options=""
depends=""
depends_dev="gnutls-dev jansson-dev libcap-ng-dev 
	libidn-dev openssl-dev userspace-rcu-dev zlib-dev"
makedepends="$depends_dev m4 bison flex perl libtool"
install="$pkgname.pre-install $pkgname.post-install"
pkgusers="knot"
pkggroups="knot"
subpackages="$pkgname-dev $pkgname-doc"
source="https://secure.nic.cz/files/knot-dns/${pkgname}-${pkgver}.tar.xz
	knotd.confd
	knotd.initd
	wire-ctx.patch"
_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--libexecdir=/usr/lib/knot \
		--with-rundir=/var/run/knot \
		--with-storage=/var/lib/knot \
		--disable-silent-rules \
		|| return 1
	make || return 1
	make check || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="${pkgdir}" install || return 1
	install -Dm 644 "${srcdir}/knotd.confd" "${pkgdir}/etc/conf.d/knotd"
	install -Dm 755 "${srcdir}/knotd.initd" "${pkgdir}/etc/init.d/knotd"
	chown $pkgusers:$pkggroups "${pkgdir}"/var/lib/$pkgname
	chmod 750 "${pkgdir}"/var/lib/$pkgname
	chown $pkgusers:$pkggroups "${pkgdir}"/var/run/$pkgname
	chmod 750 "${pkgdir}"/var/run/$pkgname
}

md5sums="923837b1c58b7cfdd78785103696c322  knot-2.0.2.tar.xz
66f3111080662280d95bc928d6ca92d5  knotd.confd
5bdbc22866a28caae068e65d53916915  knotd.initd
7cb1a48510736d38ff960af8cb602c1f  wire-ctx.patch"
sha256sums="0418a22f9e801503993b3c872f2403bf73eab5ef7266128789b0531b41ea0c7e  knot-2.0.2.tar.xz
ff384d428c9e67139ed21b0c78eabf6a26d96f31775f6143ce0c4f9c4f6beaf3  knotd.confd
c7690f1c4f748f436faa9e305ecbbb3d05e5cc50493eb10ca92bc73365578428  knotd.initd
1b7a3bf4b14133ccbe8a034ced47aeb2af1987b26b372d50c3aeb5702bc2235b  wire-ctx.patch"
sha512sums="5bb36f01a2f39c97d1278be1bb1be60e842a75b3a0f2bc51651907ad937a42229f0df988a5e865de7f869011eb4ac836bda1c5d92c86357ac2556dcf8134b09f  knot-2.0.2.tar.xz
471d3c639a8235ba09491c99d36c0a4f1074d6055ccfd3807be02a30d3ed5bbe69a84f0414ea7810db6bbc1e38f5837108e5744fc59f949ed78a262a7de4597e  knotd.confd
b6cd5b52ba65f9726164b21003fe0a0fc54f4f51aa7bbbcfd5b83aa4466e5224567a26c9c8ede13ac6a8090706e975e3220456112b20eb45304c9d92be7fb3d3  knotd.initd
563e202aff1a32116e51496dbb451e8fd47c289f6dbb935630e0f3a664c4c1ebf6d9733f1a5fed1f62cd7e6b152ebaf103b60ca5d535c5c3b006549c54016953  wire-ctx.patch"