aboutsummaryrefslogtreecommitdiffstats
path: root/dns/dnrd
diff options
context:
space:
mode:
authorgarga <garga@FreeBSD.org>2005-09-06 20:10:46 +0800
committergarga <garga@FreeBSD.org>2005-09-06 20:10:46 +0800
commit7ddef8fe241130740fb91e88dd6c02303166cf06 (patch)
tree87a8b00964bd6d0cc3034d7f76ee2e42428d37b4 /dns/dnrd
parent203714254225766610af289ce6f5a76b5d7c0294 (diff)
downloadfreebsd-ports-gnome-7ddef8fe241130740fb91e88dd6c02303166cf06.tar.gz
freebsd-ports-gnome-7ddef8fe241130740fb91e88dd6c02303166cf06.tar.zst
freebsd-ports-gnome-7ddef8fe241130740fb91e88dd6c02303166cf06.zip
- Update to 2.20 [1]
- OPTIONS'ify - Use PORTDOCS - Remove 3 lines pkg-plist - Move dnrd.sh to dnrd.sh.in and use USE_RC_SUBR facility PR: ports/85744 [1] Submitted by: maintainer [1] Reworked by: myself Approved by: maintainer
Diffstat (limited to 'dns/dnrd')
-rw-r--r--dns/dnrd/Makefile35
-rw-r--r--dns/dnrd/distinfo4
-rw-r--r--dns/dnrd/files/dnrd.sh.in (renamed from dns/dnrd/files/dnrd.sh)0
-rw-r--r--dns/dnrd/pkg-install42
-rw-r--r--dns/dnrd/pkg-plist13
5 files changed, 68 insertions, 26 deletions
diff --git a/dns/dnrd/Makefile b/dns/dnrd/Makefile
index 5a47b587095b..dbc082018fd0 100644
--- a/dns/dnrd/Makefile
+++ b/dns/dnrd/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= dnrd
-PORTVERSION= 2.19.1
+PORTVERSION= 2.20
CATEGORIES= dns
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= dnrd
@@ -16,10 +16,25 @@ COMMENT= A proxy DNS daemon
USE_GMAKE= yes
USE_REINPLACE= yes
-USE_RC_SUBR= yes
+USE_RC_SUBR= ${PORTNAME}.sh
GNU_CONFIGURE= yes
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= PTHREAD_CFLAGS=${PTHREAD_CFLAGS} PTHREAD_LIBS=${PTHREAD_LIBS}
+CONFIGURE_ARGS+= --disable-dependency-tracking
+
+MAN8= dnrd.8
+DOCS= AUTHORS ChangeLog INSTALL README \
+ doc/README-cache doc/README-master doc/TODO
+EXAMPLES= doc/master.sample
+
+PORTDOCS= *
+PLIST_FILES= sbin/dnrd %%EXAMPLESDIR%%/master.sample
+PLIST_DIRS= %%EXAMPLESDIR%% etc/dnrd
+
+OPTIONS= TCP "Enable TCP support" off \
+ MASTER "Enable master file support" on
+
+.include <bsd.port.pre.mk>
.if defined(WITH_TCP)
CONFIGURE_ARGS+= --enable-tcp
@@ -29,17 +44,15 @@ CONFIGURE_ARGS+= --enable-tcp
CONFIGURE_ARGS+= --disable-master
.endif
-MAN8= dnrd.8
-DOCS= AUTHORS ChangeLog INSTALL README \
- doc/README-cache doc/README-master doc/TODO
-EXAMPLES= doc/master.sample
+pre-install:
+ @${ECHO} "==> Creating custom user to run dnrd..."
+ @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-post-patch:
- @${SED} -e 's|%%RC_SUBR%%|${RC_SUBR}|g' -e 's|%%PREFIX%%|${PREFIX}|' \
- ${FILESDIR}/dnrd.sh > ${WRKDIR}/dnrd.sh
+post-install:
+ @${ECHO} "==> Creating dnrd directory"
+ @${SETENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
do-install:
- ${INSTALL_SCRIPT} ${WRKDIR}/dnrd.sh ${PREFIX}/etc/rc.d/dnrd.sh
${INSTALL_PROGRAM} ${WRKSRC}/src/dnrd ${PREFIX}/sbin
${INSTALL_MAN} ${WRKSRC}/doc/dnrd.8 ${MAN8PREFIX}/man/man8
@${MKDIR} ${EXAMPLESDIR}
@@ -49,4 +62,4 @@ do-install:
cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/dns/dnrd/distinfo b/dns/dnrd/distinfo
index 4c2cc6a5c160..6986bc13564e 100644
--- a/dns/dnrd/distinfo
+++ b/dns/dnrd/distinfo
@@ -1,2 +1,2 @@
-MD5 (dnrd-2.19.1.tar.gz) = 58de30f0b09e333ca008444ca25848bc
-SIZE (dnrd-2.19.1.tar.gz) = 157686
+MD5 (dnrd-2.20.tar.gz) = 5adea655ede72738e65de00cd3c21b72
+SIZE (dnrd-2.20.tar.gz) = 157772
diff --git a/dns/dnrd/files/dnrd.sh b/dns/dnrd/files/dnrd.sh.in
index 9dcee18fab22..9dcee18fab22 100644
--- a/dns/dnrd/files/dnrd.sh
+++ b/dns/dnrd/files/dnrd.sh.in
diff --git a/dns/dnrd/pkg-install b/dns/dnrd/pkg-install
new file mode 100644
index 000000000000..7266a4efbc96
--- /dev/null
+++ b/dns/dnrd/pkg-install
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+
+USER=${DNRDUSER:-dnrd}
+GROUP=${USER}
+SYSCONF_DIR=${SYSCONF_DIR:-${PKG_PREFIX}/etc/dnrd}
+
+case $2 in
+ PRE-INSTALL)
+ if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
+ if pw groupadd ${GROUP}; then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ exit 1
+ fi
+ fi
+
+ if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
+ if pw useradd ${USER} -g ${GROUP} -h - \
+ -s "/sbin/nologin" -d "/var/empty" \
+ -c "DNRD daemon"; \
+ then
+ echo "Added user \"${USER}\"."
+ else
+ echo "Adding user \"${USER}\" failed..."
+ exit 1
+ fi
+ fi
+ ;;
+
+ POST-INSTALL)
+ if [ ! -d ${SYSCONF_DIR} ]; then
+ mkdir -p ${SYSCONF_DIR}
+ if [ ! -d ${SYSCONF_DIR} ]; then
+ echo "Creating \"${SYSCONF_DIR}\" failed."
+ exit 1
+ fi
+ fi
+ ;;
+esac
+exit 0
diff --git a/dns/dnrd/pkg-plist b/dns/dnrd/pkg-plist
deleted file mode 100644
index 39db0dae6af6..000000000000
--- a/dns/dnrd/pkg-plist
+++ /dev/null
@@ -1,13 +0,0 @@
-@comment $FreeBSD$
-etc/rc.d/dnrd.sh
-sbin/dnrd
-%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
-%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
-%%PORTDOCS%%%%DOCSDIR%%/INSTALL
-%%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%%%DOCSDIR%%/README-cache
-%%PORTDOCS%%%%DOCSDIR%%/README-master
-%%PORTDOCS%%%%DOCSDIR%%/TODO
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
-%%EXAMPLESDIR%%/master.sample
-@dirrm %%EXAMPLESDIR%%