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.
8 # Forked to -opendns by TJ Vanderpoel tj at rubyists dot com
10 # rel 4: conflict with main djbdns
11 # rel 3: support for ipsvd in axdfdns
12 # rel 2: support for dietlibc
13 # rel 1: support for runit
15 pkgname=djbdns-opendns
20 pkgdesc="Tinydns and dnscache"
21 arch=('i686' 'x86_64')
22 url="http://cr.yp.to/djbdns.html"
23 license=('Public domain')
24 depends=('runit-dietlibc' 'ipsvd-dietlibc')
25 makedepends=('wget' 'gawk')
26 install=djbdns.install
27 source=("http://cr.yp.to/djbdns/djbdns-$pkgver.tar.gz"
28 'http://www.fefe.de/dns/djbdns-1.05-test23.diff.bz2'
29 'http://www.fefe.de/dns/djbdns-1.05-ixfr.diff.gz'
30 'http://tinydns.org/one-second.patch'
31 # 'http://safari.iki.fi/djbdns/djbdns-1.05-epoll-latest.diff.bz2'
32 # 'http://tinydns.org/srv-patch'
33 'http://smarden.org/pape/djb/manpages/djbdns-1.05-man.tar.gz'
40 _opendns_list='http://wiki.opennicproject.org/ClosestT2Servers'
42 md5sums=('3147c5cd56832aa3b41955c7a51cbeb2'
43 'dc35e88e20ffe2670cef5bb4d8a2c183'
44 'd66d9304a479ad0daa144c788a7ae997'
45 '4592756fea92754c0cc66ac01ab2751c'
46 '14d7329cff69f604fac607436eb8485e'
47 '97ec893c2b7198313440290cf36badf8'
48 'b3d5b1f23f65eb862b5667525ee3fb24'
49 'a2a64986133d3e205a08cb275ca35669'
50 '373d8370856e8e44b53aeadf5cae8e51'
51 '9ea8e388431e319a18e95b16200d0562'
52 'c8df76026145368fd3e85694d3becf04')
55 cd "$srcdir/djbdns-$pkgver"
56 echo /opt/diet/bin/diet -Os gcc $CFLAGS > conf-cc
58 patch -p0 < ../txt.patch || return 1
59 patch -p1 < ../djbdns-1.05-test23.diff || return 1
60 patch -p1 < ../ipv6intremove.patch || return 1
61 patch -p1 < ../djbdns-1.05-ixfr.diff || return 1
62 patch -p1 < ../one-second.patch || return 1
63 patch -p0 < ../axfred.patch || return 1
64 patch -p0 < ../nsd-xfr.patch || return 1
65 patch -p2 < ../runit.patch || return 1
66 sed -i -e 's|^gcc|/opt/diet/bin/diet -Os gcc|' conf-ld
68 mkdir -p ${pkgdir}/usr/bin ${pkgdir}/etc || return 1
70 for f in dnscache-conf tinydns-conf walldns-conf rbldns-conf pickdns-conf \
71 axfrdns-conf dnscache tinydns walldns rbldns pickdns axfrdns \
72 tinydns-get tinydns-data tinydns-edit rbldns-data pickdns-data \
74 install -m755 $f ${pkgdir}/usr/bin/ || return 1
77 for f in dnsip dnsipq dnsname dnstxt dnsmx dnsfilter random-ip dnsqr dnsq dnstrace \
79 install -m755 $f ${pkgdir}/usr/bin/ || return 1
81 #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
82 wget -O- $_opendns_list 2>/dev/null|awk -f "$srcdir/dehtml.awk"|awk '/^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+[[:space:]]\([A-Z]/{print $1}' > dnsroots.global
83 install -m644 dnsroots.global ${pkgdir}/etc || return 1
85 cd "$srcdir/djbdns-man" || return 1
86 gzip *.1 *.5 *.8 || return 1
87 mkdir -p ${pkgdir}/usr/share/man/man1 ${pkgdir}/usr/share/man/man5 ${pkgdir}/usr/share/man/man8 || return 1
88 install -m644 *.1.gz ${pkgdir}/usr/share/man/man1
89 install -m644 *.5.gz ${pkgdir}/usr/share/man/man5
90 install -m644 *.8.gz ${pkgdir}/usr/share/man/man8