diff options
author | pgollucci <pgollucci@FreeBSD.org> | 2010-02-01 10:19:04 +0800 |
---|---|---|
committer | pgollucci <pgollucci@FreeBSD.org> | 2010-02-01 10:19:04 +0800 |
commit | 5373e99f4b0497f49e5c6521cba8ecdf413bd79a (patch) | |
tree | d2f9f6f6d70f1be8f69f4c1c0a4e8b3c9726b855 | |
parent | 0246de47fa2ef4d7ee4cf39d41491dd3a5c40290 (diff) | |
download | freebsd-ports-gnome-5373e99f4b0497f49e5c6521cba8ecdf413bd79a.tar.gz freebsd-ports-gnome-5373e99f4b0497f49e5c6521cba8ecdf413bd79a.tar.zst freebsd-ports-gnome-5373e99f4b0497f49e5c6521cba8ecdf413bd79a.zip |
- Update rc script, use $SUB_FILES to update pkg-message
PR: ports/143181
Submitted by: Sevan Janiyan <venture37@geeklan.co.uk>
-rw-r--r-- | net-mgmt/rotorouter/Makefile | 19 | ||||
-rw-r--r-- | net-mgmt/rotorouter/files/pkg-message.in (renamed from net-mgmt/rotorouter/pkg-message) | 0 | ||||
-rw-r--r-- | net-mgmt/rotorouter/files/rotorouter.in (renamed from net-mgmt/rotorouter/files/rotorouter.sh) | 8 | ||||
-rw-r--r-- | net-mgmt/rotorouter/pkg-plist | 1 |
4 files changed, 11 insertions, 17 deletions
diff --git a/net-mgmt/rotorouter/Makefile b/net-mgmt/rotorouter/Makefile index b4622113ae02..0ad787003252 100644 --- a/net-mgmt/rotorouter/Makefile +++ b/net-mgmt/rotorouter/Makefile @@ -19,28 +19,25 @@ COMMENT= Traceroute attempt logger and result spoofer NO_WRKSUBDIR= yes -SED_SCRIPT+= -e 's,%%PREFIX%%,${PREFIX},g' \ - -e 's,%%RC_SUBR%%,${RC_SUBR},g' +SUB_FILES= pkg-message -.include <bsd.port.pre.mk> +USE_RC_SUBR= rotorouter -USE_RC_SUBR= yes +.include <bsd.port.pre.mk> do-extract: - ${MKDIR} ${WRKSRC} - ${CP} ${FILESDIR}/rotorouter.c ${WRKSRC} + ${MKDIR} ${WRKSRC}/src + ${CP} ${FILESDIR}/rotorouter.c ${WRKSRC}/src do-build: - ${CC} -lpcap -o ${WRKSRC}/rotorouter ${WRKSRC}/rotorouter.c - ${SED} ${SED_SCRIPT} < ${FILESDIR}/rotorouter.sh > ${WRKSRC}/rotorouter.sh + ${CC} -lpcap -o ${WRKSRC}/src/rotorouter ${WRKSRC}/src/rotorouter.c do-install: @${INSTALL_DATA} -m 640 ${FILESDIR}/rotorouter.conf-example ${PREFIX}/etc @${INSTALL_DATA} -m 640 ${FILESDIR}/rotorouter.conf-example ${PREFIX}/etc/rotorouter.conf - @${INSTALL_PROGRAM} ${WRKSRC}/rotorouter ${PREFIX}/sbin/ - @${INSTALL_SCRIPT} -m 751 ${WRKSRC}/rotorouter.sh ${PREFIX}/etc/rc.d/rotorouter.sh + @${INSTALL_PROGRAM} ${WRKSRC}/src/rotorouter ${PREFIX}/sbin post-install: - @${SED} ${SED_SCRIPT} < ${PKGMESSAGE} + @${CAT} ${PKGMESSAGE} .include <bsd.port.post.mk> diff --git a/net-mgmt/rotorouter/pkg-message b/net-mgmt/rotorouter/files/pkg-message.in index 800a601e223f..800a601e223f 100644 --- a/net-mgmt/rotorouter/pkg-message +++ b/net-mgmt/rotorouter/files/pkg-message.in diff --git a/net-mgmt/rotorouter/files/rotorouter.sh b/net-mgmt/rotorouter/files/rotorouter.in index f28e61b5227e..775c617bdc61 100644 --- a/net-mgmt/rotorouter/files/rotorouter.sh +++ b/net-mgmt/rotorouter/files/rotorouter.in @@ -15,20 +15,18 @@ # See rotorouter(8) for flags. # -. %%RC_SUBR%% +. /etc/rc.subr name=rotorouter -rcvar=`set_rcvar` +rcvar=${name}_enable command=%%PREFIX%%/sbin/${name} -# set defaults +load_rc_config $name rotorouter_enable=${rotorouter_enable:-"NO"} rotorouter_flags="${rotorouter_flags:--h %%PREFIX%%/etc/rotorouter.conf}" rotorouter_flags="${rotorouter_flags} &" -load_rc_config $name run_rc_command "$1" - diff --git a/net-mgmt/rotorouter/pkg-plist b/net-mgmt/rotorouter/pkg-plist index 2936c4fe4a1d..ba5c7ea7a498 100644 --- a/net-mgmt/rotorouter/pkg-plist +++ b/net-mgmt/rotorouter/pkg-plist @@ -1,4 +1,3 @@ sbin/rotorouter -etc/rc.d/rotorouter.sh @unexec if cmp -s %D/etc/rotorouter.conf %D/etc/rotorouter.conf-example; then rm -f %D/etc/rotorouter.conf; fi etc/rotorouter.conf-example |