diff options
-rw-r--r-- | sysutils/doinkd/Makefile | 23 | ||||
-rw-r--r-- | sysutils/doinkd/files/idled.sh | 50 | ||||
-rw-r--r-- | sysutils/doinkd/pkg-plist | 2 | ||||
-rw-r--r-- | sysutils/idled/Makefile | 23 | ||||
-rw-r--r-- | sysutils/idled/files/idled.sh | 50 | ||||
-rw-r--r-- | sysutils/idled/pkg-plist | 2 |
6 files changed, 100 insertions, 50 deletions
diff --git a/sysutils/doinkd/Makefile b/sysutils/doinkd/Makefile index 437abecb218b..0bbdfa9f56c8 100644 --- a/sysutils/doinkd/Makefile +++ b/sysutils/doinkd/Makefile @@ -7,7 +7,7 @@ PORTNAME= idled PORTVERSION= 1.16 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= http://www.darkwing.com/idled/download/ \ ftp://ftp.cs.hope.edu/pub/idled/ @@ -20,14 +20,25 @@ MANCOMPRESSED= yes MAN5= idled.cf.5 MAN8= idled.8 +SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' + +USE_RC_SUBR= yes +RC_DIR= ${PREFIX}/etc/rc.d +RC_SUFX= .sh +SED_SCRIPT+= -e 's|%%RC_SUBR%%|${RC_SUBR}|g' \ + -e 's|%%RC_DIR%%|${RC_DIR}|g' \ + -e 's|%%RC_SUFX%%|${RC_SUFX}|g' +PLIST_SUB+= RC_DIR=${RC_DIR} \ + RC_SUFX=${RC_SUFX} + post-extract: (cd ${WRKSRC}; make clean) +post-build: + @${SED} ${SED_SCRIPT} ${FILESDIR}/idled.sh >${WRKDIR}/idled.sh + post-install: - ${STRIP_CMD} ${PREFIX}/libexec/idled -.if !exists(${PREFIX}/etc/rc.d/idled.sh) - @${ECHO} "Installing ${PREFIX}/etc/rc.d/idled.sh startup script." - ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/idled.sh ${PREFIX}/etc/rc.d/idled.sh -.endif + @${INSTALL_SCRIPT} ${WRKDIR}/idled.sh ${RC_DIR}/idled${RC_SUFX} + @${STRIP_CMD} ${PREFIX}/libexec/idled .include <bsd.port.mk> diff --git a/sysutils/doinkd/files/idled.sh b/sysutils/doinkd/files/idled.sh index 35c75289f80a..3021a54fe4ad 100644 --- a/sysutils/doinkd/files/idled.sh +++ b/sysutils/doinkd/files/idled.sh @@ -1,19 +1,33 @@ #!/bin/sh -case "$1" in - stop) - killall -TERM idled - echo "idled stopped" - ;; - restart) - killall -TERM idled - /usr/local/libexec/idled - echo "idled restarted" - ;; - -h) - echo "Usage: `basename $0` { start | stop | restart }" - ;; - *) # includes start - /usr/local/libexec/idled - echo -n ' idled' - ;; -esac +# +# $FreeBSD$ +# + +# PROVIDE: idled +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: FreeBSD shutdown + +# +# Add the following lines to /etc/rc.conf to enable idled: +# +#idled_enable="YES" +# +# See idled(8) for flags +# + +. %%RC_SUBR%% + +name=idled +rcvar=`set_rcvar` + +command=%%PREFIX%%/libexec/idled +required_files=%%PREFIX%%/etc/idled.cf + +# set defaults + +idled_enable=${idled_enable:-"NO"} +idled_flags=${idled_flags:-""} + +load_rc_config $name +run_rc_command "$1" diff --git a/sysutils/doinkd/pkg-plist b/sysutils/doinkd/pkg-plist index 079138685481..84c49d6599ef 100644 --- a/sysutils/doinkd/pkg-plist +++ b/sysutils/doinkd/pkg-plist @@ -1,3 +1,3 @@ etc/idled.cf.template -etc/rc.d/idled.sh +etc/rc.d/idled%%RC_SUFX%% libexec/idled diff --git a/sysutils/idled/Makefile b/sysutils/idled/Makefile index 437abecb218b..0bbdfa9f56c8 100644 --- a/sysutils/idled/Makefile +++ b/sysutils/idled/Makefile @@ -7,7 +7,7 @@ PORTNAME= idled PORTVERSION= 1.16 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= http://www.darkwing.com/idled/download/ \ ftp://ftp.cs.hope.edu/pub/idled/ @@ -20,14 +20,25 @@ MANCOMPRESSED= yes MAN5= idled.cf.5 MAN8= idled.8 +SED_SCRIPT= -e 's|%%PREFIX%%|${PREFIX}|g' + +USE_RC_SUBR= yes +RC_DIR= ${PREFIX}/etc/rc.d +RC_SUFX= .sh +SED_SCRIPT+= -e 's|%%RC_SUBR%%|${RC_SUBR}|g' \ + -e 's|%%RC_DIR%%|${RC_DIR}|g' \ + -e 's|%%RC_SUFX%%|${RC_SUFX}|g' +PLIST_SUB+= RC_DIR=${RC_DIR} \ + RC_SUFX=${RC_SUFX} + post-extract: (cd ${WRKSRC}; make clean) +post-build: + @${SED} ${SED_SCRIPT} ${FILESDIR}/idled.sh >${WRKDIR}/idled.sh + post-install: - ${STRIP_CMD} ${PREFIX}/libexec/idled -.if !exists(${PREFIX}/etc/rc.d/idled.sh) - @${ECHO} "Installing ${PREFIX}/etc/rc.d/idled.sh startup script." - ${INSTALL_SCRIPT} -m 751 ${FILESDIR}/idled.sh ${PREFIX}/etc/rc.d/idled.sh -.endif + @${INSTALL_SCRIPT} ${WRKDIR}/idled.sh ${RC_DIR}/idled${RC_SUFX} + @${STRIP_CMD} ${PREFIX}/libexec/idled .include <bsd.port.mk> diff --git a/sysutils/idled/files/idled.sh b/sysutils/idled/files/idled.sh index 35c75289f80a..3021a54fe4ad 100644 --- a/sysutils/idled/files/idled.sh +++ b/sysutils/idled/files/idled.sh @@ -1,19 +1,33 @@ #!/bin/sh -case "$1" in - stop) - killall -TERM idled - echo "idled stopped" - ;; - restart) - killall -TERM idled - /usr/local/libexec/idled - echo "idled restarted" - ;; - -h) - echo "Usage: `basename $0` { start | stop | restart }" - ;; - *) # includes start - /usr/local/libexec/idled - echo -n ' idled' - ;; -esac +# +# $FreeBSD$ +# + +# PROVIDE: idled +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: FreeBSD shutdown + +# +# Add the following lines to /etc/rc.conf to enable idled: +# +#idled_enable="YES" +# +# See idled(8) for flags +# + +. %%RC_SUBR%% + +name=idled +rcvar=`set_rcvar` + +command=%%PREFIX%%/libexec/idled +required_files=%%PREFIX%%/etc/idled.cf + +# set defaults + +idled_enable=${idled_enable:-"NO"} +idled_flags=${idled_flags:-""} + +load_rc_config $name +run_rc_command "$1" diff --git a/sysutils/idled/pkg-plist b/sysutils/idled/pkg-plist index 079138685481..84c49d6599ef 100644 --- a/sysutils/idled/pkg-plist +++ b/sysutils/idled/pkg-plist @@ -1,3 +1,3 @@ etc/idled.cf.template -etc/rc.d/idled.sh +etc/rc.d/idled%%RC_SUFX%% libexec/idled |