- Use SUB_FILES for named.conf and the rc script

- Fix some package installation warnings

Sponsored by:	Absolight
This commit is contained in:
Mathieu Arnold 2014-03-17 18:46:47 +00:00
parent 42d597ff94
commit 5a324458e6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=348497
8 changed files with 16 additions and 24 deletions

View file

@ -2,7 +2,7 @@
PORTNAME= bind
PORTVERSION= 9.8.7
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= dns net ipv6
MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= bind9/${ISCVERSION}
@ -147,9 +147,12 @@ PKGDEINSTALL= ${PKGINSTALL}
CONFIGURE_ARGS+= --prefix=${PREFIX} \
--sysconfdir=${BIND_DESTETC}
PLIST_SUB+= BIND_DESTETC="${BIND_DESTETC}"
SUB_LIST+= BIND_DESTETC="${BIND_DESTETC}"
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1000100
PLIST_SUB+= NOBASE="" BASE="@comment "
USE_RC_SUBR+= named
SUB_FILES+= named.conf
.else
PLIST_SUB+= NOBASE="@comment " BASE=""
.endif
@ -185,12 +188,6 @@ post-install:
.endif
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1000100
.for FILE in named named.conf
${SED} -e 's#%%PREFIX%%#${PREFIX}#g' \
-e 's#%%BIND_DESTETC%%#${BIND_DESTETC}#g' \
${FILESDIR}/${FILE} > ${WRKDIR}/${FILE}
.endfor
${INSTALL_SCRIPT} ${WRKDIR}/named ${STAGEDIR}${PREFIX}/etc/rc.d
${MKDIR} ${STAGEDIR}${BIND_DESTETC}
.for i in dynamic master slave working
@${MKDIR} ${STAGEDIR}${BIND_DESTETC}/$i

View file

@ -337,7 +337,6 @@ sbin/nsec3hash
sbin/rndc
sbin/rndc-confgen
%%BASE%%@unexec rm -f %%BIND_DESTETC%%/rndc.conf.sample
%%NOBASE%%etc/rc.d/named
%%NOBASE%%@unexec if cmp -s %D/%%ETCDIR%%/rndc.conf.sample %D/%%ETCDIR%%/rndc.conf; then rm -f %D/%%ETCDIR%%/rndc.conf; fi
%%NOBASE%%%%ETCDIR%%/rndc.conf.sample
%%NOBASE%%@exec if [ ! -f %D/%%ETCDIR%%/rndc.conf ] ; then cp -p %D/%F %B/rndc.conf; fi
@ -348,16 +347,16 @@ sbin/rndc-confgen
%%NOBASE%%%%ETCDIR%%/master/empty.db
%%NOBASE%%%%ETCDIR%%/master/localhost-forward.db
%%NOBASE%%%%ETCDIR%%/master/localhost-reverse.db
%%NOBASE%%@exec mkdir %D/%%ETCDIR%%/dynamic
%%NOBASE%%@exec mkdir -p %D/%%ETCDIR%%/dynamic
%%NOBASE%%@exec chown bind:bind %D/%%ETCDIR%%/dynamic
%%NOBASE%%@dirrmtry %%ETCDIR%%/dynamic
%%NOBASE%%@exec mkdir %D/%%ETCDIR%%/master
%%NOBASE%%@exec mkdir -p %D/%%ETCDIR%%/master
%%NOBASE%%@exec chown bind:bind %D/%%ETCDIR%%/master
%%NOBASE%%@dirrmtry %%ETCDIR%%/master
%%NOBASE%%@exec mkdir %D/%%ETCDIR%%/slave
%%NOBASE%%@exec mkdir -p %D/%%ETCDIR%%/slave
%%NOBASE%%@exec chown bind:bind %D/%%ETCDIR%%/slave
%%NOBASE%%@dirrmtry %%ETCDIR%%/slave
%%NOBASE%%@exec mkdir %D/%%ETCDIR%%/working
%%NOBASE%%@exec mkdir -p %D/%%ETCDIR%%/working
%%NOBASE%%@exec chown bind:bind %D/%%ETCDIR%%/working
%%NOBASE%%@dirrmtry %%ETCDIR%%/working
%%NOBASE%%@dirrmtry %%ETCDIR%%

