- USE_RC_SUBR != yes

- clean up rc scripts
- portlint
- honor NOPORTEXAMPLES
This commit is contained in:
Philip M. Gollucci 2009-07-15 06:58:30 +00:00
parent 4070b4aa5a
commit 06b51d5ca3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=237854
5 changed files with 77 additions and 83 deletions

View File

@ -18,18 +18,14 @@ REINPLACE_ARGS= -i ""
USE_BZIP2= yes
MAKE_ENV= FLAGS="${CFLAGS} ${PTHREAD_CFLAGS}"
USE_RC_SUBR= yes
RC_SCRIPTS_SUB= PREFIX=${PREFIX} \
RC_SUBR=${RC_SUBR}
USE_RC_SUBR= ${PORTNAME} zoneserver
MAN1= askmara.1 getzone.1 fetchzone.1
MAN5= mararc.5 csv1.5 csv2.5 csv2_txt.5
MAN8= maradns.8 zoneserver.8 duende.8
#MANLANG= "" fr.ISO8859-1
post-patch:
@${FIND} ${WRKSRC} -type f | ${XARGS} ${REINPLACE_CMD} -e \
's|/etc/mara|${PREFIX}/etc/mara|g'
@${FIND} ${WRKSRC} -type f | ${XARGS} ${REINPLACE_CMD} -e 's|/etc/mara|${ETCDIR}|g'
@${FIND} ${WRKSRC} -name '*Makefile*' | ${XARGS} ${REINPLACE_CMD} -e \
's|make|\$$\{MAKE\}|g ; \
s|^FLAGS =|#FLAGS =|g ; \
@ -42,6 +38,7 @@ do-install:
${INSTALL_PROGRAM} ${WRKSRC}/tcp/zoneserver ${PREFIX}/sbin
${INSTALL_PROGRAM} ${WRKSRC}/tools/askmara ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/tools/duende ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/doc/en/man/askmara.1 ${MANPREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/doc/en/man/getzone.1 ${MANPREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/doc/en/man/fetchzone.1 ${MANPREFIX}/man/man1
@ -52,31 +49,22 @@ do-install:
${INSTALL_MAN} ${WRKSRC}/doc/en/man/csv1.5 ${MANPREFIX}/man/man5
${INSTALL_MAN} ${WRKSRC}/doc/en/man/csv2.5 ${MANPREFIX}/man/man5
${INSTALL_MAN} ${WRKSRC}/doc/en/man/csv2_txt.5 ${MANPREFIX}/man/man5
${INSTALL_DATA} ${WRKSRC}/doc/en/examples/example_full_mararc \
${PREFIX}/etc/mararc.sample
${MKDIR} ${PREFIX}/etc/maradns
${INSTALL_DATA} ${WRKSRC}/doc/en/examples/example_csv2 \
${PREFIX}/etc/maradns/example_csv2
${MKDIR} ${PREFIX}/etc/maradns/logger
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
'-e s!%%SERVICE%%!maradns!g' \
${FILESDIR}/rc_d.sh > ${PREFIX}/etc/rc.d/maradns.sh
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
'-e s!%%SERVICE%%!zoneserver!g' \
${FILESDIR}/rc_d.sh > ${PREFIX}/etc/rc.d/zoneserver.sh
@${CHMOD} 755 ${PREFIX}/etc/rc.d/maradns.sh
@${CHMOD} 755 ${PREFIX}/etc/rc.d/zoneserver.sh
@${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/doc/en/examples/* \
${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/doc/en/examples/example_full_mararc ${PREFIX}/etc/mararc.sample
${MKDIR} ${ETCDIR}/
${INSTALL_DATA} ${WRKSRC}/doc/en/examples/example_csv2 ${ETCDIR}/example_csv2
${MKDIR} ${ETCDIR}/logger
.ifndef(NOPORTEXAMPLES)
@${MKDIR} ${EXAMPLESDIR}/
${INSTALL_DATA} ${WRKSRC}/doc/en/examples/* ${EXAMPLESDIR}/
.endif
.ifndef(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}/en
${INSTALL_DATA} ${WRKSRC}/doc/en/*.* \
${DOCSDIR}/en
${INSTALL_DATA} ${WRKSRC}/doc/en/QuickStart \
${DOCSDIR}/en
${INSTALL_DATA} ${WRKSRC}/doc/en/README \
${DOCSDIR}/en
${INSTALL_DATA} ${WRKSRC}/doc/en/*.* ${DOCSDIR}/en
${INSTALL_DATA} ${WRKSRC}/doc/en/QuickStart ${DOCSDIR}/en
${INSTALL_DATA} ${WRKSRC}/doc/en/README ${DOCSDIR}/en
${CP} -R ${WRKSRC}/doc/en/misc ${DOCSDIR}/en
${CP} -R ${WRKSRC}/doc/en/pdf ${DOCSDIR}/en
${CP} -R ${WRKSRC}/doc/en/tutorial ${DOCSDIR}/en

View File

@ -0,0 +1,23 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: maradns
# REQUIRE: SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown
#
. %%RC_SUBR%%
name="maradns"
rcvar=`set_rcvar`
command="%%PREFIX%%/bin/duende"
pidfile="/var/run/${name}.pid"
load_rc_config $name
maradns_enable=${maradns_enable-"NO"}
run_rc_command "$1"

View File

@ -1,38 +0,0 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: %%SERVICE%%
# REQUIRE: SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown
#
# NOTE for FreeBSD 5.0+:
# If you want this script to start with the base rc scripts
# move %%SERVICE%%.sh to /etc/rc.d/%%SERVICE%%
prefix=%%PREFIX%%
# Define these %%SERVICE%%_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/%%SERVICE%%
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
%%SERVICE%%_enable=${%%SERVICE%%_enable-"NO"}
# %%SERVICE%%_flags can be something like "-f /path/alternate_rc"
. %%RC_SUBR%%
name="%%SERVICE%%"
rcvar=`set_rcvar`
command="${prefix}/bin/duende"
pidfile="/var/run/${name}.pid"
load_rc_config $name
flags="${prefix}/sbin/${name} ${%%SERVICE%%_flags}"
run_rc_command "$1"

View File

@ -0,0 +1,23 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: zonserver
# REQUIRE: SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown
#
. %%RC_SUBR%%
name="zonserver"
rcvar=`set_rcvar`
command="%%PREFIX%%/bin/duende"
pidfile="/var/run/${name}.pid"
load_rc_config $name
zonserver_enable=${zonserver_enable-"NO"}
run_rc_command "$1"

View File

@ -4,12 +4,10 @@ bin/duende
bin/getzone
bin/fetchzone
etc/mararc.sample
etc/rc.d/maradns.sh
etc/rc.d/zoneserver.sh
etc/maradns/example_csv2
@exec mkdir -p %D/etc/maradns/logger
@dirrmtry etc/maradns/logger
@dirrmtry etc/maradns
%%ETCDIR%%/example_csv2
@exec mkdir -p %D/%%ETCDIR%%/logger
@dirrmtry %%ETCDIR%%/logger
@dirrmtry %%ETCDIR%%
sbin/maradns
sbin/zoneserver
%%PORTDOCS%%%%DOCSDIR%%/en/QuickStart
@ -153,16 +151,16 @@ sbin/zoneserver
%%PORTDOCS%%%%DOCSDIR%%/en/tutorial/tutorial.html
%%PORTDOCS%%%%DOCSDIR%%/en/tutorial/update.html
%%PORTDOCS%%%%DOCSDIR%%/en/tutorial/win_service.html
%%EXAMPLESDIR%%/Makefile
%%EXAMPLESDIR%%/example_authoritative_mararc.txt
%%EXAMPLESDIR%%/example_csv1
%%EXAMPLESDIR%%/example_csv1.txt
%%EXAMPLESDIR%%/example_csv2
%%EXAMPLESDIR%%/example_full_mararc
%%EXAMPLESDIR%%/example_full_mararc.orig
%%EXAMPLESDIR%%/example_mararc
%%EXAMPLESDIR%%/example_recursive_mararc.txt
@dirrm %%EXAMPLESDIR%%
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Makefile
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_authoritative_mararc.txt
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_csv1
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_csv1.txt
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_csv2
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_full_mararc
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_full_mararc.orig
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_mararc
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example_recursive_mararc.txt
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
%%PORTDOCS%%@dirrm %%DOCSDIR%%/en/misc/advocacy
%%PORTDOCS%%@dirrm %%DOCSDIR%%/en/misc/compression
%%PORTDOCS%%@dirrm %%DOCSDIR%%/en/misc/csv2-1.4-ideas