1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-dns/djbdns/djbdns-1.05-r28.ebuild,v 1.2 2013/08/14 11:30:23 patrick Exp $
6 inherit eutils flag-o-matic readme.gentoo toolchain-funcs user
8 DESCRIPTION="Excellent high-performance DNS services"
9 HOMEPAGE="http://cr.yp.to/djbdns.html"
12 SRC_URI="http://cr.yp.to/djbdns/${P}.tar.gz
13 ipv6? ( http://www.fefe.de/dns/${P}-${IPV6_PATCH}.diff.bz2 )"
16 LICENSE="public-domain"
17 KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86"
18 IUSE="doc ipv6 selinux static"
24 doc? ( app-doc/djbdns-man )
25 selinux? ( sec-policy/selinux-djbdns )"
29 "${FILESDIR}/headtail.patch" \
30 "${FILESDIR}/dnsroots.patch" \
31 "${FILESDIR}/dnstracesort.patch" \
32 "${FILESDIR}/string_length_255.patch"
35 epatch "${FILESDIR}/CVE2009-0858_0001-check-response-domain-name-length.patch"
38 elog "At present dnstrace does NOT support IPv6. It will"\
39 "be compiled without IPv6 support."
40 cp -pR "${S}" "${S}-noipv6"
41 # Careful -- >=test21 of the IPv6 patch includes the errno patch
42 epatch "${DISTDIR}/${P}-${IPV6_PATCH}.diff.bz2"
46 "${FILESDIR}/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6.patch" \
47 "${FILESDIR}/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch" \
48 "${FILESDIR}/makefile-parallel.patch"
55 "${FILESDIR}/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries.patch" \
56 "${FILESDIR}/CVE2008-4392_0002-dnscache-cache-soa-records.patch"
58 epatch "${FILESDIR}/${PV}-errno.patch"
64 use static && append-ldflags -static
65 echo "$(tc-getCC) ${CFLAGS}" > conf-cc
66 echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
67 echo "/usr" > conf-home
70 # If djbdns is compiled with IPv6 support, it breaks dnstrace.
71 # Therefore we must compile dnstrace separately without IPv6
74 elog "Compiling dnstrace without ipv6 support"
76 echo "$(tc-getCC) ${CFLAGS}" > conf-cc
77 echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
78 echo "/usr" > conf-home
88 dobin *-conf dnscache tinydns walldns rbldns pickdns axfrdns \
89 *-get *-data *-edit dnsip dnsipq dnsname dnstxt dnsmx \
90 dnsfilter random-ip dnsqr dnsq dnstrace dnstracesort
93 dobin dnsip6 dnsip6q "${S}-noipv6/dnstrace"
96 dodoc CHANGES FILES README SYSDEPS TARGETS TODO VERSION
97 readme.gentoo_create_doc
101 # The nofiles group is no longer provided by baselayout.
102 # Share it with qmail if possible.
103 enewgroup nofiles 200
105 enewuser dnscache -1 -1 -1 nofiles
106 enewuser dnslog -1 -1 -1 nofiles
107 enewuser tinydns -1 -1 -1 nofiles
110 DISABLE_AUTOFORMATTING=1
111 FORCE_PRINT_ELOG=1 #remove next bump
113 The dnscache-setup, tinydns-setup, and djbdns-setup programs have
114 been removed to follow upstream more closely. To configure djbdns,
115 please follow the instructions at,
117 http://cr.yp.to/djbdns.html
119 Of particular interest are,
121 axfrdns : http://cr.yp.to/djbdns/axfrdns-conf.html
122 dnscache: http://cr.yp.to/djbdns/run-cache-x-home.html
123 tinydns : http://cr.yp.to/djbdns/run-server.html
125 Portage has created users for axfrdns, dnscache, and tinydns; the
126 commands to configure these programs are,
128 1. axfrdns-conf tinydns dnslog /var/axfrdns /var/tinydns $ip
129 2. dnscache-conf dnscache dnslog /var/dnscache $ip
130 3. tinydns-conf tinydns dnslog /var/tinydns $ip
132 (replace \$ip with the ip address on which the server will run).
134 If you wish to configure rbldns or walldns, you will need to create
135 those users yourself (although you should still use the "dnslog"
138 4. rbldns-conf $username dnslog /var/rbldns $ip $base
139 5. walldns-conf $username dnslog /var/walldns $ip