aboutsummaryrefslogtreecommitdiffstats
path: root/main/nsd/APKBUILD
blob: dabe9013b9f34168631c01918027e88b5a938cf7 (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
# 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.3.1
pkgrel=0
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() {
	./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() {
	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="58b6e964795d6c796b547e1134cef954e5f4adf4e976db830ff7900892327154dab2a607ceadbb99072d6e5495d62c808c8fb8c94359ae93f636d11925c0d261  nsd-4.3.1.tar.gz
bc2b27d98b99db067c7c4b152ee40ae81b8ee66989f873ca0c21f57333c3734bb342866f68d5837f10bb56cb598fafc794095c02b8bc97ef6dace450cae526a6  nsd.initd
4c107bba33785a031f29c2d078419c8f0858c94a2488e192a6e76085e7135755352446d350ad4561b02beb767fecd488ac710fc1d2ba9e19a9c42f484331bd3c  config.patch"