aboutsummaryrefslogtreecommitdiff
path: root/net/opentracker
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2009-07-29 13:17:33 +0000
committerMartin Wilke <miwi@FreeBSD.org>2009-07-29 13:17:33 +0000
commit74c3376eb93e2f6c80f1a29d604a45558104f45c (patch)
treeb0e128324cccc470dfe01a02fd52d75b918293ab /net/opentracker
parentd881f6af28ed6e74086596a8c22f577fe0817a83 (diff)
downloadports-74c3376eb93e2f6c80f1a29d604a45558104f45c.tar.gz
ports-74c3376eb93e2f6c80f1a29d604a45558104f45c.zip
Notes
Diffstat (limited to 'net/opentracker')
-rw-r--r--net/opentracker/Makefile62
-rw-r--r--net/opentracker/distinfo3
-rw-r--r--net/opentracker/files/opentracker.in29
-rw-r--r--net/opentracker/files/patch-Makefile58
-rw-r--r--net/opentracker/pkg-descr6
-rw-r--r--net/opentracker/pkg-plist4
6 files changed, 162 insertions, 0 deletions
diff --git a/net/opentracker/Makefile b/net/opentracker/Makefile
new file mode 100644
index 000000000000..f4da092bff00
--- /dev/null
+++ b/net/opentracker/Makefile
@@ -0,0 +1,62 @@
+# New ports collection Makefile for: opentracker
+# Date created: 27 July 2009
+# Whom: utisoft@gmail.com
+#
+# $FreeBSD$
+#
+
+PORTNAME= opentracker
+PORTVERSION= 0.2009.06.27
+CATEGORIES= net
+MASTER_SITES= http://www.bayofrum.net/opentracker/ \
+ http://freebsd.dev-urandom.com/opentracker/
+
+MAINTAINER= utisoft@gmail.com
+COMMENT= A free lightweight bittorrent tracker using libowfat
+
+BUILD_DEPENDS= ${LOCALBASE}/lib/libowfat.a:${PORTSDIR}/devel/libowfat
+
+USE_RC_SUBR= opentracker
+
+OPTIONS=WANT_ACCESSLIST_BLACK "Enable client blacklisting" Off \
+ WANT_ACCESSLIST_WHITE "Enable client whitelisting" Off \
+ WANT_COMPRESSION_GZIP "Deliver gzip compressed full scrapes" Off \
+ DEBUG_HTTPERROR "Verbose HTTPERRORs" Off \
+ WANT_FULLSCRAPE "Can query tracker for all torrents" On \
+ WANT_V6 "IPv6-only" Off \
+
+.include <bsd.port.options.mk>
+
+.if defined(WITH_WANT_ACCESSLIST_BLACK)
+FEATURES+=-DWANT_ACCESSLIST_BLACK
+.endif
+.if defined(WITH_WANT_ACCESSLIST_WHITE)
+FEATURES+=-DWANT_ACCESSLIST_WHITE
+.endif
+.if defined(WITH_WANT_COMPRESSION_GZIP)
+FEATURES+=-DWANT_COMPRESSION_GZIP
+.endif
+.if defined(WITH_DEBUG_HTTPERROR)
+FEATURES+=-D_DEBUG_HTTPERROR
+.endif
+.if defined(WITH_WANT_FULLSCRAPE)
+FEATURES+=-DWANT_FULLSCRAPE
+.endif
+.if defined(WITH_WANT_V6)
+FEATURES+=-DWANT_V6
+.endif
+
+MAKE_ENV+=FEATURES="${FEATURES}"
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
+ ${MKDIR} ${PREFIX}/etc/${PORTNAME}
+ ${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf.sample ${PREFIX}/etc/${PORTNAME}/${PORTNAME}.conf.sample
+
+post-install:
+ @if [ ! -f ${PREFIX}/etc/${PORTNAME}/${PORTNAME}.conf ]; then \
+ ${CP} -p ${PREFIX}/etc/${PORTNAME}/${PORTNAME}.conf.sample \
+ ${PREFIX}/etc/${PORTNAME}/${PORTNAME}.conf ; \
+ fi
+
+.include <bsd.port.mk>
diff --git a/net/opentracker/distinfo b/net/opentracker/distinfo
new file mode 100644
index 000000000000..d7bf5ec1d9a7
--- /dev/null
+++ b/net/opentracker/distinfo
@@ -0,0 +1,3 @@
+MD5 (opentracker-0.2009.06.27.tar.gz) = b453bbd8b557f6cdd633ab000b9ef6db
+SHA256 (opentracker-0.2009.06.27.tar.gz) = e8b3437bc98ab6f9f25cbb107a272ae1e4c86ce635c11195c197cae5f0d40fe7
+SIZE (opentracker-0.2009.06.27.tar.gz) = 45117
diff --git a/net/opentracker/files/opentracker.in b/net/opentracker/files/opentracker.in
new file mode 100644
index 000000000000..afcbde34b282
--- /dev/null
+++ b/net/opentracker/files/opentracker.in
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# PROVIDE: opentracker
+# REQUIRE: LOGIN
+
+# Add the following lines to /etc/rc.conf or /etc/rc.conf.local to
+# enable opentracker:
+# opentracker_enable (bool): Set to "NO" by default.
+# opentracker_config (path): Set to
+# "%%PREFIX%%/etc/opentracker/opentracker.conf"
+# by default
+
+. %%RC_SUBR%%
+
+name="opentracker"
+rcvar=`set_rcvar`
+
+load_rc_config $name
+
+: ${opentracker_enable="NO"}
+: ${opentracker_config="%%PREFIX%%/etc/opentracker/opentracker.conf"}
+
+command="/usr/sbin/daemon"
+command_args="-p /var/run/opentracker.pid %%PREFIX%%/bin/opentracker -f ${opentracker_config}"
+procname="%%PREFIX%%/bin/opentracker"
+pidfile="/var/run/opentracker.pid"
+required_files=${opentracker_config}
+
+run_rc_command "$1"
diff --git a/net/opentracker/files/patch-Makefile b/net/opentracker/files/patch-Makefile
new file mode 100644
index 000000000000..5d168a0fe92d
--- /dev/null
+++ b/net/opentracker/files/patch-Makefile
@@ -0,0 +1,58 @@
+--- Makefile.orig 2009-06-27 16:48:37.000000000 +0100
++++ Makefile 2009-06-27 18:19:43.000000000 +0100
+@@ -8,14 +8,14 @@
+ # LIBOWFAT_LIBRARY=$(PREFIX)/lib
+
+ # BSD flavour
+-# PREFIX?=/usr/local
+-# LIBOWFAT_HEADERS=$(PREFIX)/include/libowfat
+-# LIBOWFAT_LIBRARY=$(PREFIX)/lib
++PREFIX?=/usr/local
++LIBOWFAT_HEADERS=$(LOCALBASE)/include/libowfat
++LIBOWFAT_LIBRARY=$(LOCALBASE)/lib
+
+ # Debug flavour
+-PREFIX?=..
+-LIBOWFAT_HEADERS=$(PREFIX)/libowfat
+-LIBOWFAT_LIBRARY=$(PREFIX)/libowfat
++# PREFIX?=..
++# LIBOWFAT_HEADERS=$(PREFIX)/libowfat
++# LIBOWFAT_LIBRARY=$(PREFIX)/libowfat
+
+ BINDIR?=$(PREFIX)/bin
+
+@@ -31,7 +31,7 @@
+ #FEATURES+=-DWANT_LOG_NETWORKS
+ #FEATURES+=-DWANT_RESTRICT_STATS
+ #FEATURES+=-DWANT_IP_FROM_PROXY
+-FEATURES+=-DWANT_FULLSCRAPE
++#FEATURES+=-DWANT_FULLSCRAPE
+
+ #FEATURES+=-D_DEBUG_HTTPERROR
+
+@@ -46,23 +46,15 @@
+ SOURCES=opentracker.c trackerlogic.c scan_urlencoded_query.c ot_mutex.c ot_stats.c ot_vector.c ot_clean.c ot_udp.c ot_iovec.c ot_fullscrape.c ot_accesslist.c ot_http.c ot_livesync.c
+
+ OBJECTS = $(SOURCES:%.c=%.o)
+-OBJECTS_debug = $(SOURCES:%.c=%.debug.o)
+
+-.SUFFIXES: .debug.o .o .c
++.SUFFIXES: .o .c
+
+-all: $(BINARY) $(BINARY).debug
++all: $(BINARY)
+
+ CFLAGS_production = $(CFLAGS) $(OPTS_production) $(FEATURES)
+-CFLAGS_debug = $(CFLAGS) $(OPTS_debug) $(FEATURES)
+
+ $(BINARY): $(OBJECTS) $(HEADERS)
+ $(CC) -o $@ $(OBJECTS) $(LDFLAGS)
+- strip $@
+-$(BINARY).debug: $(OBJECTS_debug) $(HEADERS)
+- $(CC) -o $@ $(OBJECTS_debug) $(LDFLAGS)
+-
+-.c.debug.o : $(HEADERS)
+- $(CC) -c -o $@ $(CFLAGS_debug) $(<:.debug.o=.c)
+
+ .c.o : $(HEADERS)
+ $(CC) -c -o $@ $(CFLAGS_production) $<
diff --git a/net/opentracker/pkg-descr b/net/opentracker/pkg-descr
new file mode 100644
index 000000000000..2f754a0707e1
--- /dev/null
+++ b/net/opentracker/pkg-descr
@@ -0,0 +1,6 @@
+opentracker is a open and free bittorrent tracker project.
+It aims for minimal resource usage and is intended to run
+at your wlan router. Currently it is deployed as an open and
+free tracker instance.
+
+WWW: http://erdgeist.org/arts/software/opentracker/
diff --git a/net/opentracker/pkg-plist b/net/opentracker/pkg-plist
new file mode 100644
index 000000000000..413e982399aa
--- /dev/null
+++ b/net/opentracker/pkg-plist
@@ -0,0 +1,4 @@
+bin/opentracker
+@unexec if cmp -s %D/etc/opentracker/opentracker.conf.sample %D/etc/opentracker/opentracker.conf; then rm -f %D/etc/opentracker/opentracker.conf; fi
+etc/opentracker/opentracker.conf.sample
+@dirrm etc/opentracker