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/

PR:		ports/137130
Submitted by:	utisoft at gmail.com
This commit is contained in:
Martin Wilke 2009-07-29 13:17:33 +00:00
parent d881f6af28
commit 74c3376eb9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=238615
7 changed files with 163 additions and 0 deletions

View File

@ -449,6 +449,7 @@
SUBDIR += openradius
SUBDIR += openser
SUBDIR += openslp
SUBDIR += opentracker
SUBDIR += openverse
SUBDIR += ortp
SUBDIR += osrtspproxy

62
net/opentracker/Makefile Normal file
View File

@ -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>

3
net/opentracker/distinfo Normal file
View File

@ -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

View File

@ -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"

View File

@ -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) $<

View File

@ -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/

View File

@ -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