From 5c2677cd9496cf474c8536e2eb3c0173ec1b8acb Mon Sep 17 00:00:00 2001 From: James Meyer Date: Sat, 30 Jan 2010 22:41:55 -0600 Subject: transmission-cli: updated pkgbuild with attached from FS#604 closes FS#604 --- .../community/transmission-cli/ChangeLog | 60 ---------------------- .../community/transmission-cli/PKGBUILD | 19 ++++--- .../community/transmission-cli/finish | 15 ++++++ abs/extra-testing/community/transmission-cli/run | 35 +++++++++++++ .../transmission-cli/transmission-cli.install | 14 ++++- .../community/transmission-cli/transmissiond | 37 ------------- .../community/transmission-cli/transmissiond.conf | 3 +- 7 files changed, 77 insertions(+), 106 deletions(-) delete mode 100644 abs/extra-testing/community/transmission-cli/ChangeLog create mode 100755 abs/extra-testing/community/transmission-cli/finish create mode 100755 abs/extra-testing/community/transmission-cli/run delete mode 100644 abs/extra-testing/community/transmission-cli/transmissiond diff --git a/abs/extra-testing/community/transmission-cli/ChangeLog b/abs/extra-testing/community/transmission-cli/ChangeLog deleted file mode 100644 index 57a8a01..0000000 --- a/abs/extra-testing/community/transmission-cli/ChangeLog +++ /dev/null @@ -1,60 +0,0 @@ -2008-12-27 Alexander Fehr - - * transmission-cli-1.42-1: - New upstream release. - -2008-11-26 Alexander Fehr - - * transmission-cli-1.40-1: - New upstream release. - Enabled web client. - -2008-09-17 Alexander Fehr - - * transmission-cli-1.34-1: - New upstream release. - -2008-08-23 Alexander Fehr - - * transmission-cli-1.33-1: - New upstream release. - -2008-08-09 Alexander Fehr - - * transmission-cli-1.32-1: - New upstream release. - -2008-08-07 Alexander Fehr - - * transmission-cli-1.31-1: - New upstream release. - Replaced transmission-remote -q with kill in init script. - Removed install message on upgrade. - -2008-07-20 Alexander Fehr - - * transmission-cli-1.22-1: - New upstream release. - Renamed from transmission to transmission-cli. - New maintainer. - Split out GTK+ GUI into transmission-gtk. - Changed url. - Added make dependency on intltool. - Cleaned up init script. - Cleaned up install file. - -2008-01-07 Varun Acharya - - * transmission-1.00-1: - Adopted and moved to extra. - -2007-06-26 Alessio 'mOLOk' Bolognino - - * transmission-0.72-4: - I had to use gentoo's sources because the tarball provided by the official site is broken. - transmission-{daemon,remote} are back. - -2007-06-19 Alessio 'mOLOk' Bolognino - - * transmission-0.72-3: - Rebuild against libevent-1.3b. diff --git a/abs/extra-testing/community/transmission-cli/PKGBUILD b/abs/extra-testing/community/transmission-cli/PKGBUILD index a3791fc..31affc9 100644 --- a/abs/extra-testing/community/transmission-cli/PKGBUILD +++ b/abs/extra-testing/community/transmission-cli/PKGBUILD @@ -3,7 +3,7 @@ # Contributor: Alessio 'mOLOk' Bolognino pkgname=transmission-cli -pkgver=1.42 +pkgver=1.76 pkgrel=1 pkgdesc="Fast, easy, and free BitTorrent client (CLI tools, daemon and web client)" arch=('i686' 'x86_64') @@ -15,11 +15,15 @@ replaces=('transmission') backup=('etc/conf.d/transmissiond') install=transmission-cli.install source=(http://mirrors.m0k.org/transmission/files/transmission-$pkgver.tar.bz2 - transmissiond + run + finish + transmission-cli.install transmissiond.conf) -md5sums=('c083bdcb01426466e80ee339bccd9351' - 'e2326d412e25b4449ff663a5d4015e1a' - '7b019a710493ec4f8b54a1f528e1981d') +md5sums=('ac44511ba4c203998be3079626126ede' + 'fd5ec0a496b6833074fd125b1fb70e47' + 'f0e4e06f7307c75ceda6ccd4e74975b5' + 'f1a15f339515f522c5895e6f40491a46' + 'd05567c7a4f9df9f28602d1356d5c05c') build() { cd "$srcdir/transmission-$pkgver" @@ -28,7 +32,10 @@ build() { make || return 1 make DESTDIR="$pkgdir" install || return 1 - install -D -m755 "$srcdir/transmissiond" "$pkgdir/etc/rc.d/transmissiond" || return 1 + mkdir -p -m744 "$pkgdir/etc/sv/transmissiond" || return 1 + mkdir -p -m777 "$pkgdir/myth/transmission" || return 1 + install -D -m755 "$srcdir/run" "$pkgdir/etc/sv/transmissiond/run" || return 1 + install -D -m755 "$srcdir/finish" "$pkgdir/etc/sv/transmissiond/finish" || return 1 install -D -m644 "$srcdir/transmissiond.conf" "$pkgdir/etc/conf.d/transmissiond" || return 1 install -D -m644 COPYING "$pkgdir/usr/share/licenses/transmission-cli/COPYING" || return 1 diff --git a/abs/extra-testing/community/transmission-cli/finish b/abs/extra-testing/community/transmission-cli/finish new file mode 100755 index 0000000..7a09e4f --- /dev/null +++ b/abs/extra-testing/community/transmission-cli/finish @@ -0,0 +1,15 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/transmissiond + +PID=`pidof -o %PPID /usr/bin/transmission-daemon` + stat_runit "Stopping Transmission Daemon" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -ne 0 ]; then + stat_fail + else + rm_daemon transmissiond + stat_done + fi diff --git a/abs/extra-testing/community/transmission-cli/run b/abs/extra-testing/community/transmission-cli/run new file mode 100755 index 0000000..6bcab36 --- /dev/null +++ b/abs/extra-testing/community/transmission-cli/run @@ -0,0 +1,35 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/transmissiond + +CONFIGDIR=/home/$TRANS_USER/.config/transmission-daemon +PID=`pidof -o %PPID /usr/bin/transmission-daemon` +# Update the block lists - try to keep the bad guys out. + cd ${CONFIGDIR}/blocklists + if [ $? -eq 0 ]; then + find . -mtime +4 -type f -name level1 -exec rm {} \; + if [ ! -f ${CONFIGDIR}/blocklists/level1 ]; then + # update blocklist + # echo "updating blocklist, ~4MB" + wget -q -O level1.gz http://download.m0k.org/transmission/files/level1.gz + if [ -f level1.gz ]; then + gunzip level1.gz + if [ $? -eq 0 ]; then + chmod go+r level1 + else + rm -f level1* + fi + fi + fi + cd - 2>&1 >/dev/null + fi + stat_runit "Starting Transmission Daemon" + [ -z "$PID" ] && su -l -c "/usr/bin/nice -n 19 /usr/bin/transmission-daemon $TRANS_OPTS" $TRANS_USER 2>/dev/null + if [ $? -ne 0 ]; then + stat_fail + else + add_daemon transmissiond + stat_done + fi diff --git a/abs/extra-testing/community/transmission-cli/transmission-cli.install b/abs/extra-testing/community/transmission-cli/transmission-cli.install index cb6bf60..d69601d 100644 --- a/abs/extra-testing/community/transmission-cli/transmission-cli.install +++ b/abs/extra-testing/community/transmission-cli/transmission-cli.install @@ -2,8 +2,18 @@ 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. + run add_service.sh transmissiond as root. + + You can edit the user and options in /etc/conf.d/transmissiond. + + There is a lot of good information on setting up a web + interface proxy through lighttpd at: + http://mybookworld.wikidot.com/transmission + + Configuration file editing information can be found at: + http://trac.transmissionbt.com/wiki/ConfigFiles + _EOF + } diff --git a/abs/extra-testing/community/transmission-cli/transmissiond b/abs/extra-testing/community/transmission-cli/transmissiond deleted file mode 100644 index b2c9322..0000000 --- a/abs/extra-testing/community/transmission-cli/transmissiond +++ /dev/null @@ -1,37 +0,0 @@ -#!/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 -c "/usr/bin/transmission-daemon" $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 - sleep 1 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac -exit 0 diff --git a/abs/extra-testing/community/transmission-cli/transmissiond.conf b/abs/extra-testing/community/transmission-cli/transmissiond.conf index 8f1275b..d642c01 100644 --- a/abs/extra-testing/community/transmission-cli/transmissiond.conf +++ b/abs/extra-testing/community/transmission-cli/transmissiond.conf @@ -1 +1,2 @@ -TRANS_USER="" +TRANS_USER="mythtv" +TRANS_OPTS="-f -ep -w /myth/transmission" -- cgit v0.12