1 # Contributor: Yejun Yang yejunx AT gmail DOT com
3 # rel 6: Allow nsd as slaves
4 # rel 5: Increase txt record length to 255
5 # rel 4: Fixed http://article.gmane.org/gmane.network.djbdns/13864
6 # rel 3: Patch IPv6, IXFR, MMAP cache and man pages.
7 # rel 2: Fixed the regex to get root hints file and added desc.
12 pkgdesc="Tinydns and dnscache"
13 arch=('i686' 'x86_64')
14 url="http://cr.yp.to/djbdns.html"
15 license=('Public domain')
16 depends=('daemontools' 'ucspi-tcp')
17 makedepends=('wget' 'gawk')
18 install=djbdns.install
19 source=("http://cr.yp.to/djbdns/$pkgname-$pkgver.tar.gz"
20 'http://www.fefe.de/dns/djbdns-1.05-test23.diff.bz2'
21 'http://www.fefe.de/dns/djbdns-1.05-ixfr.diff.gz'
22 'http://tinydns.org/one-second.patch'
23 # 'http://safari.iki.fi/djbdns/djbdns-1.05-epoll-latest.diff.bz2'
24 # 'http://tinydns.org/srv-patch'
25 'http://smarden.org/pape/djb/manpages/djbdns-1.05-man.tar.gz'
26 'http://www.internic.net/zones/named.root'
32 md5sums=('3147c5cd56832aa3b41955c7a51cbeb2'
33 'dc35e88e20ffe2670cef5bb4d8a2c183'
34 'd66d9304a479ad0daa144c788a7ae997'
35 '4592756fea92754c0cc66ac01ab2751c'
36 '14d7329cff69f604fac607436eb8485e'
37 'd7a1cb305b7b5b72df4e574777f76723'
38 'b3d5b1f23f65eb862b5667525ee3fb24'
39 'a2a64986133d3e205a08cb275ca35669'
40 '373d8370856e8e44b53aeadf5cae8e51'
41 '9ea8e388431e319a18e95b16200d0562')
45 cd "$srcdir/$pkgname-$pkgver"
46 echo gcc $CFLAGS -include /usr/include/errno.h > conf-cc
48 patch -p0 < ../txt.patch || return 1
49 patch -p1 < ../djbdns-1.05-test23.diff || return 1
50 patch -p1 < ../ipv6intremove.patch || return 1
51 patch -p1 < ../djbdns-1.05-ixfr.diff || return 1
52 patch -p1 < ../one-second.patch || return 1
53 patch -p0 < ../axfred.patch || return 1
54 patch -p0 < ../nsd-xfr.patch || return 1
56 mkdir -p ${pkgdir}/usr/bin ${pkgdir}/etc || return 1
58 for f in dnscache-conf tinydns-conf walldns-conf rbldns-conf pickdns-conf \
59 axfrdns-conf dnscache tinydns walldns rbldns pickdns axfrdns \
60 tinydns-get tinydns-data tinydns-edit rbldns-data pickdns-data \
62 install -m755 $f ${pkgdir}/usr/bin/ || return 1
65 for f in dnsip dnsipq dnsname dnstxt dnsmx dnsfilter random-ip dnsqr dnsq dnstrace \
67 install -m755 $f ${pkgdir}/usr/bin/ || return 1
69 cat $srcdir/named.root | awk --posix '/\.ROOT-SERVERS\.NET.*[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/ { print $4; }' > dnsroots.global || return 1
70 install -m644 dnsroots.global ${pkgdir}/etc || return 1
72 cd "$srcdir/djbdns-man" || return 1
73 gzip *.1 *.5 *.8 || return 1
74 mkdir -p ${pkgdir}/usr/share/man/man1 ${pkgdir}/usr/share/man/man5 ${pkgdir}/usr/share/man/man8 || return 1
75 install -m644 *.1.gz ${pkgdir}/usr/share/man/man1
76 install -m644 *.5.gz ${pkgdir}/usr/share/man/man5
77 install -m644 *.8.gz ${pkgdir}/usr/share/man/man8