# Maintainer:Carlo Landmeter pkgname=transmission pkgver=2.52 pkgrel=1 pkgdesc="Lightweight GTK BitTorrent client" url="http://www.tansmissionbt.com" install="transmission-daemon.pre-install transmission-daemon.post-upgrade" arch="all" license="MIT" depends= pkgusers="transmission" pkggroups="transmission" makedepends="openssl-dev pkgconfig curl-dev gtk+-dev intltool libevent-dev libnotify-dev dbus-glib-dev autoconf automake tar libcanberra-dev gconf-dev" source="http://download.m0k.org/transmission/files/transmission-$pkgver.tar.bz2 transmission-daemon.initd transmission-daemon.confd " subpackages="$pkgname-cli $pkgname-daemon $pkgname-doc $pkgname-lang" _builddir="$srcdir"/$pkgname-$pkgver prepare() { cd "$_builddir" for i in $source; do case $i in *.patch) msg "Applying $i" patch -p1 -i "$srcdir"/$i || return 1 ;; esac done } build() { cd "$_builddir" ./configure --prefix=/usr \ --mandir=/usr/share/man make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install } daemon() { pkgdesc="Lightweight BitTorrent client (daemon and webinterface)" install -d "$subpkgdir"/usr/share "$subpkgdir"/usr/bin install -d -o transmission -g transmission "$subpkgdir"/var/lib/transmission mv "$pkgdir"/usr/bin/transmission-daemon "$subpkgdir"/usr/bin/ mv "$pkgdir"/usr/share/transmission "$subpkgdir"/usr/share/ install -D -m755 "$srcdir"/transmission-daemon.initd \ "$subpkgdir"/etc/init.d/transmission-daemon install -D -m644 "$srcdir"/transmission-daemon.confd \ "$subpkgdir"/etc/conf.d/transmission-daemon } cli() { pkgdesc="Lightweight BitTorrent client (cli and remote)" install -d "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/transmission-cli \ "$pkgdir"/usr/bin/transmission-create \ "$pkgdir"/usr/bin/transmission-edit \ "$pkgdir"/usr/bin/transmission-show \ "$pkgdir"/usr/bin/transmission-remote \ "$subpkgdir"/usr/bin/ } md5sums="9490ed97a03f7b8b1ac8b0822c3dce92 transmission-2.52.tar.bz2 b44e7e7bcfb7fd1c59b3e1191d4dabb9 transmission-daemon.initd 5caf0fc25dfd67c61627f1e0313f4245 transmission-daemon.confd"