summaryrefslogtreecommitdiffstats
path: root/main/transmission
diff options
context:
space:
mode:
Diffstat (limited to 'main/transmission')
-rw-r--r--main/transmission/APKBUILD32
-rw-r--r--main/transmission/transmission-daemon.confd18
-rw-r--r--main/transmission/transmission-daemon.initd21
-rw-r--r--main/transmission/transmission.pre-install5
4 files changed, 76 insertions, 0 deletions
diff --git a/main/transmission/APKBUILD b/main/transmission/APKBUILD
new file mode 100644
index 000000000..0942c1b2a
--- /dev/null
+++ b/main/transmission/APKBUILD
@@ -0,0 +1,32 @@
+# Maintainer:Carlo Landmeter
+pkgname=transmission
+pkgver=1.61
+pkgel=0
+pkgdesc="Fast, easy, and fee BitToent client (CLI tools daemon and webinterface)"
+url="http://www.tansmissionbt.com"
+install="$pkgname.pre-install"
+license="MIT"
+depends="curl"
+makedepends="openssl-dev pkgconfig curl-dev g++"
+source="http://download.m0k.org/transmission/files/transmission-$pkgver.tar.bz2
+ transmission-daemon.initd
+ transmission-daemon.confd
+ $pkgname.pre-install"
+subpackages="$pkgname-doc"
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --disable-gtk \
+ --disable-nls
+ make || return 1
+ make prefix="$pkgdir"/usr mandir="$pkgdir"/usr/share/man install
+ install -D -m755 "$srcdir"/transmission-daemon.initd "$pkgdir"/etc/init.d/transmission-daemon
+ install -D -m644 "$srcdir"/transmission-daemon.confd "$pkgdir"/etc/conf.d/transmission-daemon
+}
+md5sums="0b0428f4a6237a64dc8b7d378ace3f06 transmission-1.61.tar.bz2
+b3b921242bdc3b33a8ac05fc30653b6c transmission-daemon.initd
+89478a70fcd93463e1dd8d751da994da transmission-daemon.confd
+f1c8d94e1f7ff77c23a7e92d3860754d transmission.pre-install"
diff --git a/main/transmission/transmission-daemon.confd b/main/transmission/transmission-daemon.confd
new file mode 100644
index 000000000..c1f338f07
--- /dev/null
+++ b/main/transmission/transmission-daemon.confd
@@ -0,0 +1,18 @@
+#
+# transmission-daemon options
+#
+# -a --acl <list> Access Control List. (Default: +127.0.0.1)
+# -b --blocklist Enable peer blocklists
+# -B --no-blocklist Disable peer blocklists
+# -f --foreground Run in the foreground instead of daemonizing
+# -g --config-dir <path> Where to look for configuration files
+# -p --port <port> RPC port (Default: 9091)
+# -t --auth Require authentication
+# -T --no-auth Don't require authentication
+# -u --username <username> Set username for authentication
+# -v --password <password> Set password for authentication
+# -w --download-dir <path> Where to save downloaded data
+#
+# NOTE: webif does not work without the -f switch
+#
+TD_OPTS="-f -g /var/lib/transmission/.config -w /var/lib/transmission"
diff --git a/main/transmission/transmission-daemon.initd b/main/transmission/transmission-daemon.initd
new file mode 100644
index 000000000..af9461cc6
--- /dev/null
+++ b/main/transmission/transmission-daemon.initd
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting transmission-daemon"
+ start-stop-daemon --start --quiet --background --make-pidfile \
+ --chuid transmission:transmission \
+ --pidfile /var/run/transmission-daemon.pid \
+ --exec /usr/bin/transmission-daemon -- ${TD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping transmission-daemon"
+ start-stop-daemon --stop --quiet \
+ --pidfile /var/run/transmission-daemon.pid \
+ eend $?
+}
diff --git a/main/transmission/transmission.pre-install b/main/transmission/transmission.pre-install
new file mode 100644
index 000000000..44a14760f
--- /dev/null
+++ b/main/transmission/transmission.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+adduser -h /var/lib/transmission -s /bin/false -D transmission 2>/dev/null
+
+exit 0