summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-06-25 11:22:59 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-06-25 11:22:59 +0000
commit74184d30e118d06090981b41d3be75d5f53ae381 (patch)
tree08b05e2cc96dc1239d7033ad2e12a546ef6f3e11
parentabf73e8bd980c6583c1ab78aca588c160a5e2b56 (diff)
downloadaports-74184d30e118d06090981b41d3be75d5f53ae381.tar.bz2
aports-74184d30e118d06090981b41d3be75d5f53ae381.tar.xz
testing/opentracker: new aport
an open and free bittorrent tracker http://erdgeist.org/arts/software/opentracker/
-rw-r--r--testing/opentracker/APKBUILD36
-rw-r--r--testing/opentracker/opentracker.initd38
-rw-r--r--testing/opentracker/opentracker.pre-install5
3 files changed, 79 insertions, 0 deletions
diff --git a/testing/opentracker/APKBUILD b/testing/opentracker/APKBUILD
new file mode 100644
index 000000000..61a521d98
--- /dev/null
+++ b/testing/opentracker/APKBUILD
@@ -0,0 +1,36 @@
+# Contributor:
+# Maintainer:
+pkgname=opentracker
+pkgver=0_cvs20100625
+pkgrel=0
+pkgdesc="an open and free bittorrent tracker"
+url="http://erdgeist.org/arts/software/opentracker/"
+license="GPL"
+depends=
+makedepends=
+install="$pkgname.pre-install"
+subpackages=
+source="http://dev.alpinelinux.org/opentracker/opentracker-$pkgver.tar.gz
+ opentracker.initd"
+
+_builddir="$srcdir"/$pkgname
+prepare() {
+ cd "$_builddir"
+}
+
+build() {
+ cd "$_builddir"
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ install -d "$pkgdir"/usr/bin
+ make BINDIR="$pkgdir"/usr/bin install || return 1
+ install -m644 -D opentracker.conf.sample \
+ "$pkgdir"/etc/opentracker/opentracker.conf
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+}
+
+md5sums="8d02a6f7a241c6b8c98e2dbde086cfcf opentracker-0_cvs20100625.tar.gz
+1e1e687e78959833463ceb55101a3173 opentracker.initd"
diff --git a/testing/opentracker/opentracker.initd b/testing/opentracker/opentracker.initd
new file mode 100644
index 000000000..33d281778
--- /dev/null
+++ b/testing/opentracker/opentracker.initd
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+
+# Sample init.d file for alpine linux.
+
+name=opentracker
+daemon=/usr/bin/$name
+conf=${opentracker_conf:-/etc/opentracker/opentracker.conf}
+pidfile=/var/run/opentracker.pid
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting ${name}"
+ start-stop-daemon --start --quiet \
+ --make-pidfile \
+ --pidfile ${pidfile} \
+ --background \
+ --stdout /dev/null \
+ --stderr /dev/null \
+ --exec ${daemon} \
+ -- \
+ -d /var/empty \
+ -f $conf \
+ -u ${opentracker_user:-opentracker} \
+ ${opentracker_opts}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${name}"
+ start-stop-daemon --stop --quiet --pidfile ${pidfile} \
+ --exec ${daemon}
+ eend $?
+}
+
diff --git a/testing/opentracker/opentracker.pre-install b/testing/opentracker/opentracker.pre-install
new file mode 100644
index 000000000..942fcd670
--- /dev/null
+++ b/testing/opentracker/opentracker.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+adduser -D -S -h /var/empty -s /sbin/false opentracker 2>/dev/null
+exit 0
+