aboutsummaryrefslogtreecommitdiffstats
path: root/dns
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2004-05-29 20:23:56 +0800
committerpav <pav@FreeBSD.org>2004-05-29 20:23:56 +0800
commitc9bf9a4a268d7ea00b99f7cd54792ea8f1b8254c (patch)
treec0be7730c3e3fdd3c67c3b52b234bb9a23c193a9 /dns
parentcf3c9ca9fa0eb7a7c2a9b22b746997f08641fbe8 (diff)
downloadfreebsd-ports-gnome-c9bf9a4a268d7ea00b99f7cd54792ea8f1b8254c.tar.gz
freebsd-ports-gnome-c9bf9a4a268d7ea00b99f7cd54792ea8f1b8254c.tar.zst
freebsd-ports-gnome-c9bf9a4a268d7ea00b99f7cd54792ea8f1b8254c.zip
- Add rc script
- Add a lot of knobs - Add second master site PR: ports/67297 Submitted by: Olafur Osvaldsson <oli@isnic.is> (maintainer)
Diffstat (limited to 'dns')
-rw-r--r--dns/nsd/Makefile81
-rw-r--r--dns/nsd/files/nsd.sh.tmpl33
-rw-r--r--dns/nsd/pkg-message5
-rw-r--r--dns/nsd/pkg-plist7
4 files changed, 117 insertions, 9 deletions
diff --git a/dns/nsd/Makefile b/dns/nsd/Makefile
index 77f061672a31..31ddc8515dcc 100644
--- a/dns/nsd/Makefile
+++ b/dns/nsd/Makefile
@@ -7,25 +7,94 @@
PORTNAME= nsd
PORTVERSION= 2.1.0
+PORTREVISION= 1
CATEGORIES= dns ipv6
-MASTER_SITES= http://www.nlnetlabs.nl/downloads/nsd/
+MASTER_SITES= http://www.nlnetlabs.nl/downloads/nsd/ \
+ ftp://ftp.rhnet.is/pub/nsd/
MAINTAINER= oli@isnic.is
COMMENT= An authoritative only non-recursive high performance name server
+USE_RC_SUBR= yes
+
+NSDUSER?= bind
+NSDDIR?= ${PREFIX}/etc/nsd
+NSDDBFILE?= /var/db/nsd.database
+NSDXFER?= /usr/libexec/named-xfer
+
GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --with-user=bind \
- --enable-ipv6 \
- --with-configdir=${PREFIX}/etc/nsd \
+CONFIGURE_ARGS= --with-user=${NSDUSER} \
+ --with-configdir=${NSDDIR} \
--with-pidfile=/var/run/nsd.pid \
- --with-dbfile=/var/db/nsd.database \
- --with-namedxfer=/usr/libexec/named-xfer \
+ --with-dbfile=${NSDDBFILE} \
+ --with-namedxfer=${NSDXFER} \
--with-libwrap
+.if defined(DISABLE_IPV6)
+CONFIGURE_ARGS+= --disable-ipv6
+.endif
+
+.if defined(DISABLE_AXFR)
+CONFIGURE_ARGS+= --disable-axfr
+.endif
+
+.if defined(ENABLE_PLUGINS)
+CONFIGURE_ARGS+= --enable-plugins
+.endif
+
+.if defined(ENABLE_BIND8_STATS)
+CONFIGURE_ARGS+= --enable-bind8-stats
+.endif
+
+.if defined(ENABLE_DNSSEC)
+CONFIGURE_ARGS+= --enable-dnssec
+.endif
+
+.if defined(ENABLE_ROOT_SERVER)
+CONFIGURE_ARGS+= --enable-root-server
+.endif
+
+.if defined(ENABLE_MMAP)
+CONFIGURE_ARGS+= --enable-mmap
+.endif
+
+SED_SCRIPT= -e 's,%%NSDUSER%%,${NSDUSER},g' \
+ -e 's,%%NSDDIR%%,${NSDDIR},g' \
+ -e 's,%%PREFIX%%,${PREFIX},g' \
+ -e 's,%%RC_SUBR%%,${RC_SUBR},g'
+
MAN8= nsd.8 zonec.8 nsdc.8 nsd-notify.8
+PORTDOCS= README RELNOTES CREDITS DIFFERENCES REQUIREMENTS
+
+pre-everything::
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "nsd has the following tunables:"
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} " DISABLE_IPV6 Disables IPv6 support"
+ @${ECHO_MSG} " DISABLE_AXFR Disables AXFR"
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} " ENABLE_PLUGINS Enable plugin support"
+ @${ECHO_MSG} " ENABLE_BIND8_STATS Enables BIND8 like NSTATS & XSTATS"
+ @${ECHO_MSG} " ENABLE_DNSSEC Enable experimental DNSSEC support"
+ @${ECHO_MSG} " according to the latest drafts"
+ @${ECHO_MSG} " ENABLE_ROOT_SERVER Configure NSD as a root server"
+ @${ECHO_MSG} " ENABLE_MMAP Configure NSD to load the database using mmap(2)"
+ @${ECHO_MSG} ""
+
+pre-build:
+
post-install:
+ ${SED} ${SED_SCRIPT} < ${FILESDIR}/nsd.sh.tmpl >${WRKDIR}/nsd.sh
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+.for f in ${PORTDOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
+.endfor
+.endif
${INSTALL_DATA} ${WRKSRC}/nsd.zones.sample \
${PREFIX}/etc/nsd/nsd.zones.sample
+ ${INSTALL_SCRIPT} ${WRKDIR}/nsd.sh ${PREFIX}/etc/rc.d/
+ @${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
diff --git a/dns/nsd/files/nsd.sh.tmpl b/dns/nsd/files/nsd.sh.tmpl
new file mode 100644
index 000000000000..0b6b35f1d65b
--- /dev/null
+++ b/dns/nsd/files/nsd.sh.tmpl
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: nsd
+# REQUIRE: DAEMON
+# KEYWORD: FreeBSD
+#
+# Add the following line to /etc/rc.conf to enable nsd:
+#
+# nsd_enable="YES"
+#
+
+. %%RC_SUBR%%
+
+name=nsd
+rcvar=`set_rcvar`
+
+prefix=%%PREFIX%%
+
+required_files=%%NSDDIR%%/nsd.zones
+
+command=/usr/local/sbin/${name}
+pidfile=/var/run/${name}.pid
+
+# set defaults
+
+nsd_enable=${nsd_enable:-"NO"}
+nsd_flags=${nsd_flags:-""}
+
+load_rc_config ${name}
+run_rc_command "$1"
+
diff --git a/dns/nsd/pkg-message b/dns/nsd/pkg-message
new file mode 100644
index 000000000000..efc30df0a615
--- /dev/null
+++ b/dns/nsd/pkg-message
@@ -0,0 +1,5 @@
+**************************************************************************
+* *
+* To run nsd from startup, add nsd_enable="YES" to your /etc/rc.conf *
+* *
+**************************************************************************
diff --git a/dns/nsd/pkg-plist b/dns/nsd/pkg-plist
index a9d74106d380..66d58f3b77e0 100644
--- a/dns/nsd/pkg-plist
+++ b/dns/nsd/pkg-plist
@@ -1,8 +1,9 @@
@comment $FreeBSD$
+etc/rc.d/nsd.sh
+etc/nsd/nsd.zones.sample
+etc/nsd/nsdc.conf.sample
sbin/nsd
+sbin/nsd-notify
sbin/nsdc
sbin/zonec
-sbin/nsd-notify
-etc/nsd/nsd.zones.sample
-etc/nsd/nsdc.conf.sample
@dirrm etc/nsd