aboutsummaryrefslogtreecommitdiffstats
path: root/main/nsd/APKBUILD
blob: 4681286eb6bb189fe22946691ae3b4522f67dd12 (plain) (blame)
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
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Matt Smith <mcs@darkregion.net>
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Contributor: Iggy Jackson <iggy@theiggy.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=nsd
pkgver=4.2.4
pkgrel=1
pkgdesc="Authoritative only, high performance and simple DNS server"
url="https://www.nlnetlabs.nl/projects/nsd"
arch="all"
license="BSD-3-Clause"
makedepends="openssl-dev libevent-dev"
install="$pkgname.pre-install $pkgname.pre-upgrade"
subpackages="$pkgname-doc $pkgname-dbg $pkgname-openrc"
pkgusers="nsd"
pkggroups="nsd"
source="https://www.nlnetlabs.nl/downloads/nsd/nsd-$pkgver.tar.gz
	nsd.initd
	config.patch
	"

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--sbindir=/usr/sbin \
		--mandir=/usr/share/man \
		--with-user=nsd \
		--with-pidfile=/run/nsd/nsd.pid \
		--with-xfrdir=/var/db/nsd \
		--enable-ratelimit \
		--enable-ratelimit-default-is-off
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install

	install -m755 -D "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname

	install -d "$pkgdir"/usr/share/doc/$pkgname
	cp -a "$builddir"/doc/* "$builddir"/contrib \
		"$pkgdir"/usr/share/doc/$pkgname/

	install -d -m 755 -o nsd -g nsd "$pkgdir"/var/db/nsd
	rm -fr "$pkgdir"/run
}

sha512sums="5d4f546a2a4484b182c65d3337d44596e935bca074c0eda2947b9d128a56db08a00240c6ec9ce22bc9a436e009c00c3283c4a5cbd1163ca4a429eaa92ec54208  nsd-4.2.4.tar.gz
bc2b27d98b99db067c7c4b152ee40ae81b8ee66989f873ca0c21f57333c3734bb342866f68d5837f10bb56cb598fafc794095c02b8bc97ef6dace450cae526a6  nsd.initd
4c107bba33785a031f29c2d078419c8f0858c94a2488e192a6e76085e7135755352446d350ad4561b02beb767fecd488ac710fc1d2ba9e19a9c42f484331bd3c  config.patch"