From 33975c6154aea6e2ce2ef55140ef04b4b6815651 Mon Sep 17 00:00:00 2001 From: Omar Vega Ramos Date: Thu, 21 May 2015 18:49:29 -0500 Subject: opentracker-git: add new package to [pcr] --- pcr/opentracker-git/PKGBUILD | 117 ++++++++++++++++++++++++++++++++ pcr/opentracker-git/license.txt | 8 +++ pcr/opentracker-git/opentracker.service | 11 +++ 3 files changed, 136 insertions(+) create mode 100644 pcr/opentracker-git/PKGBUILD create mode 100644 pcr/opentracker-git/license.txt create mode 100644 pcr/opentracker-git/opentracker.service (limited to 'pcr/opentracker-git') diff --git a/pcr/opentracker-git/PKGBUILD b/pcr/opentracker-git/PKGBUILD new file mode 100644 index 000000000..f5ef91aef --- /dev/null +++ b/pcr/opentracker-git/PKGBUILD @@ -0,0 +1,117 @@ +# Maintainer (Arch): TheCreeper +# Maintainer: Omar Vega Ramos + +pkgname=opentracker-git +pkgver=r583.6c60309 +pkgrel=1 +pkgdesc="Opentracker is a open and free bittorrent tracker project. It aims for minimal resource usage and is intended to run at your wlan router." +arch=('i686' 'x86_64') +url="http://erdgeist.org/arts/software/opentracker/" +license=('custom') +depends=('libowfat') +makedepends=( + 'git' + #'cvs' + 'make' + 'gcc' + 'gcc-libs' + 'dietlibc' +) +backup=("etc/opentracker/config") +source=( + 'opentracker.service' + 'license.txt' + "$pkgname"::'git://erdgeist.org/opentracker') +sha1sums=( + 'f623a45a0722bdc007f1d4b303ff6e3913281953' + '7cd200ee8ee89ddbd302dbbf63b6993bc51d4e3e' + 'SKIP') + +pkgver() { + cd "$srcdir/$pkgname" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + + ## BEWARE: + ## I had problems compiling this on arm using the new verson of GCC. + + #### + ## Build Libowfat + #### + + ## Pull in libowfat + #msg "Pulling in libowfat" + #cvs -d :pserver:cvs@cvs.fefe.de:/cvs -z9 co libowfat + + ## Compile libowfat + #msg "Compiling libowfat" + #cd "$srcdir/libowfat" + #make + + #### + ## Build Opentracker + #### + + #### + ## The following is a list of compile time options + ## Add them to the 'FEATURES' option of the make command below + + #DWANT_V6 > Compile in IPV6 only support. + + ## Only one of the following accesslist options can be used. + #DWANT_ACCESSLIST_BLACK > Compile in a blacklist of allowed torrents. + #DWANT_ACCESSLIST_WHITE > Compile in a whitelist of allowed torrents. + + #FDWANT_SYNC_LIVE > Compile in support for running in clusters. + #DWANT_IP_FROM_QUERY_STRING > Experimental or old feature. No idea what this does. + #DWANT_COMPRESSION_GZIP > Compile in support for GZIP. This is used when downloading scrapes. + #DWANT_COMPRESSION_GZIP_ALWAYS > Always compress scrapes using GZIP before serving them to clients. + #DWANT_LOG_NETWORKS > Experimental or old feature. No idea what this does. + #DWANT_RESTRICT_STATS > Compile in support for restricting tracker stats based on IP. Can be configured in the configuration file. + #DWANT_IP_FROM_PROXY > Experimental or old feature. No idea what this does. + #DWANT_FULLLOG_NETWORKS > Experimental or old feature. No idea what this does. + #DWANT_LOG_NUMWANT > Experimental or old feature. No idea what this does. + #DWANT_MODEST_FULLSCRAPES > Experimental or old feature. No idea what this does. + #DWANT_SPOT_WOODPECKER > Experimental or old feature. No idea what this does. + #DWANT_SYSLOGS > Experimental or old feature. No idea what this does. + #DWANT_DEV_RANDOM > Experimental or old feature. No idea what this does. + #DWANT_FULLSCRAPE > Compile in support for querying opentracker for all tracked torrents. Defualt. Change Makefile to compile out this support. + + #D_DEBUG_HTTPERROR > This should add in support for serving errors to clients when pages like 127.0.0.1:6969/random are accessed which are not used by opentracker. + + msg "Compiling Opentracker" + cd "$srcdir/opentracker-git/" + + make LIBOWFAT_HEADERS="/usr/include" \ + LIBOWFAT_LIBRARY="/usr/lib" \ + #LIBOWFAT_HEADERS="../libowfat" \ + #LIBOWFAT_LIBRARY="../libowfat" \ + FEATURES="-DWANT_SYSLOGS -DDEBUG_HTTPERROR" \ + CC="/opt/diet/bin/diet gcc" +} + +package() { + + msg "Preparing the package" + + cd "$srcdir/" + + install -d $pkgdir/usr/bin/ + install -m 755 opentracker-git/opentracker $pkgdir/usr/bin/ + + install -d $pkgdir/usr/lib/systemd/system + install -m 755 opentracker.service $pkgdir/usr/lib/systemd/system/ + + install -d $pkgdir/etc/opentracker + install -m 644 opentracker-git/opentracker.conf.sample $pkgdir/etc/opentracker/config + + install -d $pkgdir/usr/share/doc/opentracker/ + install -m 644 opentracker-git/opentracker.conf.sample $pkgdir/usr/share/doc/opentracker/config + + install -d $pkgdir/usr/share/licenses/opentracker/ + install -m 644 license.txt $pkgdir/usr/share/licenses/opentracker/ + + msg "Finished" +} \ No newline at end of file diff --git a/pcr/opentracker-git/license.txt b/pcr/opentracker-git/license.txt new file mode 100644 index 000000000..ebbaa7b0f --- /dev/null +++ b/pcr/opentracker-git/license.txt @@ -0,0 +1,8 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this notice you + * can do whatever you want with this stuff. If we meet some day, and you think + * this stuff is worth it, you can buy me a beer in return Poul-Henning Kamp + * ---------------------------------------------------------------------------- + */ \ No newline at end of file diff --git a/pcr/opentracker-git/opentracker.service b/pcr/opentracker-git/opentracker.service new file mode 100644 index 000000000..5f1b887ea --- /dev/null +++ b/pcr/opentracker-git/opentracker.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenTracker Daemon +After=network.target + +[Service] +User=nobody +ExecStart=/usr/bin/opentracker -f /etc/opentracker/config +ExecStop=/bin/kill -INT $MAINPID + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3