# $Id: PKGBUILD 23076 2009-01-02 11:33:41Z alexanderf $
# Maintainer: Alexander Fehr <pizzapunk gmail com>
# Contributor: Alessio 'mOLOk' Bolognino <themolok@gmail.com>

pkgname=transmission-cli
pkgver=1.92
pkgrel=1
pkgdesc="Fast, easy, and free BitTorrent client (CLI tools, daemon and web client)"
arch=('i686' 'x86_64')
url="http://www.transmissionbt.com/"
license=('MIT')
depends=('curl')
makedepends=('intltool')
replaces=('transmission')
backup=('etc/conf.d/transmissiond')
install=transmission-cli.install
source=(http://mirrors.m0k.org/transmission/files/transmission-$pkgver.tar.bz2
        run
        finish
        transmission-cli.install
        transmissiond.conf)

build() {
  cd "$srcdir/transmission-$pkgver"

  ./configure --prefix=/usr --disable-gtk --disable-wx || return 1
  make || return 1
  make DESTDIR="$pkgdir" install || 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
}
md5sums=('561357621331f294c87f78e22783a283'
         'fd5ec0a496b6833074fd125b1fb70e47'
         'f0e4e06f7307c75ceda6ccd4e74975b5'
         'f1a15f339515f522c5895e6f40491a46'
         'd05567c7a4f9df9f28602d1356d5c05c')