summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Hierling <mad@cc.fh-luh.de>2006-06-28 13:22:46 +0000
committerMartin Hierling <mad@cc.fh-luh.de>2006-06-28 13:22:46 +0000
commit0b0d1bf7da18aba03e2351a0182c2a364cc9072e (patch)
tree3faa7a168fed671c6ba95390e3969238bfbdf0b8 /net-dns
parentsys-apps/cddetect - don't die on dobin or simple sed (diff)
downloadsunrise-reviewed-0b0d1bf7da18aba03e2351a0182c2a364cc9072e.tar.gz
sunrise-reviewed-0b0d1bf7da18aba03e2351a0182c2a364cc9072e.tar.bz2
sunrise-reviewed-0b0d1bf7da18aba03e2351a0182c2a364cc9072e.zip
New Ebuild for bug 128246 net-dns/nsd thanks to Albert Holm
svn path=/sunrise/; revision=347
Diffstat (limited to 'net-dns')
-rw-r--r--net-dns/nsd/ChangeLog7
-rw-r--r--net-dns/nsd/Manifest5
-rw-r--r--net-dns/nsd/files/digest-nsd-2.3.51
-rw-r--r--net-dns/nsd/files/nsd.cron10
-rw-r--r--net-dns/nsd/files/nsd.initd61
-rw-r--r--net-dns/nsd/nsd-2.3.5.ebuild79
6 files changed, 163 insertions, 0 deletions
diff --git a/net-dns/nsd/ChangeLog b/net-dns/nsd/ChangeLog
new file mode 100644
index 000000000..a5aca9060
--- /dev/null
+++ b/net-dns/nsd/ChangeLog
@@ -0,0 +1,7 @@
+# ChangeLog for net-dns/nsd
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+ 28 Jun 2006; Martin Hierling <mad@cc.fh-luh.de> ChangeLog:
+ New Ebuild for bug 128246 net-dns/nsd thanks to Albert Holm
+
diff --git a/net-dns/nsd/Manifest b/net-dns/nsd/Manifest
new file mode 100644
index 000000000..cee65591d
--- /dev/null
+++ b/net-dns/nsd/Manifest
@@ -0,0 +1,5 @@
+MD5 9736bf8dd99bcf9b22b120e34b477018 ChangeLog 236
+MD5 73d00928fec6d9afbb8bfc9f640c15d3 files/digest-nsd-2.3.5 61
+MD5 3c43bbd149f9936267d3b11e84c9e329 files/nsd.cron 237
+MD5 5861af65e070abf9d31b6f32bd853c93 files/nsd.initd 1120
+MD5 2424b2d73fc1663691a57157b44bf3c8 nsd-2.3.5.ebuild 1598
diff --git a/net-dns/nsd/files/digest-nsd-2.3.5 b/net-dns/nsd/files/digest-nsd-2.3.5
new file mode 100644
index 000000000..3954bec0f
--- /dev/null
+++ b/net-dns/nsd/files/digest-nsd-2.3.5
@@ -0,0 +1 @@
+MD5 e9dfb18d544cd37c57b05a91384037e9 nsd-2.3.5.tar.gz 239147
diff --git a/net-dns/nsd/files/nsd.cron b/net-dns/nsd/files/nsd.cron
new file mode 100644
index 000000000..990fc7803
--- /dev/null
+++ b/net-dns/nsd/files/nsd.cron
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+#
+NSDC_BIN="/usr/sbin/nsdc"
+
+if [[ -x ${NSDC_BIN} ]]; then
+ ${NSDC_BIN} update >>/dev/null 2>&1
+fi
diff --git a/net-dns/nsd/files/nsd.initd b/net-dns/nsd/files/nsd.initd
new file mode 100644
index 000000000..ad911c69c
--- /dev/null
+++ b/net-dns/nsd/files/nsd.initd
@@ -0,0 +1,61 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+#
+opts="${opts} rebuild reload status update notify"
+depend() {
+ need net
+ use logger
+}
+
+checkconfig() {
+ if [ ! -e "/etc/nsd/nsdc.conf" -a ! -e "/etc/nsd/nsd.zones" ]; then
+ eerror "You need to create apropriate configs"
+ eerror "in /etc/nsd/ . Examples can be found in /etc/nsd/*.sample"
+ return 1
+ fi
+}
+
+start() {
+ ebegin "Starting nsd"
+ checkconfig && \
+ /usr/sbin/nsdc start &>/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping nsd"
+ /usr/sbin/nsdc stop &>/dev/null
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading nsd"
+ /usr/sbin/nsdc reload &>/dev/null
+ eend $?
+}
+
+rebuild() {
+ ebegin "Rebuild nsd database"
+ /usr/sbin/nsdc rebuild &>/dev/null
+ eend $?
+}
+
+status() {
+ ebegin "Check if nsd is running"
+ /usr/sbin/nsdc running &>/dev/null
+ eend $?
+}
+
+update() {
+ ebegin "Updating nsd zones"
+ /usr/sbin/nsdc update &>/dev/null
+ eend $?
+}
+
+notify() {
+ ebegin "Notify slave servers for zones"
+ /usr/sbin/nsdc notify &>/dev/null
+ eend $?
+}
diff --git a/net-dns/nsd/nsd-2.3.5.ebuild b/net-dns/nsd/nsd-2.3.5.ebuild
new file mode 100644
index 000000000..d71aeec53
--- /dev/null
+++ b/net-dns/nsd/nsd-2.3.5.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils
+
+DESCRIPTION="an authoritative only, high performance, 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="axfr bind8-stats checking dnssec ipv6 plugins root-server ssl tsig"
+
+DEPEND="
+ ssl? ( >=dev-libs/openssl-0.9.7i )
+ tcpd? ( sys-apps/tcp-wrappers )
+ "
+
+pkg_setup() {
+ enewuser nsd -1 -1 /var/lib/nsd
+}
+
+src_compile() {
+ if use plugins; then
+ echo
+ ewarn
+ einfo "Plugin support is highly experimental!"
+ ewarn "Plugin support enabled!"
+ epause 10
+ fi
+
+ econf \
+ --with-user=nsd \
+ --with-dbfile=/var/lib/nsd/nsd.db \
+ --with-pidfile=/var/run/nsd/nsd.pid \
+ --with-zonesdir=/var/lib/nsd \
+ $(use_enable axfr) \
+ $(use_enable bind8-stats) \
+ $(use_enable checking) \
+ $(use_enable dnssec) \
+ $(use_enable ipv6) \
+ $(use_enable plugins) \
+ $(use_enable root-server) \
+ $(use_with ssl) \
+ $(use_enable tsig) || die "econf failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR=${D} install || die "emake install failed"
+
+ dodoc \
+ DIFFERENCES \
+ NSD-DATABASE \
+ README \
+ README.icc \
+ RELNOTES \
+ REQUIREMENTS \
+ CREDITS \
+ TODO
+
+ dobin nsdc.sh
+
+ exeinto /etc/cron.hourly
+ newexe ${FILESDIR}/nsd.cron nsd.cron
+
+ newinitd ${FILESDIR}/nsd.initd nsd
+
+ keepdir /var/run/nsd
+ fowners nsd /var/run/nsd
+ fperms 750 /var/run/nsd
+
+ keepdir /var/lib/nsd
+ fowners nsd /var/lib/nsd
+ fperms 750 /var/lib/nsd
+}