aboutsummaryrefslogtreecommitdiffstats
path: root/main/djbdns/APKBUILD
blob: cc0e44b9e139fc299a37996bf7f96509c0bf1880 (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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=djbdns
pkgver=1.05
pkgrel=44
pkgdesc="Excellent high-performance DNS services"
url="http://cr.yp.to/djbdns.html"
arch="all"
license="public-domain"
depends=
subpackages="djbdns-common tinydns dnscache"
source="http://cr.yp.to/djbdns/$pkgname-$pkgver.tar.gz
http://www.fefe.de/dns/djbdns-1.05-test25.diff.bz2
	headtail.patch
	dnsroots.patch
	dnstracesort.patch
	djbdns-1.05-jumbo-josb.patch
	$pkgver-errno.patch
	$pkgver-response.patch
	tinydns.pre-install
	tinydns.initd
	tinydns.confd
	dnscache.pre-install
	dnscache.initd
	dnscache.confd
	dnscache.monthly
	"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		*.diff.gz) msg $i; gunzip -c "$srcdir"/$i | patch -p1 || return 1;;
		esac
	done
	# remove all the generated headers. they came with the jumbo patch and should
	# never have been there...
	sed -n 's/^\([a-z0-9]\+\.h\):.*/\1/gp' Makefile Makefile.sig | xargs rm -f
}

build() {
	cd "$_builddir"
	echo "${CC:-"gcc"} ${CFLAGS}" > conf-cc
	echo "${CC:-"gcc"} ${LDFLAGS}" > conf-ld
	echo "/usr" > conf-home
	make -j1 || return 1
}

package() {
	cd "$_builddir"
	mkdir -p "$pkgdir"/etc/
	cp dnsroots.global "$pkgdir"/etc/
	mkdir -p "$pkgdir"/usr/bin
	cp *-conf dnscache tinydns walldns rbldns pickdns axfrdns \
		*-get *-data *-edit dnsip dnsipq dnsname dnstxt dnsmx \
		dnsfilter random-ip dnsqr dnsq dnstrace dnstracesort \
		"$pkgdir"/usr/bin/ 
	mkdir -p "$pkgdir"/usr/share/doc/djbdns
}

common() {
	pkgdesc="Base utilities of djbdns"
	replaces="djbdns"

	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/dnsqr "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/dnsip "$subpkgdir"/usr/bin
}

tinydns() {
	pkgdesc="A small and secure DNS server"
	install=tinydns.pre-install

	mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/etc/tinydns \
		"$subpkgdir"/var/cache/tinydns
	mv "$pkgdir"/usr/bin/tinydns* "$subpkgdir"/usr/bin
	install -D -m755 "$srcdir"/tinydns.initd \
		"$subpkgdir"/etc/init.d/tinydns
	install -D -m644 "$srcdir"/tinydns.confd \
		"$subpkgdir"/etc/conf.d/tinydns
}

dnscache() {
	pkgdesc="A recursive resolver"
	install=dnscache.pre-install
	depends=djbdns-common

	mkdir -p "$subpkgdir"/usr/bin \
		"$subpkgdir"/etc/dnscache/ip \
		"$subpkgdir"/etc/dnscache/servers

	cp "$pkgdir"/etc/dnsroots.global "$subpkgdir"/etc/dnscache/servers/@
	touch "$subpkgdir"/etc/dnscache/ip/127 || return 1

	mv "$pkgdir"/usr/bin/dnscache* "$subpkgdir"/usr/bin
	install -D -m755 "$srcdir"/dnscache.initd \
		"$subpkgdir"/etc/init.d/dnscache
	install -D -m644 "$srcdir"/dnscache.confd \
		"$subpkgdir"/etc/conf.d/dnscache
	install -D -m755 "$srcdir"/dnscache.monthly \
		"$subpkgdir"/etc/periodic/monthly/dnscache-hints-refresh
}

