summaryrefslogtreecommitdiffstats
path: root/main/transmission
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-01-25 16:43:57 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-01-25 16:43:57 +0000
commit9526ee659401dee7160f35cb62ded2779bcbbc99 (patch)
tree812ad73bde9c84dcc02a3acbc5db576369ca314a /main/transmission
parent05e09c1126a898b6d0af491fef0401bf53e297f8 (diff)
downloadaports-9526ee659401dee7160f35cb62ded2779bcbbc99.tar.bz2
aports-9526ee659401dee7160f35cb62ded2779bcbbc99.tar.xz
merged x11 repository into main
ref #255
Diffstat (limited to 'main/transmission')
-rw-r--r--main/transmission/APKBUILD47
-rw-r--r--main/transmission/transmission-daemon.confd18
-rw-r--r--main/transmission/transmission-daemon.initd22
-rw-r--r--main/transmission/transmission.pre-install5
4 files changed, 92 insertions, 0 deletions
diff --git a/main/transmission/APKBUILD b/main/transmission/APKBUILD
new file mode 100644
index 000000000..7bd64c5ef
--- /dev/null
+++ b/main/transmission/APKBUILD
@@ -0,0 +1,47 @@
+# Maintainer:Carlo Landmeter
+pkgname=transmission
+pkgver=1.74
+pkgel=1
+pkgdesc="Lightweight GTK BitTorrent client"
+url="http://www.tansmissionbt.com"
+install="$pkgname.pre-install"
+license="MIT"
+depends=
+makedepends="openssl-dev pkgconfig curl-dev gtk+-dev intltool"
+source="http://download.m0k.org/transmission/files/transmission-$pkgver.tar.bz2
+ transmission-daemon.initd
+ transmission-daemon.confd
+ "
+subpackages="$pkgname-cli $pkgname-daemon $pkgname-doc"
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man
+ make || return 1
+ make DESTDIR="$pkgdir" install
+}
+
+daemon() {
+ pkgdesc="Lightweight BitTorrent client (daemon and webinterface)"
+ install -d "$subpkgdir"/usr/share "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/transmission-daemon "$subpkgdir"/usr/bin/
+ mv "$pkgdir"/usr/share/transmission "$subpkgdir"/usr/share/
+ 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
+}
+
+cli() {
+ pkgdesc="Lightweight BitTorrent client (cli and remote)"
+ install -d "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/transmission-remote \
+ "$pkgdir"/usr/bin/transmissioncli \
+ "$subpkgdir"/usr/bin/
+}
+
+md5sums="6b1080800c62308179cfc7a691c82d63 transmission-1.74.tar.bz2
+f65b8ae46f8ac89b35844109b3aa0c18 transmission-daemon.initd
+89478a70fcd93463e1dd8d751da994da transmission-daemon.confd"
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..ecf3bdafe
--- /dev/null
+++ b/main/transmission/transmission-daemon.initd
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+ after firewall
+}
+
+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