1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
9 DESCRIPTION="An authoritative only, high performance, open source name server"
10 HOMEPAGE="http://www.nlnetlabs.nl/projects/nsd"
11 SRC_URI="http://www.nlnetlabs.nl/downloads/${PN}/${P}.tar.gz"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="bind8-stats ipv6 largefile nsec3 root-server runtime-checks"
18 DEPEND="dev-libs/openssl"
22 if use runtime-checks; then
23 ewarn "You enabled runtime-checks USE flag, this could lead to a reduced service level"
26 enewuser nsd -1 -1 -1 nsd
31 --with-dbfile=/var/db/nsd/nsd.db \
32 --with-difffile=/var/db/nsd/ixfr.db \
33 --with-pidfile=/var/run/nsd/nsd.pid \
34 --with-xfrdfile=/var/db/nsd/xfrd.state \
35 --with-zonesdir=/var/lib/nsd \
36 $(use_enable bind8-stats) \
37 $(use_enable largefile) \
40 $(use_enable root-server) \
41 $(use_enable runtime-checks checking)
45 emake DESTDIR="${D}" install || die "emake install failed"
47 dodoc doc/{ChangeLog,CREDITS,NSD-FOR-BIND-USERS,README,REQUIREMENTS} \
50 insinto /usr/share/nsd
51 doins contrib/nsd.zones2nsd.conf || die "doins failed"
53 exeinto /etc/cron.daily
54 doexe "${FILESDIR}/nsd.cron" || die "doexe failed"
56 newinitd "${FILESDIR}"/nsd.initd nsd || die "newinitd failed"
57 newconfd "${FILESDIR}"/nsd.confd nsd || die "newconfd failed"
59 # database directory, writable by nsd for ixfr.db file
61 fowners nsd:nsd /var/db/nsd
62 fperms 750 /var/db/nsd
64 # zones directory, writable by root for 'nsdc patch'
66 fowners root:nsd /var/lib/nsd
67 fperms 750 /var/lib/nsd
69 # pid dir, writable by nsd
71 fowners nsd:nsd /var/run/nsd
75 elog "If you are using bind and want to convert (or sync) bind zones"
76 elog "you should check out bind2nsd (http://bind2nsd.sourceforge.net)."