aboutsummaryrefslogtreecommitdiffstats
path: root/main/bind/APKBUILD
blob: 974cbe00b05a9d288e0f405a2b0c8a08c2150294 (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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=bind
pkgver=9.9.5
_ver=${pkgver%_p*}
_p=${pkgver#*_p}
[ "$_p" != "$pkgver" ] && _ver="${_ver}-P$_p"
pkgrel=0
pkgdesc="The Berkeley Internet Name Domain Name Server and tools"
url="http://www.isc.org"
arch="all"
license="MIT BSD"
depends=""
pkgusers="named"
pkggroups="named"
makedepends="openssl-dev perl"
install="$pkgname.pre-install"
subpackages="$pkgname-doc $pkgname-dev $pkgname-libs $pkgname-tools"
source="http://ftp.isc.org/isc/bind9/${_ver}/bind-${_ver}.tar.gz
	bind.so_bsdcompat.patch
	named.initd
	named.confd
	named.conf
	127.zone
	localhost.zone
	named.ca
	"

_builddir="$srcdir/bind-${_ver}"
prepare() {
	cd "$_builddir"

	### http://bugs.gentoo.org/show_bug.cgi?id=227333
	export CFLAGS="$CFLAGS -D_GNU_SOURCE" 

	# Adjusting PATHs in manpages
	for i in bin/named/named.8 bin/check/named-checkconf.8 bin/rndc/rndc.8; do
		sed -i \
			-e 's:/etc/named.conf:/etc/bind/named.conf:g' \
			-e 's:/etc/rndc.conf:/etc/bind/rndc.conf:g' \
			-e 's:/etc/rndc.key:/etc/bind/rndc.key:g' \
			"${i}" || return 1
	done

	patch -p0 -i "$srcdir"/bind.so_bsdcompat.patch || return 1
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc/bind \
		--localstatedir=/var \
		--with-openssl=/usr \
		--disable-linux-caps \
		--without-libxml2 \
		--disable-threads \
		--enable-ipv6 \
		--enable-shared \
		--enable-static \
		--with-libtool \
		--with-randomdev=/dev/random \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		|| return 1

	make || return 1
}

package() {
	cd "$_builddir"
	install -d -m0770 -g named -o root "$pkgdir"/var/bind \
		"$pkgdir"/var/bind/sec \
		"$pkgdir"/var/bind/dyn \
		"$pkgdir"/var/run/named \
		"$pkgdir"/var/log/named \
		|| return 1

	install -d -m0750 -g named -o root "$pkgdir"/etc/bind \
		"$pkgdir"/var/bind/pri || return 1

	make DESTDIR="$pkgdir" install || return 1
	rm "$pkgdir"/usr/lib/*.la || return 1

	install -Dm755 "$srcdir"/named.initd \
		"$pkgdir"/etc/init.d/named || return 1
	install -Dm644 "$srcdir"/named.confd \
		"$pkgdir"/etc/conf.d/named || return 1
	install -Dm644 "$srcdir"/named.conf \
		"$pkgdir"/etc/bind/named.conf || return 1
	install -Dm644 "$srcdir"/named.ca \
		"$pkgdir"/var/bind/named.ca || return 1
	install -Dm644 "$srcdir"/127.zone \
		"$pkgdir"/var/bind/pri/127.zone || return 1
	install -Dm644 "$srcdir"/localhost.zone \
		"$pkgdir"/var/bind/pri/localhost.zone || return 1
	cd "$pkgdir"/var/bind
	ln -s named.ca root.cache || return 1
}

tools() {
	install=
	depends=
	mkdir -p "$subpkgdir"/usr/bin
	for i in dig host nslookup nsupdate; do
		mv "$pkgdir"/usr/bin/${i} "$subpkgdir"/usr/bin/ || return 1
	done
}

md5sums="e676c65cad5234617ee22f48e328c24e  bind-9.9.5.tar.gz
f270a5b0a28ab6e818840c5c368ddbcc  bind.so_bsdcompat.patch
1e77ad70d15546ae5e2527892b867580  named.initd
418a367cecfdf8760c92235d3967867e  named.confd
be5fd752bdbd59385f2a559d603098d5  named.conf
a7455b009b7fccd74ac6f6eaa6902a00  127.zone
c3220168fabfb31a25e8c3a545545e34  localhost.zone
a94e29ac677846f3d4d618c50b7d34f1  named.ca"
sha256sums="d4b64c1dde442145a316679acff2df4008aa117ae52dfa3a6bc69efecc7840d1  bind-9.9.5.tar.gz
4c5dc352da0a12bdda2644e835f7eabde4f5687f1a98acd65b22be4ee587c086  bind.so_bsdcompat.patch
38dd3f5b26c87d7dcf18416763091a3bacdca6ffdfdd3bc2a6bf4acb95098163  named.initd
c0e7b365dca072dc96a97c8f81dff012aff7fe57337c10b63cd9f292d03c207d  named.confd
ab2f7305e9a1d30406528c5ef079beb4970c89572e90d57bb5ddb27b8126ad13  named.conf
65b909fc1398dfa5b532ab395d6920758937093cf7e5b5bec8242dff4fe15e89  127.zone
b6dff70386920adb21883566610b0a45b9de5a3847a870e4ad1902c5c7900399  localhost.zone
0bd88f7f5cab2f872d3619700e382c1df6837a8aacf28cf6a0bf336742a0ee56  named.ca"
sha512sums="2639e73c0b57a6a34727e65e44a6d4c90e8682145f92a0a543f80fe0d3cdf707287b67d7ff9f1da5cf91a3c23861033b542871bc909ce0f538b4d3d368932574  bind-9.9.5.tar.gz
f3e3d1b680617485b9db20a59a10fec3b3b539d423984493228a7d5aaa29d699b9012ad60e863e56bdaf15b73952c22710d0ded1c86cd24417ac775ee062cfa3  bind.so_bsdcompat.patch
49d3dfa5a122720f86fb13f8cb2444bcdc2a18d90cf9b1eba3c5cbe93c29eb41f06ce9d1738047032cae4216fe8a88466d7cab657d821f291478e74cd6165fe3  named.initd
127bdcc0b5079961f0951344bc3fad547450c81aee2149eac8c41a8c0c973ea0ffe3f956684c6fcb735a29c43d2ff48c153b6a71a0f15757819a72c492488ddf  named.confd
64d95e7171c990f3191455bfe88acc53ee7dc7e38b87c8317b0bbcffa3a0117337e8da5f74cd33e7c3cb23a5003ac26eb172fd744f580aa20d3f8aab90c1f279  named.conf
eed9886717539399518e011ae5eae6335aed4fae019e1def088c5be26bdc896c99c07adf84ee61babafa31d31ff3b028263d1c88d2eee17ecf4c95a9d77d524c  127.zone
340e86472a2c2746fe585c0aa5f079d3a9b46e828c1f53d48026533a169b7f77ded7d0a13d291d6962607bb9481456e6fa69df1834603e7555332615fb998f0b  localhost.zone
badb85a67199b1ff28cdd3529c6d7c70b2757a71f52fd5e0aecb6dab80fa1838af863cd5d451be078cad3ef35f0c256aaac1831671cec119c5a689503e98a192  named.ca"