- remove pre-patch delay

- remove PKG-INSTALL from post-install (not used with staging)
- move pkg-install and pkg-deinstall into pkg-plist

Approved by:	Jaap Akkerhuis <jaap@NLnetLabs.nl> (maintainer, per PM)
This commit is contained in:
Olli Hauer 2014-02-23 23:31:43 +00:00
parent 434b969a4a
commit 6a316de552
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=345776
4 changed files with 9 additions and 55 deletions

View file

@ -3,7 +3,7 @@
PORTNAME= nsd
PORTVERSION= 4.0.1
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= dns ipv6
MASTER_SITES= http://www.nlnetlabs.nl/downloads/nsd/ \
ftp://ftp.rhnet.is/pub/nsd/
@ -32,8 +32,7 @@ CONFIGURE_ARGS= --with-libevent=${LOCALBASE} \
--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 @@ MAXIPS_CONFIGURE_ON= --with-max-ips=${NSDMAX_IPS}
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>

View file

@ -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

View file

@ -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

View file

@ -7,4 +7,10 @@ sbin/nsd
sbin/nsd-checkconf
sbin/nsd-control
sbin/nsd-control-setup
@exec install -o %%NSDUSER%% -g %%NSDGROUP%% -m 0755 -d %%NSDRUNDIR%%
@exec install -o %%NSDUSER%% -g %%NSDGROUP%% -m 0755 -d %%NSDDBDIR%%
@exec chown -R %%NSDUSER%%:%%NSDGROUP%% %%NSDRUNDIR%%
@exec chown -R %%NSDUSER%%:%%NSDGROUP%% %%NSDDBDIR%%
@dirrmtry %%ETCDIR%%
@dirrmtry %%NSDRUNDIR%%
@dirrmtry %%NSDDBDIR%%