Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/dns/curvedns/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- Makefile	25 Mar 2011 20:16:51 -0000	1.2
+++ Makefile	4 Jul 2011 18:31:26 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=		curvedns
 PORTVERSION=		0.88.b
+PORTREVISION=		1
 CATEGORIES=		dns
 MASTER_SITES=		http://curvedns.on2it.net/releases/
 DISTNAME=		curvedns-0.88-unstable
@@ -22,16 +23,12 @@
 CONFIGURE_SCRIPT=	configure.nacl
 ALL_TARGET=		# yes, an empty target.
 
-CURVE_USER=		bind
-CURVE_GROUP=		bind
+USERS=			bind
+GROUPS=			bind
 CURVE_UID=		53
 CURVE_GID=		53
 
-SUB_FILES=		pkg-install pkg-message pkg-deinstall
-SUB_LIST=		CURVE_USER=${CURVE_USER} \
-			CURVE_GROUP=${CURVE_GROUP} \
-			CURVE_UID=${CURVE_UID} \
-			CURVE_GID=${CURVE_GID}
+SUB_FILES=		pkg-message
 
 .include <bsd.port.pre.mk>
 
@@ -51,14 +48,14 @@
 post-install:
 	${CP} ${WRKSRC}/curvedns ${WRKSRC}/curvedns-keygen ${PREFIX}/bin/
 	${MKDIR} ${PREFIX}/etc/curvedns/log ${PREFIX}/etc/curvedns/env
-	${CP} ${WRKSRC}/contrib/curvedns-run ${PREFIX}/etc/curvedns/run
-	${CP} ${WRKSRC}/contrib/curvedns-log-run ${PREFIX}/etc/curvedns/log/run
-	${ECHO} ${CURVE_UID} > ${PREFIX}/etc/curvedns/env/UID
-	${ECHO} ${CURVE_GID} > ${PREFIX}/etc/curvedns/env/GID
+	${CP} ${WRKSRC}/contrib/curvedns-run ${PREFIX}/etc/curvedns/run.sample
+	${CP} ${WRKSRC}/contrib/curvedns-log-run ${PREFIX}/etc/curvedns/log/run.sample
+	${ECHO_CMD} ${CURVE_UID} > ${PREFIX}/etc/curvedns/env/UID
+	${ECHO_CMD} ${CURVE_GID} > ${PREFIX}/etc/curvedns/env/GID
 	${CHOWN} -R ${CURVE_UID}:${CURVE_GID} ${PREFIX}/etc/curvedns
-	${CHMOD} 755 ${PREFIX}/etc/curvedns/run ${PREFIX}/etc/curvedns/log/run
+	${CHMOD} 755 ${PREFIX}/etc/curvedns/run.sample \
+		${PREFIX}/etc/curvedns/log/run.sample
 	${CHMOD} 0700 ${PREFIX}/etc/curvedns/env
-	${SH} ${PKGINSTALL}
 	@${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.post.mk>
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/dns/curvedns/pkg-plist,v
retrieving revision 1.1
diff -u -r1.1 pkg-plist
--- pkg-plist	4 Mar 2011 13:45:40 -0000	1.1
+++ pkg-plist	4 Jul 2011 18:31:26 -0000
@@ -1,3 +1,13 @@
 bin/curvedns
 bin/curvedns-keygen
-@dirrmtry etc/curvedns
+%%ETCDIR%%/env/UID
+%%ETCDIR%%/env/GID
+@unexec cmp -s %B/%F %B/run && rm -f %B/run || true
+%%ETCDIR%%/run.sample
+@exec [ -f %%ETCDIR%%/run ] || cp -p %%ETCDIR%%/run.sample %%ETCDIR%%/run
+@unexec cmp -s %B/%F %B/run && rm -f %B/run || true
+%%ETCDIR%%/log/run.sample
+@exec [ -f %%ETCDIR%%/log/run ] || cp -p %%ETCDIR%%/log/run.sample %%ETCDIR%%/log/run
+@dirrmtry %%ETCDIR%%/env
+@dirrmtry %%ETCDIR%%/log
+@dirrmtry %%ETCDIR%%
Index: files/pkg-deinstall.in
===================================================================
RCS file: files/pkg-deinstall.in
diff -N files/pkg-deinstall.in
--- files/pkg-deinstall.in	4 Mar 2011 13:45:40 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,6 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: ports/dns/curvedns/files/pkg-deinstall.in,v 1.1 2011/03/04 13:45:40 miwi Exp $
-#
-
-rm -rf %%PREFIX%%/etc/curvedns
Index: files/pkg-install.in
===================================================================
RCS file: files/pkg-install.in
diff -N files/pkg-install.in
--- files/pkg-install.in	4 Mar 2011 13:45:40 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,25 +0,0 @@
-#!/bin/sh
-# $FreeBSD: ports/dns/curvedns/files/pkg-install.in,v 1.1 2011/03/04 13:45:40 miwi Exp $
-
-if ! pw groupshow %%CURVE_GROUP%% 2>/dev/null 1>&2; then
-	if pw groupadd %%CURVE_GROUP%% -g %%CURVE_GID%%; then
-		echo "Added group %%CURVE_GROUP%%"
-	else
-		echo "Adding group %%CURVE_GROUP%% failed..."
-		exit 1
-	fi
-fi
-
-if ! pw usershow %%CURVE_USER%% 2>/dev/null 1>&2; then
-	if pw useradd %%CURVE_USER%% -u %%CURVE_UID%% -g %%CURVE_GROUP%% -h - \
-		-s "/usr/sbin/nologin" -d "/" \
-		-c "Bind Sandbox"; \
-	then
-		echo "Added user %%CURVE_USER%%"
-	else
-		echo "Adding user %%CURVE_USER%% failed..."
-		exit 1
-	fi
-fi
-
-exit 0
Index: files/pkg-message.in
===================================================================
RCS file: /home/pcvs/ports/dns/curvedns/files/pkg-message.in,v
retrieving revision 1.1
diff -u -r1.1 pkg-message.in
--- files/pkg-message.in	4 Mar 2011 13:45:40 -0000	1.1
+++ files/pkg-message.in	4 Jul 2011 18:31:26 -0000
@@ -7,6 +7,8 @@
 
 ------- configure -----------------------------------------
  $EDITOR %%PREFIX%%/etc/curvedns/run
+ # set user to "bind" (required)
+ # adjust IP / ports (if desired)
 
 ------- prepare/startup -----------------------------------
  mkdir /var/service
