]> Pileus Git - ~andy/sunrise/blob - net-dns/nsd/nsd-3.2.7.ebuild
sys-devel/boost-m4: New ebuild sys-devel/boost-m4-0.1 for bug 352618.
[~andy/sunrise] / net-dns / nsd / nsd-3.2.7.ebuild
1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="2"
6
7 inherit eutils
8
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"
12
13 LICENSE="BSD"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="bind8-stats ipv6 largefile nsec3 root-server runtime-checks"
17
18 DEPEND="dev-libs/openssl"
19 RDEPEND=${DEPEND}
20
21 pkg_setup() {
22         if use runtime-checks; then
23                 ewarn "You enabled runtime-checks USE flag, this could lead to a reduced service level"
24         fi
25         enewgroup nsd
26         enewuser nsd -1 -1 -1 nsd
27 }
28
29 src_configure() {
30         econf \
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) \
38                 $(use_enable ipv6) \
39                 $(use_enable nsec3) \
40                 $(use_enable root-server) \
41                 $(use_enable runtime-checks checking)
42 }
43
44 src_install() {
45         emake DESTDIR="${D}" install || die "emake install failed"
46
47         dodoc doc/{ChangeLog,CREDITS,NSD-FOR-BIND-USERS,README,REQUIREMENTS} \
48                 || die "dodoc failed"
49
50         insinto /usr/share/nsd
51         doins contrib/nsd.zones2nsd.conf || die "doins failed"
52
53         exeinto /etc/cron.daily
54         doexe "${FILESDIR}/nsd.cron" || die "doexe failed"
55
56         newinitd "${FILESDIR}"/nsd.initd nsd || die "newinitd failed"
57         newconfd "${FILESDIR}"/nsd.confd nsd || die "newconfd failed"
58
59         # database directory, writable by nsd for ixfr.db file
60         dodir /var/db/nsd
61         fowners nsd:nsd /var/db/nsd
62         fperms 750 /var/db/nsd
63
64         # zones directory, writable by root for 'nsdc patch'
65         dodir /var/lib/nsd
66         fowners root:nsd /var/lib/nsd
67         fperms 750 /var/lib/nsd
68
69         # pid dir, writable by nsd
70         dodir /var/run/nsd
71         fowners nsd:nsd /var/run/nsd
72 }
73
74 pkg_postinst() {
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)."
77 }