md5sums="3147c5cd56832aa3b41955c7a51cbeb2  djbdns-1.05.tar.gz
4593ed6a189a8bad8b58671841d36732  djbdns-1.05-test25.diff.bz2
0d2adaf9f1626043e8702b825cdccdd6  headtail.patch
7565048ebc981238879122c7f88cc143  dnsroots.patch
6fe7f473233f1c86b76261afd8345bf0  dnstracesort.patch
adb6745606cae593eb5ea6870fc27bd4  djbdns-1.05-jumbo-josb.patch
c7be73fe2fb4ae02d5096fa2c1f55a68  1.05-errno.patch
1292500c04baba3995d9753fe40fdc94  1.05-response.patch
f58af419816e9e50b94b88703325f94d  tinydns.pre-install
8665f7d2667cf27b978bbc87491fb8f6  tinydns.initd
7dcf6674c07d46c736b3c25d9c92384a  tinydns.confd
d4ac7c5ec5e27a0c218f0e1c51950272  dnscache.pre-install
e5cada3b032da84c4a0e41ef8b3108cb  dnscache.initd
2b3d02e88f70603c760bf368ab3ed636  dnscache.confd
8173f85e0d9b4496de389d1b43993d95  dnscache.monthly"
sha256sums="3ccd826a02f3cde39be088e1fc6aed9fd57756b8f970de5dc99fcd2d92536b48  djbdns-1.05.tar.gz
28c88de08822894cf252e54ed3be9abfdf4f492644ff74a7c479340bdce051ea  djbdns-1.05-test25.diff.bz2
daec7b45c91e2db2607697eeba8034e13c6d99c7d8d521f462955dc2fce968b2  headtail.patch
a9b5e70cd853e30f40f312ba42d4603691aa6b4e2498faedf3ec2b39817b3c03  dnsroots.patch
f1d83e1365f68571fa4e007d5219720f8d65eb3730040a087fceb0ce2d8806bf  dnstracesort.patch
99dc3b9f7e8db95923b18250887f3b11f96ba7171e00242e5bde90b3cf5ae570  djbdns-1.05-jumbo-josb.patch
0cf77c0386d422dc9ead4af71eb02f76d5a214ccd68e0e2c2cf9f774247cc19c  1.05-errno.patch
9d59a9b608c390743cf552c20a5143e1df8401366e95b8731da261895163ca3a  1.05-response.patch
191c7f79de2f20ce3f6506b4255b92f7b1977bea1f870c2d3c5a58cb8182e51d  tinydns.pre-install
d9dc1b29ca5f2f82c978f4ff5d927ebe5080b90b1bdd69430da73c636b8eb1f1  tinydns.initd
bc4368780009bfada4f2f55f0c2c0847aec2a4670fa42f9872716877fccdf64c  tinydns.confd
cdd2bf24a75e11bec4a7fe1eefcf8fcdc7de57b406de3b5e0777d18fa5cb3fba  dnscache.pre-install
6c2f360fb2b6b4e8540ad8a47249f74ae87e85a340bf0e481935ba3a24e45c77  dnscache.initd
7088d50f85ee576a7e96c6de4beb62fe0fb66f40ee083cb48528817f67a11fc3  dnscache.confd
6da908c5ca1f0d6ab9c500d3844dc870ea99288de6940027daf1a7dadc8bb5ae  dnscache.monthly"
sha512sums="20f066402801d7bec183cb710a5bc51e41f1410024741e5803e26f68f2c13567e48eba793f233dfab903459c3335bc169e24b99d66a4c64e617e1f0779732fa9  djbdns-1.05.tar.gz
41cca597dba971010b9844071e0349d3a4b25cc4b144e12721b0bc8250589fb374e40ece8908f1081762597048179b1177e88b9a5f97be0b47b63e3183e654bb  djbdns-1.05-test25.diff.bz2
be4c9aea40c737364a56f188ad2276d90deac0dffb73ba4b659490836c0fe92ffb65ccf23c6724b913b2d6354336727004be0cf5b43ebc47abe7004700dfe1e8  headtail.patch
0cd97d833e0aaee2b82ed27b56ce183e9ab9806ff1e77bc61b7f38ae3168aa7310b12d2ed330713c4da97e60881ee339f6af449142cc29823865d87270733211  dnsroots.patch
ae9cd51f24041aed135b5ba88d1efd0310b8095bccd6fb60a986756b460a4f98a93e163c3ddae7c146d56a9d41778d17449f772b91fdc58d9e69523cf6c2a6e9  dnstracesort.patch
af7c0a0a2f519ec16ac2a937664b7984aafeb19d04fbd6e0fd0afa5482f3cb0b4ac5cf6a846d574a8591f3cec725b4f828cca95344c3c774cb77ee5630ff6617  djbdns-1.05-jumbo-josb.patch
086d02600034d486f084fd2500aba9041dfa02110781594cdc3781a3ad7823f61f11c54c053c8c1241f58660527abe536906aba0e7f6c49ed3b8dbd74ba8f2b7  1.05-errno.patch
407207f8387e2344fdebe68ab2213adbd9f1e6034e343b4359c8c1fa6ce36b0878a8367e4ee05cb4a44c199d4956aef0c6c8e84ab4f5556178547346ab88b82d  1.05-response.patch
54e69ebe9b8cfe159584b271577a2ab58a9604f3bd92d651fc5f4f68e47111ac5f74a4170bd299af83371052a69ab817179f436965d14bfa4132d151bb488786  tinydns.pre-install
519e7c01c7ae02cef75828c85a9bb848db0738389a2ab0d5cc5f96d8178f739be0f7558b0f1218470a398fa271a48d2edaadaa03db14a3afb55a76317991683a  tinydns.initd
31b52bd4dd0f78ff63e105ff3937fb9bf582628fe7a04bfcba91195d4fc4b55b60869f993a42ef55a228892647af07ed7ea22cfff72812430c7b8207debdd8f1  tinydns.confd
3d9cc830ab4d0907740b0f17bf31a467689b3abbaf78a9125a84d94520003274d4b235bec13f08224540c8b89f0d40640a31ae3cc8ff9c5a134242cf657976cf  dnscache.pre-install
2d1aef7ec474c3aec384195242ccd34ed69a1f836283e5f0008329c613f4a537c14979ea67fee8b0514f63324a592f01fded6d8bf6104ffb5ba2df0c3c58e740  dnscache.initd
1b281a4892c1c9ad39a15c95d0fbd14b0ada69b31723250e33d96946bd19f3edc4b36ec90fb9b6b884d7907b7e86cc3980f116f16fe35fb7496feffd728b1ffa  dnscache.confd
70d3431db407d02f145cb1521d563559b536e89a6a88f50cf853036b2833d78b594398df30cc33c17debea23aa6a7112614741e13f8ec5d1429fad075273a9f6  dnscache.monthly"