svn commit: r345635 - head/dns/nsd

olli hauer ohauer at gmx.de
Sat Feb 22 13:58:12 UTC 2014


On 2014-02-22 14:14, Pawel Pekala wrote:
> Author: pawel
> Date: Sat Feb 22 13:14:55 2014
> New Revision: 345635
> URL: http://svnweb.freebsd.org/changeset/ports/345635
> QAT: https://qat.redports.org/buildarchive/r345635/
> 
> Log:
>   Prefer CONFIGURE_ENABLE over CONFIGURE_ON/OFF
>   
>   Suggested by:	mat@
> 


Hi Pawel,

some additional improvements

- remove pre-patch: (from svn r172885 / 2006-09-12)
  This enty is now 7+ years old, I suspect no one use this old options

- install PORTDOCS without (cd ${W... )
- remove pkg-(de)install and use pkg-plist instead
- the port use staging so remove the PKG-INSTALL scrip execution

-- 
Regards,
olli
-------------- next part --------------
Index: Makefile
===================================================================
--- Makefile	(revision 345635)
+++ Makefile	(working copy)
@@ -32,8 +32,7 @@
 		--with-dbfile=${NSDDBDIR}/nsd.db \
 		--with-pidfile=${NSDRUNDIR}/nsd.pid
 
-SUB_FILES=	pkg-install pkg-deinstall
-SUB_LIST+=	NSDUSER=${NSDUSER} \
+PLIST_SUB=	NSDUSER=${NSDUSER} \
 		NSDGROUP=${NSDGROUP} \
 		NSDDBDIR=${NSDDBDIR} \
 		NSDRUNDIR=${NSDRUNDIR}
@@ -77,26 +76,10 @@
 RRL_CONFIGURE_ENABLE=		ratelimit
 EUI_RRTYPES_CONFIGURE_ENABLE=	draft-rrtypes
 
-pre-patch:
-.if defined(NSD_OPTIONS)
-	@${ECHO_MSG}
-	@${ECHO_MSG}
-	@${ECHO_MSG}
-	@${ECHO_MSG} "***** ALERT *****"
-	@${ECHO_MSG} "NSD_OPTIONS is no longer supported,"
-	@${ECHO_MSG} "${PORTNAME} uses OPTIONS, consider running"
-	@${ECHO_MSG} "# make config"
-	@${ECHO_MSG}
-	@${ECHO_MSG}
-	@${ECHO_MSG}
-	@sleep 10
-.endif
-
 post-install:
 	${INSTALL_DATA} ${WRKSRC}/nsd.conf.sample \
 		${STAGEDIR}${PREFIX}/etc/nsd/nsd.conf.sample
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
-	(cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR})
-	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/|} ${STAGEDIR}${DOCSDIR}
 
 .include <bsd.port.mk>
Index: files/pkg-deinstall.in
===================================================================
--- files/pkg-deinstall.in	(revision 345635)
+++ files/pkg-deinstall.in	(working copy)
@@ -1,16 +0,0 @@
-#!/bin/sh
-# $FreeBSD$
-
-PATH="/bin:/sbin:/usr/bin:/usr/sbin"
-
-NSDDBDIR=%%NSDDBDIR%%
-NSDRUNDIR=%%NSDRUNDIR%%
-
-if [ "$2" = "POST-DEINSTALL" ]; then
-	echo "=> Deleting ${NSDDBDIR} if empty..."
-	rm -d ${NSDDBDIR}  2>/dev/null || true
-	echo "=> Deleting ${NSDRUNDIR} if empty..."
-	rm -d ${NSDRUNDIR} 2>/dev/null || true
-fi
-
-exit 0
Index: files/pkg-install.in
===================================================================
--- files/pkg-install.in	(revision 345635)
+++ files/pkg-install.in	(working copy)
@@ -1,19 +0,0 @@
-#!/bin/sh
-# $FreeBSD$
-
-PATH="/bin:/sbin:/usr/bin:/usr/sbin"
-
-NSDUSER=%%NSDUSER%%
-NSDGROUP=%%NSDGROUP%%
-NSDDBDIR=%%NSDDBDIR%%
-NSDRUNDIR=%%NSDRUNDIR%%
-
-CHOWN="chown"
-INSTALL_DIR="install -d -o ${NSDUSER} -g ${NSDGROUP} -m 0755"
-
-if [ "$2" = "POST-INSTALL" ]; then
-	${INSTALL_DIR} ${NSDDBDIR} ${NSDRUNDIR}
-	${CHOWN} -R ${NSDUSER}:${NSDGROUP} ${NSDDBDIR} ${NSDRUNDIR}
-fi
-
-exit 0
Index: pkg-plist
===================================================================
--- pkg-plist	(revision 345635)
+++ pkg-plist	(working copy)
@@ -7,4 +7,8 @@
 sbin/nsd-checkconf
 sbin/nsd-control
 sbin/nsd-control-setup
+ at exec install -o %%NSDUSER%% -g %%NSDGROUP%% -m 0755 -d %%NSDRUNDIR%%
+ at exec install -o %%NSDUSER%% -g %%NSDGROUP%% -m 0755 -d %%NSDDBDIR%%
 @dirrmtry %%ETCDIR%%
+ at unexec rmdir >/dev/null 2>&1 %%NSDRUNDIR%% || :
+ at unexec rmdir >/dev/null 2>&1 %%NSDDBDIR%% || :


More information about the svn-ports-all mailing list