diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2004-10-27 21:43:46 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2004-10-27 21:43:46 +0000 |
commit | ded40cdbd0d9d60a02a7bc399e7040bc68c2b2b1 (patch) | |
tree | 74f3eb2f0fa1ffe7c2444e0fa3bd414bd61e994c /net-p2p/bnbt | |
parent | a1b1321d98a74d6d1f1a9ed19e51542a4578af1e (diff) | |
download | ports-ded40cdbd0d9d60a02a7bc399e7040bc68c2b2b1.tar.gz ports-ded40cdbd0d9d60a02a7bc399e7040bc68c2b2b1.zip |
Notes
Diffstat (limited to 'net-p2p/bnbt')
-rw-r--r-- | net-p2p/bnbt/Makefile | 43 | ||||
-rw-r--r-- | net-p2p/bnbt/distinfo | 4 | ||||
-rw-r--r-- | net-p2p/bnbt/files/bnbt.sh | 38 | ||||
-rw-r--r-- | net-p2p/bnbt/files/patch-client.cpp | 17 | ||||
-rw-r--r-- | net-p2p/bnbt/files/patch-config.cpp | 15 | ||||
-rw-r--r-- | net-p2p/bnbt/files/patch-server.cpp | 11 | ||||
-rw-r--r-- | net-p2p/bnbt/files/pkg-message.in | 12 |
7 files changed, 131 insertions, 9 deletions
diff --git a/net-p2p/bnbt/Makefile b/net-p2p/bnbt/Makefile index 4f0a29095f76..f3a9f3a28c3b 100644 --- a/net-p2p/bnbt/Makefile +++ b/net-p2p/bnbt/Makefile @@ -6,33 +6,62 @@ # PORTNAME= bnbt -PORTVERSION= 7.7b3 +PORTVERSION= 8.1b3 CATEGORIES= net MASTER_SITES= http://bnbt.go-dedicated.com/ -DISTNAME= bnbt77b-3 +DISTNAME= bnbt81b-3 MAINTAINER= flz@xbsd.org 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' PLIST_FILES= bin/bnbt PORTDOCS= footer.html header.html lesser.txt readme.txt users.txt +.if defined(WITH_MYSQL) +ALL_TARGET= bnbtmysql +PKGNAMESUFFIX= -mysql +USE_MYSQL= yes +.else +ALL_TARGET= bnbt +.endif + +.include <bsd.port.pre.mk> + post-patch: - @${REINPLACE_CMD} -e 's|-O2 -w|${CFLAGS}| ; \ - s|LFLAGS = -pthread|LFLAGS = ${PTHREAD_LIBS}| ; \ - s|CFLAGS = -pthread|CFLAGS = ${PTHREAD_CFLAGS}|' ${WRKSRC}/Makefile + @${REINPLACE_CMD} -e 's|-O2|${CFLAGS} -I${PREFIX}/include| ; \ + s|LFLAGS =|LFLAGS = -L${PREFIX}/lib/mysql|' ${WRKSRC}/Makefile + @${REINPLACE_CMD} -e 's|\([a-z]*\.bnbt\)|${PREFIX}/etc/${PORTNAME}/\1|' \ + ${WRKSRC}/config.cpp + @${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}/bnbt ${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/${ALL_TARGET} ${PREFIX}/bin/bnbt + ${MKDIR} ${PREFIX}/etc/${PORTNAME} ${MKDIR} ${DOCSDIR} .for i in ${PORTDOCS} ${INSTALL_DATA} ${WRKDIR}/${PORTNAME}/$i ${DOCSDIR} .endfor -.include <bsd.port.mk> +post-install: + @${INSTALL_SCRIPT} ${WRKDIR}/bnbt.sh ${PREFIX}/etc/rc.d/bnbt.sh + @${ECHO_CMD} "etc/rc.d/bnbt.sh" >> ${TMPPLIST} + @${MKDIR} /var/log/${PORTNAME} + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.post.mk> diff --git a/net-p2p/bnbt/distinfo b/net-p2p/bnbt/distinfo index 0471ee363218..e6c771dde979 100644 --- a/net-p2p/bnbt/distinfo +++ b/net-p2p/bnbt/distinfo @@ -1,2 +1,2 @@ -MD5 (bnbt77b-3.zip) = 294489bf1d33f6e5327e6295cb5fe8c3 -SIZE (bnbt77b-3.zip) = 1111145 +MD5 (bnbt81b-3.zip) = 2935ffe0f51090a79d5bd76566af3b2b +SIZE (bnbt81b-3.zip) = 741026 diff --git a/net-p2p/bnbt/files/bnbt.sh b/net-p2p/bnbt/files/bnbt.sh new file mode 100644 index 000000000000..d9f67bb8fee6 --- /dev/null +++ b/net-p2p/bnbt/files/bnbt.sh @@ -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/patch-client.cpp b/net-p2p/bnbt/files/patch-client.cpp new file mode 100644 index 000000000000..da622fab52d6 --- /dev/null +++ b/net-p2p/bnbt/files/patch-client.cpp @@ -0,0 +1,17 @@ +--- client.cpp Wed Sep 29 21:38:32 2004 ++++ client.cpp.new Sat Oct 23 15:40:05 2004 +@@ -19,6 +19,7 @@ + * + ***/ + ++#include <sys/time.h> + #include <fcntl.h> + + #include "bnbt.h" +@@ -639,4 +640,4 @@ + rsp.strContent.reserve( 1024 ); + rsp.bCompressOK = true; + m_iLast = GetTime( ); +-} +\ No newline at end of file ++} diff --git a/net-p2p/bnbt/files/patch-config.cpp b/net-p2p/bnbt/files/patch-config.cpp new file mode 100644 index 000000000000..f9a3636c1bb0 --- /dev/null +++ b/net-p2p/bnbt/files/patch-config.cpp @@ -0,0 +1,15 @@ +--- config.cpp Fri Sep 24 20:01:58 2004 ++++ config.cpp.new Sat Oct 23 14:42:45 2004 +@@ -147,10 +147,10 @@ + CFG_SetString( "bnbt_realm", "BNBT" ); + + if( CFG_GetString( "bnbt_error_log_dir", string( ) ).empty( ) ) +- CFG_SetString( "bnbt_error_log_dir", string( ) ); ++ CFG_SetString( "bnbt_error_log_dir", "/var/log/bnbt/" ); + + if( CFG_GetString( "bnbt_access_log_dir", string( ) ).empty( ) ) +- CFG_SetString( "bnbt_access_log_dir", string( ) ); ++ CFG_SetString( "bnbt_access_log_dir", "/var/log/bnbt/" ); + + if( CFG_GetInt( "bnbt_flush_interval", 0 ) < 1 ) + CFG_SetInt( "bnbt_flush_interval", 100 ); diff --git a/net-p2p/bnbt/files/patch-server.cpp b/net-p2p/bnbt/files/patch-server.cpp new file mode 100644 index 000000000000..856ac603c773 --- /dev/null +++ b/net-p2p/bnbt/files/patch-server.cpp @@ -0,0 +1,11 @@ +--- server.cpp Fri Sep 10 14:43:24 2004 ++++ server.cpp.new Sat Oct 23 15:40:21 2004 +@@ -19,6 +19,8 @@ + * + ***/ + ++#include <sys/time.h> ++ + #include "bnbt.h" + #include "client.h" + #include "config.h" diff --git a/net-p2p/bnbt/files/pkg-message.in b/net-p2p/bnbt/files/pkg-message.in new file mode 100644 index 000000000000..b13bde3da32c --- /dev/null +++ b/net-p2p/bnbt/files/pkg-message.in @@ -0,0 +1,12 @@ +************************************************************ + +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 +or reboot. + +************************************************************ |