# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils DESCRIPTION="NSD is an authoritative only, high performance, simple and open source name server." HOMEPAGE="http://www.nlnetlabs.nl/nsd/" SRC_URI="http://www.nlnetlabs.nl/downloads/nsd/${P}.tar.gz" LICENSE="as-is" SLOT="0" KEYWORDS="~x86" IUSE="root-server ipv6 plugins checking no-dnssec no-axfr no-tsig bind8-stats ssl" RESTRICT="nomirror" DEPEND="sys-apps/groff sys-devel/autoconf ssl? ( >=dev-libs/openssl-0.9.7i )" src_compile() { local myconf="" # Warn about plugins support. if use plugins; then echo ewarn "" einfo "Plug-ins support is highly experimental!" ewarn "Plug-ins support enabled" epause 10 fi use no-dnssec && myconf="${myconf} --disable-dnssec" use no-axfr && myconf="${myconf} --disable-axfr" use no-tsig && myconf="${myconf} --disable-tsig" econf \ --with-user=nsd \ --with-dbfile=/var/lib/nsd/nsd.db \ --with-pidfile=/var/run/nsd.pid \ $(use_enable root-server) \ $(use_enable ipv6) \ $(use_enable plugins) \ $(use_enable checking) \ $(use_enable bind8-stats) \ $(use_with ssl) \ ${myconf} || die "econf failed" # Issue the make all command. emake all || die "failed to compile nsd" } src_install() { einstall \ configdir=${D}/etc/nsd \ configfile=${D}/etc/nsd/nsdc.conf \ zonesfile=${D}/etc/nsd/nsd.zones || die "einstall failed" dodoc \ DIFFERENCES \ NSD-DATABASE \ README \ README.icc \ RELNOTES \ REQUIREMENTS \ CREDITS \ TODO exeinto /etc/cron.hourly newexe ${FILESDIR}/nsd.cron nsd.cron exeinto /etc/init.d newexe ${FILESDIR}/nsd.initd nsd } pkg_postinst() { enewgroup nofiles enewuser nsd -1 -1 /var/lib/nsd }