diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/transmission |
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/transmission')
-rw-r--r-- | extra/transmission/PKGBUILD | 74 | ||||
-rw-r--r-- | extra/transmission/transmission-cli.install | 9 | ||||
-rw-r--r-- | extra/transmission/transmission-gtk.install | 12 | ||||
-rw-r--r-- | extra/transmission/transmissiond | 37 | ||||
-rw-r--r-- | extra/transmission/transmissiond.conf | 5 |
5 files changed, 137 insertions, 0 deletions
diff --git a/extra/transmission/PKGBUILD b/extra/transmission/PKGBUILD new file mode 100644 index 000000000..03f967d13 --- /dev/null +++ b/extra/transmission/PKGBUILD @@ -0,0 +1,74 @@ +# $Id: PKGBUILD 115693 2011-03-19 13:02:20Z ibiru $ +# Maintainer : Ionut Biru <ibiru@archlinux.org> + +pkgbase=transmission +pkgname=('transmission-cli' 'transmission-gtk' 'transmission-qt') +pkgver=2.22 +pkgrel=3 +arch=('i686' 'x86_64') +url="http://www.transmissionbt.com/" +license=('MIT') +makedepends=('intltool' 'curl' 'libnotify' 'desktop-file-utils' 'qt' 'libevent' 'libcanberra' 'dbus-glib') +source=(http://mirrors.m0k.org/transmission/files/${pkgbase}-${pkgver}.tar.bz2 + transmissiond transmissiond.conf) +md5sums=('6499986bf769276310b00bda1090090d' + '50b7c17300bc8b38f44fb6f681ba05d0' + 'be39806c35b7544856fa4070b00fc960') + +build() { + cd "${srcdir}/${pkgbase}-${pkgver}" + + export CFLAGS="$CFLAGS -fno-strict-aliasing" + + ./configure --prefix=/usr --disable-gconf2 + 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 "${srcdir}/${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 COPYING "${pkgdir}/usr/share/licenses/transmission-cli/COPYING" +} + +package_transmission-gtk() { + pkgdesc="Fast, easy, and free BitTorrent client (GTK+ GUI)" + depends=('curl' 'libevent' 'libnotify' 'desktop-file-utils' 'hicolor-icon-theme' + 'gtk2' 'dbus-glib' 'libcanberra') + optdepends=('notification-daemon: Desktop notification support' + 'transmission-cli: daemon and web support') + install=transmission-gtk.install + + cd "${srcdir}/${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') + + cd "${srcdir}/${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" +} diff --git a/extra/transmission/transmission-cli.install b/extra/transmission/transmission-cli.install new file mode 100644 index 000000000..cb6bf6050 --- /dev/null +++ b/extra/transmission/transmission-cli.install @@ -0,0 +1,9 @@ +post_install() { + cat << _EOF + + If you want to run the Transmission daemon at boot, + add transmissiond to the DAEMONS array in /etc/rc.conf. + You have to set the user in /etc/conf.d/transmissiond. + +_EOF +} diff --git a/extra/transmission/transmission-gtk.install b/extra/transmission/transmission-gtk.install new file mode 100644 index 000000000..c317fbaca --- /dev/null +++ b/extra/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/extra/transmission/transmissiond b/extra/transmission/transmissiond new file mode 100644 index 000000000..ff83bd331 --- /dev/null +++ b/extra/transmission/transmissiond @@ -0,0 +1,37 @@ +#!/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 + 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 + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 diff --git a/extra/transmission/transmissiond.conf b/extra/transmission/transmissiond.conf new file mode 100644 index 000000000..cf6c6f26e --- /dev/null +++ b/extra/transmission/transmissiond.conf @@ -0,0 +1,5 @@ +# example configuration file + +# TRANSMISSION_HOME=/home/foo +# TRANS_USER="foo" +# TRANS_ARGS="-g $TRANSMISSION_HOME/.config/transmission-daemon" |