aboutsummaryrefslogtreecommitdiffstats
path: root/dns
diff options
context:
space:
mode:
authorwg <wg@FreeBSD.org>2014-06-19 06:12:28 +0800
committerwg <wg@FreeBSD.org>2014-06-19 06:12:28 +0800
commitae0fa74609fac2459871b4e7dc2b5e4b83646889 (patch)
treea7d28f6ab58b095a8caf9e74ebdfe2083790dcd6 /dns
parent6b56c0dfdfac9717bc2ee6730d419fffba4f64af (diff)
downloadfreebsd-ports-gnome-ae0fa74609fac2459871b4e7dc2b5e4b83646889.tar.gz
freebsd-ports-gnome-ae0fa74609fac2459871b4e7dc2b5e4b83646889.tar.zst
freebsd-ports-gnome-ae0fa74609fac2459871b4e7dc2b5e4b83646889.zip
dns/credns: support stage
- Support stage - Use new options helpers - Pet portlint for WWW PR: 190933 (based on) Submitted by: maintainer
Diffstat (limited to 'dns')
-rw-r--r--dns/credns/Makefile65
-rw-r--r--dns/credns/files/credns.in1
-rw-r--r--dns/credns/files/pkg-deinstall.in16
-rw-r--r--dns/credns/files/pkg-install.in19
-rw-r--r--dns/credns/pkg-descr2
-rw-r--r--dns/credns/pkg-plist13
6 files changed, 34 insertions, 82 deletions
diff --git a/dns/credns/Makefile b/dns/credns/Makefile
index cfcadab5e628..f4fa415c348c 100644
--- a/dns/credns/Makefile
+++ b/dns/credns/Makefile
@@ -3,16 +3,19 @@
PORTNAME= credns
PORTVERSION= 0.2.10
+PORTREVISION= 1
CATEGORIES= dns security
MASTER_SITES= http://www.nlnetlabs.nl/downloads/credns/
MAINTAINER= jaap@NLnetLabs.nl
COMMENT= Verifier performing validation in the DNS notify/transfer-chain
+LICENSE= BSD3CLAUSE
+
USE_RC_SUBR= credns
-CREDNSUSER?= bind
-CREDNSGROUP?= bind
+USERS?= bind
+GROUPS?= bind
CREDNSLSDIR= /var
CREDNSDBDIR= /var/db/nsd
CREDNSRUNDIR= /var/run/nsd
@@ -24,61 +27,35 @@ CONFIGURE_ARGS= --with-user=${CREDNSUSER} \
--with-dbfile=${CREDNSDBDIR}/nsd.db \
--with-pidfile=${CREDNSRUNDIR}/nsd.pid
-SUB_FILES= pkg-install pkg-deinstall
-SUB_LIST+= CREDNSUSER=${CREDNSUSER} \
- CREDNSGROUP=${CREDNSGROUP} \
+SUB_LIST= CREDNSUSER=${USERS} \
+ CREDNSGROUP=${GROUPS} \
CREDNSDBDIR=${CREDNSDBDIR} \
CREDNSRUNDIR=${CREDNSRUNDIR}
+PLIST_SUB= CREDNSDBDIR=${CREDNSDBDIR} \
+ CREDNSRUNDIR=${CREDNSRUNDIR}
USE_OPENSSL= yes
-MAN5= credns.conf.5
-MAN8= credns-notify.8 credns-checkconf.8 credns-patch.8 \
- credns-xfer.8 credns.8 crednsc.8
-
-PORTDOCS= CREDITS ChangeLog LICENSE NSD-DATABASE NSD-DIFFFILE \
- NSD-CREDNS-MODS NSD-FOR-BIND-USERS NSD-README README \
- README.icc README.svn RELNOTES REQUIREMENTS TESTPLAN \
- TODO UPGRADING coding-style differences.pdf differences.tex
+PORTDOCS= *
OPTIONS_DEFINE= ROOT_SERVER IPV6 CHECKING MMAP MAXIPS DOCS
-ROOT_SERVER_DESC= Dnssexy as proxy for a (local) root
+OPTIONS_DEFAULT= IPV6
+
+ROOT_SERVER_DESC= Credns as proxy for a (local) root
CHECKING_DESC= Internal runtime checks
MMAP_DESC= Use mmap instead of malloc(experimental)
MAXIPS_DESC= Raise max-ips from 8 to ${NSDMAX_IPS}
-NO_STAGE= yes
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MROOT_SERVER}
-CONFIGURE_ARGS+= --enable-root-server
-.endif
-
-.if ${PORT_OPTIONS:MIPV6}
-CONFIGURE_ARGS+= --disable-ipv6
-.endif
-
-.if ${PORT_OPTIONS:MCHECKING}
-CONFIGURE_ARGS+= --enable-checking
-.endif
-
-.if ${PORT_OPTIONS:MMMAP}
-CONFIGURE_ARGS+= --enable-mmap
-.endif
-
-.if ${PORT_OPTIONS:MMAXIPS}
-CONFIGURE_ARGS+= --with-max-ips=${NSDMAX_IPS}
-.endif
+ROOT_SERVER_CONFIGURE_ENABLE= root-server
+IPV6_CONFIGURE_ENABLE= ipv6
+CHECKING_CONFIGURE_ENABLE= checking
+MMAP_CONFIGURE_ENABLE= mmap
+MAXIPS_CONFIGURE_ON= --with-max-ips=${NSDMAX_IPS}
post-install:
${INSTALL_DATA} ${WRKSRC}/credns.conf.sample \
- ${PREFIX}/etc/credns/credns.conf.sample
-.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}
-.for f in ${PORTDOCS}
- ${INSTALL_DATA} ${WRKSRC}/doc/${f} ${DOCSDIR}/${f}
-.endfor
-.endif
- @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ ${STAGEDIR}${PREFIX}/etc/credns/credns.conf.sample
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
.include <bsd.port.mk>
diff --git a/dns/credns/files/credns.in b/dns/credns/files/credns.in
index 9f2d9c15ae04..98981586bff4 100644
--- a/dns/credns/files/credns.in
+++ b/dns/credns/files/credns.in
@@ -35,6 +35,7 @@ stop_cmd="credns_stop"
credns_precmd()
{
+ /usr/bin/install -d -o %%CREDNSUSER%% -g %%CREDNSGROUP%% %%CREDNSDBDIR%% %%CREDNSRUNDIR%%
db=`%%PREFIX%%/sbin/credns-checkconf -o database %%PREFIX%%/etc/credns/credns.conf`
if [ ! -f "$db" ]; then
${command} rebuild
diff --git a/dns/credns/files/pkg-deinstall.in b/dns/credns/files/pkg-deinstall.in
deleted file mode 100644
index 551e1e6e3bfb..000000000000
--- a/dns/credns/files/pkg-deinstall.in
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-# $FreeBSD$
-
-PATH="/bin:/sbin:/usr/bin:/usr/sbin"
-
-CREDNSDBDIR=%%CREDNSDBDIR%%
-CREDNSRUNDIR=%%CREDNSRUNDIR%%
-
-if [ "$2" = "POST-DEINSTALL" ]; then
- echo "=> Deleting ${CREDNSDBDIR} if empty..."
- rm -d ${CREDNSDBDIR} 2>/dev/null || true
- echo "=> Deleting ${CREDNSRUNDIR} if empty..."
- rm -d ${CREDNSRUNDIR} 2>/dev/null || true
-fi
-
-exit 0
diff --git a/dns/credns/files/pkg-install.in b/dns/credns/files/pkg-install.in
deleted file mode 100644
index 753f17ed7543..000000000000
--- a/dns/credns/files/pkg-install.in
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-# $FreeBSD: ports/dns/nsd/files/pkg-install.in,v 1.1 2010/02/11 19:37:10 pgollucci Exp $
-
-PATH="/bin:/sbin:/usr/bin:/usr/sbin"
-
-CREDNSUSER=%%CREDNSUSER%%
-CREDNSGROUP=%%CREDNSGROUP%%
-CREDNSDBDIR=%%CREDNSDBDIR%%
-CREDNSRUNDIR=%%CREDNSRUNDIR%%
-
-CHOWN="chown"
-INSTALL_DIR="install -d -o ${CREDNSUSER} -g ${CREDNSGROUP} -m 0755"
-
-if [ "$2" = "POST-INSTALL" ]; then
- ${INSTALL_DIR} ${CREDNSDBDIR} ${CREDNSRUNDIR}
- ${CHOWN} -R ${CREDNSUSER}:${CREDNSGROUP} ${CREDNSDBDIR} ${CREDNSRUNDIR}
-fi
-
-exit 0
diff --git a/dns/credns/pkg-descr b/dns/credns/pkg-descr
index 779972d1743e..ff8ed0bda911 100644
--- a/dns/credns/pkg-descr
+++ b/dns/credns/pkg-descr
@@ -1,4 +1,4 @@
Credns is a software program aimed at fortifying DNSSEC by performing
validation in the DNS notify/transfer-chain.
-WWW: http://www.nlnetlabs.nl/projects/credns/
+WWW: http://www.nlnetlabs.nl/projects/credns
diff --git a/dns/credns/pkg-plist b/dns/credns/pkg-plist
index 3cd214debb5e..dfb044386210 100644
--- a/dns/credns/pkg-plist
+++ b/dns/credns/pkg-plist
@@ -1,8 +1,17 @@
+@sample %%ETCDIR%%/credns.conf.sample
+man/man5/credns.conf.5.gz
+man/man8/credns-checkconf.8.gz
+man/man8/credns-notify.8.gz
+man/man8/credns-patch.8.gz
+man/man8/credns-xfer.8.gz
+man/man8/credns.8.gz
+man/man8/crednsc.8.gz
sbin/credns
sbin/credns-checkconf
sbin/credns-notify
sbin/credns-patch
sbin/credns-xfer
sbin/crednsc
-etc/credns/credns.conf.sample
-@dirrmtry etc/credns
+@dirrmtry %%ETCDIR%%
+@dirrmtry %%CREDNSDBDIR%%
+@dirrmtry %%CREDNSRUNDIR%%