aboutsummaryrefslogtreecommitdiffstats
path: root/main/nsd/APKBUILD
blob: 6eca3889bfd339ece83348ec13cf450222b72955 (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
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer:  Matt Smith <mcs@darkregion.net>
pkgname=nsd
pkgver=3.2.16
pkgrel=1
pkgdesc="NSD is an authoritative only, high performance, simple and open source name server."
url="http://www.nlnetlabs.nl/projects/nsd/"
arch="all"
license="BSD"
depends=
depends_dev=
makedepends="$depends_dev openssl-dev"
install="$pkgname.pre-install $pkgname.post-deinstall"
subpackages="$pkgname-doc"
pkgusers="nsd"
pkggroups="nsd"
source="http://www.nlnetlabs.nl/downloads/$pkgname/$pkgname-$pkgver.tar.gz
	0010-stop-unlink-pid-error.patch
	nsdc
	nsd.initd
	nsd.confd
	"

_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 \
		--sbindir=/usr/sbin \
		--mandir=/usr/share/man \
		--with-user=nsd \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1

	install -m755 -D "$srcdir"/nsdc \
		"$pkgdir"/usr/sbin/nsdc || return 1
	install -m755 -D "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/nsd || return 1
	install -m644 -D "$srcdir"/$pkgname.confd \
		"$pkgdir"/etc/conf.d/nsd || return 1

	chown nsd "$pkgdir"/var/db/nsd || return 1
}

doc() {
	arch="noarch"

	mkdir -p "$subpkgdir"/usr/share/doc/$pkgname || return 1
	cp -a "$_builddir"/doc/* \
		"$subpkgdir"/usr/share/doc/$pkgname/ || return 1
	cp -a "$_builddir"/contrib/ \
		"$subpkgdir"/usr/share/doc/$pkgname/ || return 1
	mv "$pkgdir"/usr/share/man \
		"$subpkgdir"/usr/share/man || return 1
}

md5sums="c16a845884851d26c85d5117f11e5f08  nsd-3.2.16.tar.gz
cc592572846b978a6f52130a8e518ab3  0010-stop-unlink-pid-error.patch
3aa94004a39319db89a329e9f24fb9da  nsdc
4c0eef07caac9083aeeb9b15602d014d  nsd.initd
37bd648259fdd919c79aaa0168b4423c  nsd.confd"
sha256sums="15a5fd69ea80345eefced83a58b40e8f262a06ac4f7f83606d33033b167d6604  nsd-3.2.16.tar.gz
729e3897e77ad424b525b93b3df371f239999cf66b7f1271c925dee27721536d  0010-stop-unlink-pid-error.patch
5295b40d1f55635850837c003993015027f050567d396197875b9287183a05ad  nsdc
e5cc18f8d8a14a6d37f6f536846991c294324cdf4575bf6cf77d7299b1fe0a9a  nsd.initd
1f397b7b98e694787728462a3451433c314a7fc4afbc2d9cfd66dcbae1d793c0  nsd.confd"
sha512sums="361934717b1975a68c074e0f1fe324259a5939871a6e76f5d7d0535f02a129f0940b16fb544b111c8c8849439c75387e2f50223a2ef3442bac66a2be23bcd529  nsd-3.2.16.tar.gz
6cf28cf846fd1910b7ed2d143286efec5011486646cab0ea845633c68681ee5e4d2b7462aa6108673966341fc3e5e29c8f2b978981d88c5091855a06af7bdeb0  0010-stop-unlink-pid-error.patch
c7830033819f3b9e8b4a90ef05f018d5fb7752cc71b3b8ebfd7113302c9a3fc937422fe6a53c0af7608b5a078a001cd104db12383d6531082f51b41cde83daed  nsdc
4fbbd137612ab793ab7b74c38cc557e801fc48a2d564258e015b67f4c7cc85092938bd82e3f45ec09de9996524426086f55fb3a2fd5f830ec580483962275f69  nsd.initd
356087670fd860f5cc9e2ebc7309fbd9771d2fa3b92b5086cc7b10af459a31a470921d38b30324d152d8de680f0b071ee077093c330dff060a0f1120b4a4d7e5  nsd.confd"