From dec379151a79e061ee8e7eb6bc485a593546ac99 Mon Sep 17 00:00:00 2001 From: pav Date: Tue, 28 Dec 2004 02:31:37 +0000 Subject: - Take care of leftover directory - Use SUB_FILES PR: ports/75522 Submitted by: Florent Thoumie (maintainer) --- net-p2p/bnbt/Makefile | 11 +++-------- net-p2p/bnbt/files/bnbt.sh | 38 -------------------------------------- net-p2p/bnbt/files/bnbt.sh.in | 38 ++++++++++++++++++++++++++++++++++++++ net-p2p/bnbt/files/pkg-message.in | 5 +---- net-p2p/bnbt/pkg-plist | 3 +++ net/bnbt/Makefile | 11 +++-------- net/bnbt/files/bnbt.sh | 38 -------------------------------------- net/bnbt/files/bnbt.sh.in | 38 ++++++++++++++++++++++++++++++++++++++ net/bnbt/files/pkg-message.in | 5 +---- net/bnbt/pkg-plist | 3 +++ 10 files changed, 90 insertions(+), 100 deletions(-) delete mode 100644 net-p2p/bnbt/files/bnbt.sh create mode 100644 net-p2p/bnbt/files/bnbt.sh.in create mode 100644 net-p2p/bnbt/pkg-plist delete mode 100644 net/bnbt/files/bnbt.sh create mode 100644 net/bnbt/files/bnbt.sh.in create mode 100644 net/bnbt/pkg-plist diff --git a/net-p2p/bnbt/Makefile b/net-p2p/bnbt/Makefile index 03352b698dea..9a4787907b6e 100644 --- a/net-p2p/bnbt/Makefile +++ b/net-p2p/bnbt/Makefile @@ -7,6 +7,7 @@ PORTNAME= bnbt PORTVERSION= 8.1b3 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://bnbt.go-dedicated.com/ \ http://www.oook.cz/bsd/distfiles/ @@ -17,16 +18,14 @@ COMMENT= A C++ BitTorrent Tracker USE_ZIP= yes WRKSRC= ${WRKDIR}/${PORTNAME}/src -PKGMESSAGE= ${WRKDIR}/pkg-message USE_GMAKE= yes USE_REINPLACE= yes USE_RC_SUBR= yes -SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \ - -e 's,%%RC_SUBR%%,${RC_SUBR},g' +SUB_FILES= pkg-message bnbt.sh +SUB_LIST= RC_SUBR="${RC_SUBR}" -PLIST_FILES= bin/bnbt PORTDOCS= footer.html header.html lesser.txt readme.txt users.txt .if defined(WITH_MYSQL) @@ -47,10 +46,6 @@ post-patch: @${REINPLACE_CMD} -e 's|bnbt.cfg|${PREFIX}/etc/${PORTNAME}/bnbt.cfg|' \ ${WRKSRC}/config.h ${WRKSRC}/config.cpp ${WRKSRC}/tracker.cpp -post-build: - @${SED} ${SED_SCRIPT} ${FILESDIR}/bnbt.sh > ${WRKDIR}/bnbt.sh - @${SED} ${SED_SCRIPT} ${FILESDIR}/pkg-message.in > ${WRKDIR}/pkg-message - do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${ALL_TARGET} ${PREFIX}/bin/bnbt ${MKDIR} ${PREFIX}/etc/${PORTNAME} diff --git a/net-p2p/bnbt/files/bnbt.sh b/net-p2p/bnbt/files/bnbt.sh deleted file mode 100644 index d9f67bb8fee6..000000000000 --- a/net-p2p/bnbt/files/bnbt.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: bnbt -# REQUIRE: LOGIN abi -# BEFORE: securelevel -# KEYWORD: FreeBSD shutdown - -# Add the following line to /etc/rc.conf to enable `bnbt': -# -#bnbt_enable="YES" -# -# See bnbt(1) for bnbt_flags -# - -. "%%RC_SUBR%%" - -name="bnbt" -rcvar=`set_rcvar` - -# path to your executable, might be libxec, bin, sbin, ... -command="%%PREFIX%%/bin/$name" - -# extra required arguments -command_args="&" - -# you can check for required_dirs and required_vars too, see rc.subr(8) -# -required_dirs="/var/log/$name" - -# read settings, set default values -load_rc_config "$name" -: ${bnbt_enable="NO"} -: ${bnbt_flags=""} - -run_rc_command "$1" diff --git a/net-p2p/bnbt/files/bnbt.sh.in b/net-p2p/bnbt/files/bnbt.sh.in new file mode 100644 index 000000000000..d9f67bb8fee6 --- /dev/null +++ b/net-p2p/bnbt/files/bnbt.sh.in @@ -0,0 +1,38 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: bnbt +# REQUIRE: LOGIN abi +# BEFORE: securelevel +# KEYWORD: FreeBSD shutdown + +# Add the following line to /etc/rc.conf to enable `bnbt': +# +#bnbt_enable="YES" +# +# See bnbt(1) for bnbt_flags +# + +. "%%RC_SUBR%%" + +name="bnbt" +rcvar=`set_rcvar` + +# path to your executable, might be libxec, bin, sbin, ... +command="%%PREFIX%%/bin/$name" + +# extra required arguments +command_args="&" + +# you can check for required_dirs and required_vars too, see rc.subr(8) +# +required_dirs="/var/log/$name" + +# read settings, set default values +load_rc_config "$name" +: ${bnbt_enable="NO"} +: ${bnbt_flags=""} + +run_rc_command "$1" diff --git a/net-p2p/bnbt/files/pkg-message.in b/net-p2p/bnbt/files/pkg-message.in index b13bde3da32c..5543af77c8df 100644 --- a/net-p2p/bnbt/files/pkg-message.in +++ b/net-p2p/bnbt/files/pkg-message.in @@ -1,12 +1,9 @@ ************************************************************ - Bnbt has been successfully installed. In order to run bnbt, add the following lines to /etc/rc.conf: bnbt_enable="YES" -Then start the server with - %%PREFIX%%/etc/rc.d/bnbt.sh start +Then start the server with %%PREFIX%%/etc/rc.d/bnbt.sh start or reboot. - ************************************************************ diff --git a/net-p2p/bnbt/pkg-plist b/net-p2p/bnbt/pkg-plist new file mode 100644 index 000000000000..2754d85dc396 --- /dev/null +++ b/net-p2p/bnbt/pkg-plist @@ -0,0 +1,3 @@ +bin/bnbt +@exec mkdir -p %D/etc/bnbt +@unexec rmdir %D/etc/bnbt 2>/dev/null || true diff --git a/net/bnbt/Makefile b/net/bnbt/Makefile index 03352b698dea..9a4787907b6e 100644 --- a/net/bnbt/Makefile +++ b/net/bnbt/Makefile @@ -7,6 +7,7 @@ PORTNAME= bnbt PORTVERSION= 8.1b3 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://bnbt.go-dedicated.com/ \ http://www.oook.cz/bsd/distfiles/ @@ -17,16 +18,14 @@ COMMENT= A C++ BitTorrent Tracker USE_ZIP= yes WRKSRC= ${WRKDIR}/${PORTNAME}/src -PKGMESSAGE= ${WRKDIR}/pkg-message USE_GMAKE= yes USE_REINPLACE= yes USE_RC_SUBR= yes -SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \ - -e 's,%%RC_SUBR%%,${RC_SUBR},g' +SUB_FILES= pkg-message bnbt.sh +SUB_LIST= RC_SUBR="${RC_SUBR}" -PLIST_FILES= bin/bnbt PORTDOCS= footer.html header.html lesser.txt readme.txt users.txt .if defined(WITH_MYSQL) @@ -47,10 +46,6 @@ post-patch: @${REINPLACE_CMD} -e 's|bnbt.cfg|${PREFIX}/etc/${PORTNAME}/bnbt.cfg|' \ ${WRKSRC}/config.h ${WRKSRC}/config.cpp ${WRKSRC}/tracker.cpp -post-build: - @${SED} ${SED_SCRIPT} ${FILESDIR}/bnbt.sh > ${WRKDIR}/bnbt.sh - @${SED} ${SED_SCRIPT} ${FILESDIR}/pkg-message.in > ${WRKDIR}/pkg-message - do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${ALL_TARGET} ${PREFIX}/bin/bnbt ${MKDIR} ${PREFIX}/etc/${PORTNAME} diff --git a/net/bnbt/files/bnbt.sh b/net/bnbt/files/bnbt.sh deleted file mode 100644 index d9f67bb8fee6..000000000000 --- a/net/bnbt/files/bnbt.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# - -# PROVIDE: bnbt -# REQUIRE: LOGIN abi -# BEFORE: securelevel -# KEYWORD: FreeBSD shutdown - -# Add the following line to /etc/rc.conf to enable `bnbt': -# -#bnbt_enable="YES" -# -# See bnbt(1) for bnbt_flags -# - -. "%%RC_SUBR%%" - -name="bnbt" -rcvar=`set_rcvar` - -# path to your executable, might be libxec, bin, sbin, ... -command="%%PREFIX%%/bin/$name" - -# extra required arguments -command_args="&" - -# you can check for required_dirs and required_vars too, see rc.subr(8) -# -required_dirs="/var/log/$name" - -# read settings, set default values -load_rc_config "$name" -: ${bnbt_enable="NO"} -: ${bnbt_flags=""} - -run_rc_command "$1" diff --git a/net/bnbt/files/bnbt.sh.in b/net/bnbt/files/bnbt.sh.in new file mode 100644 index 000000000000..d9f67bb8fee6 --- /dev/null +++ b/net/bnbt/files/bnbt.sh.in @@ -0,0 +1,38 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: bnbt +# REQUIRE: LOGIN abi +# BEFORE: securelevel +# KEYWORD: FreeBSD shutdown + +# Add the following line to /etc/rc.conf to enable `bnbt': +# +#bnbt_enable="YES" +# +# See bnbt(1) for bnbt_flags +# + +. "%%RC_SUBR%%" + +name="bnbt" +rcvar=`set_rcvar` + +# path to your executable, might be libxec, bin, sbin, ... +command="%%PREFIX%%/bin/$name" + +# extra required arguments +command_args="&" + +# you can check for required_dirs and required_vars too, see rc.subr(8) +# +required_dirs="/var/log/$name" + +# read settings, set default values +load_rc_config "$name" +: ${bnbt_enable="NO"} +: ${bnbt_flags=""} + +run_rc_command "$1" diff --git a/net/bnbt/files/pkg-message.in b/net/bnbt/files/pkg-message.in index b13bde3da32c..5543af77c8df 100644 --- a/net/bnbt/files/pkg-message.in +++ b/net/bnbt/files/pkg-message.in @@ -1,12 +1,9 @@ ************************************************************ - Bnbt has been successfully installed. In order to run bnbt, add the following lines to /etc/rc.conf: bnbt_enable="YES" -Then start the server with - %%PREFIX%%/etc/rc.d/bnbt.sh start +Then start the server with %%PREFIX%%/etc/rc.d/bnbt.sh start or reboot. - ************************************************************ diff --git a/net/bnbt/pkg-plist b/net/bnbt/pkg-plist new file mode 100644 index 000000000000..2754d85dc396 --- /dev/null +++ b/net/bnbt/pkg-plist @@ -0,0 +1,3 @@ +bin/bnbt +@exec mkdir -p %D/etc/bnbt +@unexec rmdir %D/etc/bnbt 2>/dev/null || true -- cgit