View file

@ -2,7 +2,7 @@
PORTNAME= bind
PORTVERSION= 9.9.5
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= dns net ipv6
MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= bind9/${ISCVERSION}
@ -159,9 +159,12 @@ PKGDEINSTALL= ${PKGINSTALL}
CONFIGURE_ARGS+= --prefix=${PREFIX} \
--sysconfdir=${BIND_DESTETC}
PLIST_SUB+= BIND_DESTETC="${BIND_DESTETC}"
SUB_LIST+= BIND_DESTETC="${BIND_DESTETC}"
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1000100
PLIST_SUB+= NOBASE="" BASE="@comment "
USE_RC_SUBR+= named
SUB_FILES+= named.conf
.else
PLIST_SUB+= NOBASE="@comment " BASE=""
.endif
@ -198,12 +201,6 @@ post-install:
.endif
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1000100
.for FILE in named named.conf
${SED} -e 's#%%PREFIX%%#${PREFIX}#g' \
-e 's#%%BIND_DESTETC%%#${BIND_DESTETC}#g' \
${FILESDIR}/${FILE} > ${WRKDIR}/${FILE}
.endfor
${INSTALL_SCRIPT} ${WRKDIR}/named ${STAGEDIR}${PREFIX}/etc/rc.d
${MKDIR} ${STAGEDIR}${BIND_DESTETC}
.for i in dynamic master slave working
@${MKDIR} ${STAGEDIR}${BIND_DESTETC}/$i

View file

@ -342,7 +342,6 @@ sbin/nsec3hash
sbin/rndc
sbin/rndc-confgen
%%BASE%%@unexec rm -f %%BIND_DESTETC%%/rndc.conf.sample
%%NOBASE%%etc/rc.d/named
%%NOBASE%%@unexec if cmp -s %D/%%ETCDIR%%/rndc.conf.sample %D/%%ETCDIR%%/rndc.conf; then rm -f %D/%%ETCDIR%%/rndc.conf; fi
%%NOBASE%%%%ETCDIR%%/rndc.conf.sample
%%NOBASE%%@exec if [ ! -f %D/%%ETCDIR%%/rndc.conf ] ; then cp -p %D/%F %B/rndc.conf; fi
@ -353,16 +352,16 @@ sbin/rndc-confgen
%%NOBASE%%%%ETCDIR%%/master/empty.db
%%NOBASE%%%%ETCDIR%%/master/localhost-forward.db
%%NOBASE%%%%ETCDIR%%/master/localhost-reverse.db
%%NOBASE%%@exec mkdir %D/%%ETCDIR%%/dynamic
%%NOBASE%%@exec mkdir -p %D/%%ETCDIR%%/dynamic
%%NOBASE%%@exec chown bind:bind %D/%%ETCDIR%%/dynamic
%%NOBASE%%@dirrmtry %%ETCDIR%%/dynamic
%%NOBASE%%@exec mkdir %D/%%ETCDIR%%/master
%%NOBASE%%@exec mkdir -p %D/%%ETCDIR%%/master
%%NOBASE%%@exec chown bind:bind %D/%%ETCDIR%%/master
%%NOBASE%%@dirrmtry %%ETCDIR%%/master
%%NOBASE%%@exec mkdir %D/%%ETCDIR%%/slave
%%NOBASE%%@exec mkdir -p %D/%%ETCDIR%%/slave
%%NOBASE%%@exec chown bind:bind %D/%%ETCDIR%%/slave
%%NOBASE%%@dirrmtry %%ETCDIR%%/slave
%%NOBASE%%@exec mkdir %D/%%ETCDIR%%/working
%%NOBASE%%@exec mkdir -p %D/%%ETCDIR%%/working
%%NOBASE%%@exec chown bind:bind %D/%%ETCDIR%%/working
%%NOBASE%%@dirrmtry %%ETCDIR%%/working
%%NOBASE%%@dirrmtry %%ETCDIR%%