diff options
Diffstat (limited to 'testing/transmission')
-rw-r--r-- | testing/transmission/PKGBUILD | 78 | ||||
-rw-r--r-- | testing/transmission/transmission-cli.install | 16 | ||||
-rw-r--r-- | testing/transmission/transmission-gtk.install | 12 | ||||
-rw-r--r-- | testing/transmission/transmission-qt.install | 11 | ||||
-rw-r--r-- | testing/transmission/transmission.systemd | 11 | ||||
-rw-r--r-- | testing/transmission/transmission.tmpfiles | 1 | ||||
-rw-r--r-- | testing/transmission/transmissiond | 46 | ||||
-rw-r--r-- | testing/transmission/transmissiond.conf | 4 |
8 files changed, 179 insertions, 0 deletions
diff --git a/testing/transmission/PKGBUILD b/testing/transmission/PKGBUILD new file mode 100644 index 000000000..ca972d116 --- /dev/null +++ b/testing/transmission/PKGBUILD @@ -0,0 +1,78 @@ +# $Id: PKGBUILD 165349 2012-08-16 08:25:26Z tomegun $ +# Maintainer : Ionut Biru <ibiru@archlinux.org> + +pkgbase=transmission +pkgname=('transmission-cli' 'transmission-gtk' 'transmission-qt') +pkgver=2.61 +pkgrel=2 +arch=('i686' 'x86_64') +url="http://www.transmissionbt.com/" +license=('MIT') +makedepends=('gtk3' 'intltool' 'curl' 'qt' 'libevent') +source=(http://mirrors.m0k.org/transmission/files/$pkgbase-$pkgver.tar.xz + transmissiond transmissiond.conf transmission.systemd + transmission.tmpfiles) + +build() { + cd "$pkgbase-$pkgver" + + ./configure --prefix=/usr + make + pushd qt + qmake qtr.pro + make +} +package_transmission-cli() { + pkgdesc="Fast, easy, and free BitTorrent client (CLI tools, daemon and web client)" + depends=('curl' 'libevent') + backup=('etc/conf.d/transmissiond') + install=transmission-cli.install + + cd "$pkgbase-$pkgver" + + for dir in daemon cli web utils + do + make -C "$dir" DESTDIR="$pkgdir" install + done + + install -D -m755 "$srcdir/transmissiond" "$pkgdir/etc/rc.d/transmissiond" + install -D -m644 "$srcdir/transmissiond.conf" "$pkgdir/etc/conf.d/transmissiond" + install -D -m644 "$srcdir/transmission.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/transmission.conf" + install -D -m644 "$srcdir/transmission.systemd" "$pkgdir/usr/lib/systemd/system/transmission.service" + ln -s transmission.service "$pkgdir/usr/lib/systemd/system/transmissiond.service" + install -D -m644 COPYING "$pkgdir/usr/share/licenses/transmission-cli/COPYING" +} + +package_transmission-gtk() { + pkgdesc="Fast, easy, and free BitTorrent client (GTK+ GUI)" + depends=('curl' 'libevent' 'gtk3' 'desktop-file-utils' 'hicolor-icon-theme') + optdepends=('notification-daemon: Desktop notification support' + 'transmission-cli: daemon and web support') + install=transmission-gtk.install + + cd "$pkgbase-$pkgver" + + make -C gtk DESTDIR="$pkgdir" install + make -C po DESTDIR="$pkgdir" install + install -D -m644 COPYING "$pkgdir/usr/share/licenses/transmission-gtk/COPYING" +} + +package_transmission-qt() { + pkgdesc="Fast, easy, and free BitTorrent client (Qt GUI)" + depends=('curl' 'qt' 'libevent') + optdepends=('transmission-cli: daemon and web support') + install=transmission-qt.install + + cd "$pkgbase-$pkgver" + + make -C qt INSTALL_ROOT="$pkgdir"/usr install + + install -D -m644 COPYING "$pkgdir/usr/share/licenses/transmission-qt/COPYING" + install -D -m644 qt/icons/transmission.png "$pkgdir/usr/share/pixmaps/transmission-qt.png" + install -D -m644 qt/transmission-qt.desktop "$pkgdir/usr/share/applications/transmission-qt.desktop" +} +md5sums=('2ed5b7815ebda65223bac6bdb09dec42' + '7d6186ee2a852ae3d44980f05063e194' + 'db72b02fee139e8ab416324e6c044d76' + 'ecccabbc301d1024c9ef6a7f4aaa530a' + '23f2320361ad54373c3a4551ef634fe8') diff --git a/testing/transmission/transmission-cli.install b/testing/transmission/transmission-cli.install new file mode 100644 index 000000000..d99dcf8b7 --- /dev/null +++ b/testing/transmission/transmission-cli.install @@ -0,0 +1,16 @@ +post_install() { + cat << _EOF + + If you want to run the Transmission daemon at boot, + add transmissiond to the DAEMONS array in /etc/rc.conf. + +_EOF +} + +post_upgrade() { + # create user/group that the daemon will run as by default, do not delete this on uninstall, as it will own files + getent group transmission >/dev/null || groupadd -g 169 transmission + getent passwd transmission >/dev/null || useradd -c 'Transmission BitTorrent Client' -u 169 -g transmission -b '/var/lib' -s /bin/false transmission + passwd -l transmission &>/dev/null + systemd-tmpfiles --create transmission.conf +} diff --git a/testing/transmission/transmission-gtk.install b/testing/transmission/transmission-gtk.install new file mode 100644 index 000000000..c317fbaca --- /dev/null +++ b/testing/transmission/transmission-gtk.install @@ -0,0 +1,12 @@ +post_install() { + update-desktop-database -q + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/testing/transmission/transmission-qt.install b/testing/transmission/transmission-qt.install new file mode 100644 index 000000000..e111ef946 --- /dev/null +++ b/testing/transmission/transmission-qt.install @@ -0,0 +1,11 @@ +post_install() { + update-desktop-database -q +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +} diff --git a/testing/transmission/transmission.systemd b/testing/transmission/transmission.systemd new file mode 100644 index 000000000..2ca0dedf7 --- /dev/null +++ b/testing/transmission/transmission.systemd @@ -0,0 +1,11 @@ +[Unit] +Description=Transmission Bit Torrent Daemon + +[Service] +User=transmission +Type=forking +PIDFile=/run/transmission/transmission.pid +ExecStart=/usr/bin/transmission-daemon --pid-file /run/transmission/transmission.pid + +[Install] +WantedBy=multi-user.target diff --git a/testing/transmission/transmission.tmpfiles b/testing/transmission/transmission.tmpfiles new file mode 100644 index 000000000..b603066c1 --- /dev/null +++ b/testing/transmission/transmission.tmpfiles @@ -0,0 +1 @@ +d /run/transmission - transmission transmission - diff --git a/testing/transmission/transmissiond b/testing/transmission/transmissiond new file mode 100644 index 000000000..ea3d770f9 --- /dev/null +++ b/testing/transmission/transmissiond @@ -0,0 +1,46 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/transmissiond + +PID=`pidof -o %PPID /usr/bin/transmission-daemon` +case "$1" in + start) + stat_busy "Starting Transmission Daemon" + [ -z "$PID" ] && su -l -s /bin/sh -c "/usr/bin/transmission-daemon $TRANS_ARGS" "${TRANS_USER:-transmission}" + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon transmissiond + stat_done + fi + ;; + stop) + stat_busy "Stopping Transmission Daemon" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon transmissiond + stat_done + fi + ;; + restart) + $0 stop + while [ ! -z "$PID" -a -d "/proc/$PID" ]; do sleep 1; done + $0 start + ;; + reload) + stat_busy "Reloading config" + [ ! -z "$PID" ] && kill -HUP $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + fi + ;; + *) + echo "usage: $0 {start|stop|restart|reload}" +esac +exit 0 diff --git a/testing/transmission/transmissiond.conf b/testing/transmission/transmissiond.conf new file mode 100644 index 000000000..45a9fd51d --- /dev/null +++ b/testing/transmission/transmissiond.conf @@ -0,0 +1,4 @@ +# example configuration file + +# TRANS_USER="transmission" +# TRANS_ARGS="" |