aboutsummaryrefslogtreecommitdiffstats
path: root/testing/knot/APKBUILD
blob: 51a59f17bebde0716f195e4cf1398f65bd80c45d (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=knot
pkgver=1.5.3
pkgrel=2
pkgdesc="An high-performance authoritative-only DNS server"
url="https://www.knot-dns.cz"
arch="all"
license="GPL3"
options="libtool"
depends=""
depends_dev="autoconf flex bison zlib-dev openssl-dev userspace-rcu-dev"
makedepends="$depends_dev"
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
	knot.confd
	knot.initd"
_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 \
		--enable-recvmmsg=yes \
		--disable-silent-rules
	make	
	make check
}

package() {
	cd "$_builddir"
	make DESTDIR="${pkgdir}" install
	install -Dm 644 "${srcdir}/knot.confd" "${pkgdir}/etc/conf.d/knot"
	install -Dm 755 "${srcdir}/knot.initd" "${pkgdir}/etc/init.d/knot"
	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
	rm -f "$pkgdir"/usr/lib/*.la
}

md5sums="dff8d562f7ab4541c8094155170bdcce  knot-1.5.3.tar.xz
5fb8fd53d39fc6ddc1e0982c75dc2d7e  knot.confd
c611eb01afb1df7c08f7a93f981419ea  knot.initd"
sha256sums="defc5da9920d755354f6233e099d619424371fe03e78ff7b520f2fbad0ba70ec  knot-1.5.3.tar.xz
3f539ffd67cbcda1ef9e7acb68a2a3f1c3443ad9b5af14d2f96ccd74b0cd585a  knot.confd
710e0e71e5b8b774fb24e40c7b319741d25f02a8a0ff7b279893ca08781fc7de  knot.initd"
sha512sums="c7fd280d701e529964bd00e1f4de2129d28774c76864a67a64880e29f43ac403d1a863e865adacd1db5d7a3736e3762ce8449926892c3a21a2e5d042bce682e2  knot-1.5.3.tar.xz
298bc9ae612de56f2a0b629f9241b42f7086f45964dbd7ee3ecb503ec5cc9ae83ff21fccc522bb022ffdbe16997a1b2b1273cf56cac4dfecfdb2fe26a42b9f78  knot.confd
87d73193c0778fed9523f6af386000244bae3a2187d531dca31841db694ff7d914e1fd5839d1bf30c0bbd5ea0e4fa0105b81a2edbfded782d8441aa13423190f  knot.initd"