diff options
author | dougb <dougb@FreeBSD.org> | 2012-01-16 08:26:17 +0800 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2012-01-16 08:26:17 +0800 |
commit | 45172883f1e0769e01c6e750feece35c2e72ad3b (patch) | |
tree | 5da10580407bd54f500d8f8a7920df820d06fb6b | |
parent | 55415dcab7e27d088d6f4c74041f7bb13d45499c (diff) | |
download | freebsd-ports-gnome-45172883f1e0769e01c6e750feece35c2e72ad3b.tar.gz freebsd-ports-gnome-45172883f1e0769e01c6e750feece35c2e72ad3b.tar.zst freebsd-ports-gnome-45172883f1e0769e01c6e750feece35c2e72ad3b.zip |
Properly fix the rc.d script patch, both for the set_rcvar change,
and generally improve the script (most of which was unneeded).
While I'm here, fix some other problems with the port:
1. Remove a dead MASTER_SITE
2. Make the rc.d script honor PREFIX
3. Install a link for /usr/local/bin/dnscheck-dispatcher so that
the rc.d script has something to start
Bump PORTREVISION due to package changes
-rw-r--r-- | dns/dnscheckengine/Makefile | 16 | ||||
-rw-r--r-- | dns/dnscheckengine/files/patch-contrib_dnscheck-dispatcher.sh | 59 |
2 files changed, 61 insertions, 14 deletions
diff --git a/dns/dnscheckengine/Makefile b/dns/dnscheckengine/Makefile index 6b13e79ee99c..ad6f222978e4 100644 --- a/dns/dnscheckengine/Makefile +++ b/dns/dnscheckengine/Makefile @@ -7,9 +7,9 @@ PORTNAME= dnscheckengine PORTVERSION= 1.1 +PORTREVISION= 1 CATEGORIES= dns perl5 -MASTER_SITES= http://opensource.iis.se/pub/dnscheck/ \ - ftp://www.ns.gen.tx.us/pub/software/dnscheck-se/ +MASTER_SITES= ftp://www.ns.gen.tx.us/pub/software/dnscheck-se/ DISTNAME= DNSCheck-1.1 MAINTAINER= dnscheckengine-port@academ.com @@ -33,10 +33,10 @@ PERL_CONFIGURE= yes CONFIGURE_SCRIPT+= Makefile.PL INSTALLSITESCRIPT=${PREFIX}/libexec/dnscheck WRKSRC= ${WRKDIR}/engine -# + DOCSDIR= ${PREFIX}/share/doc/DNSCheck DOCS= data-flow-batch.png DNSCheck.graffle data-flow-web.png call-flow.png database-schema.pdf -DOCSDB= indexes.sql schema.sql drop.sql +DOCSDB= indexes.sql schema.sql drop.sql PORTDOCS= ${DOCS} db SUB_FILES= pkg-install pkg-deinstall pkg-message @@ -82,15 +82,20 @@ MANCOMPRESSED= no post-patch: @${GREP} -Rl '%%[[:alpha:]]\+%%' ${WRKSRC} |${XARGS} ${REINPLACE_CMD} \ -e 's,%%PREFIX%%,${PREFIX},g' +.if defined(WITH_MYSQL) + @@${REINPLACE_CMD} -e "s#%%PREFIX%%#${PREFIX}#" ${WRKSRC}/contrib/dnscheck-dispatcher.sh +.endif pre-install: -@${FIND} ${WRKSRC} -name \*.orig -delete post-install: .if defined(WITH_MYSQL) -# install startup script (if WITH_MYSQL is defined) +# install startup script (if WITH_MYSQL is defined) @${INSTALL_SCRIPT} ${WRKSRC}/contrib/dnscheck-dispatcher.sh \ ${PREFIX}/etc/rc.d/dnscheck-dispatcher + @${LN} -s ${PREFIX}/libexec/dnscheck/dnscheck-dispatcher ${PREFIX}/bin/dnscheck-dispatcher + @${ECHO} bin/dnscheck-dispatcher >> ${TMPPLIST} .endif @PKG_PREFIX=${PREFIX} BATCH=${BATCH} SU_CMD="${SU_CMD}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .if !defined(NOPORTDOCS) @@ -101,4 +106,5 @@ post-install: .endif @${SED} -e 's#PREFIX#${PREFIX}#' ${PKGMESSAGE} + .include <bsd.port.mk> diff --git a/dns/dnscheckengine/files/patch-contrib_dnscheck-dispatcher.sh b/dns/dnscheckengine/files/patch-contrib_dnscheck-dispatcher.sh index bc9b80e8438f..001a190dc25f 100644 --- a/dns/dnscheckengine/files/patch-contrib_dnscheck-dispatcher.sh +++ b/dns/dnscheckengine/files/patch-contrib_dnscheck-dispatcher.sh @@ -1,14 +1,55 @@ - -$FreeBSD$ - ---- contrib/dnscheck-dispatcher.sh.orig -+++ contrib/dnscheck-dispatcher.sh -@@ -20,7 +20,7 @@ +--- contrib/dnscheck-dispatcher.sh.orig 2010-06-29 02:15:59.000000000 -0700 ++++ contrib/dnscheck-dispatcher.sh 2012-01-15 15:32:16.000000000 -0800 +@@ -6,45 +6,18 @@ + + # Add the following lines to /etc/rc.conf to enable the dnscheck-dispatcher daemon: + # +-#dnscheck_dispatcher_enable="YES" +- +-# +-# DO NOT CHANGE THESE DEFAULT VALUES HERE +-# SET THEM IN THE /etc/rc.conf FILE +-# +-utility_enable=${dnscheck_dispatcher_enable-"NO"} +-utility_flags=${dnscheck_dispatcher_flags-""} +-utility_pidfile=${dnscheck_dispatcher_pidfile-"/var/run/dnscheck_dispatcher.pid"} ++# dnscheck_dispatcher_enable="YES" + + . /etc/rc.subr name="dnscheck_dispatcher" - rcvar=dnscheck_dispatcher_enable +-rcvar=`set_rcvar` -command="/usr/local/bin/dnscheck-dispatcher" -+command="%%PREFIX%%/libexec/dnscheck/dnscheck-dispatcher" ++rcvar=dnscheck_dispatcher_enable + +-pidfile="${utility_pidfile}" ++load_rc_config $name - pidfile="${utility_pidfile}" +-start_cmd=dnscheck_dispatcher_start +-stop_cmd=dnscheck_dispatcher_stop +-status_cmd=dnscheck_dispatcher_status +- +-dnscheck_dispatcher_start() { +- /bin/echo "Starting ${name}." && \ +- /usr/bin/nice -5 ${command} ${utility_flags} ${command_args} +-} +- +- +-dnscheck_dispatcher_stop() { +- /bin/echo "Stopping ${name}." && \ +- /bin/kill -9 `cat ${utility_pidfile}` && /bin/rm ${utility_pidfile} +-} +- +-dnscheck_dispatcher_status() { +- if [ -e $utility_pidfile ] +- then echo "dnscheck_dispatcher is running as pid `cat ${utility_pidfile}`." +- else echo "dnscheck_dispatcher is not running." +- fi +-} ++dnscheck_dispatcher_enable=${dnscheck_dispatcher_enable-"NO"} ++pidfile=${dnscheck_dispatcher_pidfile-"/var/run/dnscheck_dispatcher.pid"} ++ ++command="%%PREFIX%%/bin/dnscheck-dispatcher" +-load_rc_config $name + run_rc_command "$1" |