aboutsummaryrefslogtreecommitdiff
path: root/net-p2p/py-bittornado
diff options
context:
space:
mode:
authorLi-Wen Hsu <lwhsu@FreeBSD.org>2009-07-13 15:56:23 +0000
committerLi-Wen Hsu <lwhsu@FreeBSD.org>2009-07-13 15:56:23 +0000
commit1679071ac15b9df19e9996fe121733dece3abe6a (patch)
tree97f151692e350396b3899f9fd65482ea17c09c7b /net-p2p/py-bittornado
parent0a2f66e945723b46d8008e43530a5dea1b1f60fc (diff)
downloadports-1679071ac15b9df19e9996fe121733dece3abe6a.tar.gz
ports-1679071ac15b9df19e9996fe121733dece3abe6a.zip
Notes
Diffstat (limited to 'net-p2p/py-bittornado')
-rw-r--r--net-p2p/py-bittornado/Makefile6
-rw-r--r--net-p2p/py-bittornado/files/bttrack.in36
-rw-r--r--net-p2p/py-bittornado/pkg-plist4
3 files changed, 43 insertions, 3 deletions
diff --git a/net-p2p/py-bittornado/Makefile b/net-p2p/py-bittornado/Makefile
index 8ac177469c76..ae2188409bb3 100644
--- a/net-p2p/py-bittornado/Makefile
+++ b/net-p2p/py-bittornado/Makefile
@@ -7,7 +7,7 @@
PORTNAME= BitTornado
PORTVERSION= 0.3.18
-PORTREVISION= 3
+PORTREVISION= 4
PORTEPOCH= 1
CATEGORIES?= net-p2p python ipv6
MASTER_SITES= http://download.bittornado.com/download/ \
@@ -28,6 +28,8 @@ PYDISTUTILS_PKGVERSION= T-0.3.18._BitTornado_
WRKSRC= ${WRKDIR}/${PORTNAME}-CVS
+USE_RC_SUBR= bttrack
+
DOC_FILES1= BUILD.windows.txt FAQ.txt IMPORTANT-multitracker-readme.txt \
INSTALL.unix.txt credits.txt multitracker-spec.txt \
README-Psyco.txt webseed-spec.txt
@@ -95,6 +97,8 @@ post-install:
.for f in ${EXTRA_DOC_FILES}
@${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}/`${ECHO} ${f} | ${SED} -e 's|/|_|g'`
.endfor
+.endif
+.ifndef(NOPORTEXAMPLES)
@${MKDIR} ${EXAMPLESDIR}
@${INSTALL_DATA} ${FILESDIR}/bittornado.sh.sample ${EXAMPLESDIR}
.endif
diff --git a/net-p2p/py-bittornado/files/bttrack.in b/net-p2p/py-bittornado/files/bttrack.in
new file mode 100644
index 000000000000..e44d1545ed93
--- /dev/null
+++ b/net-p2p/py-bittornado/files/bttrack.in
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: bttrack
+# REQUIRE: DAEMON
+#
+# Add the following lines to /etc/rc.conf to enable this service:
+#
+# bttrack_enable: Set to NO by default.
+# Set it to YES to enable the tracker.
+# bttrack_dfile: Defaults to /var/run/${name}.dfile.
+# Stores state for tracker.
+# bttrack_port: Set to listen on an alternative port (default is 80).
+#
+#
+
+. %%RC_SUBR%%
+
+name=bttrack
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/bin/${name}.py
+command_args="&"
+command_interpreter=`head -n 1 $command | awk -F! '{print $2}'`
+
+load_rc_config ${name}
+
+: ${bttrack_enable:="NO"}
+: ${bttrack_pidfile:=/var/run/${name}.pid}
+: ${bttrack_dfile:=/var/run/${name}.dfile}
+bttrack_flags="--dfile ${bttrack_dfile} \
+ ${bttrack_port:+--port ${bttrack_port}} \
+ ${bttrack_flags}"
+
+run_rc_command "$1"
diff --git a/net-p2p/py-bittornado/pkg-plist b/net-p2p/py-bittornado/pkg-plist
index 356ef426d737..bca06fc7b4cd 100644
--- a/net-p2p/py-bittornado/pkg-plist
+++ b/net-p2p/py-bittornado/pkg-plist
@@ -190,8 +190,8 @@ bin/bttrack.py
%%PORTDOCS%%%%DOCSDIR%%/multitracker-spec.txt
%%PORTDOCS%%%%DOCSDIR%%/test_multitracker_README.txt
%%PORTDOCS%%%%DOCSDIR%%/webseed-spec.txt
-%%PORTDOCS%%%%EXAMPLESDIR%%/bittornado.sh.sample
-%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
+%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bittornado.sh.sample
+%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm %%DATADIR%%
@dirrm %%PYTHON_SITELIBDIR%%/BitTornado/BT1