# $Id: PKGBUILD 239293 2015-05-13 14:46:30Z foutrelis $
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Contributor: Hugo Doria <hugo@archlinux.org>

pkgname=libtorrent-rasterbar
pkgver=1.0.5
pkgrel=1
epoch=1
pkgdesc="A C++ BitTorrent library that aims to be a good alternative to all the other implementations around"
url="http://www.rasterbar.com/products/libtorrent/"
arch=('i686' 'x86_64')
license=('BSD')
depends=('boost-libs' 'geoip' 'python2')
makedepends=('boost')
options=('!emptydirs')
source=(http://downloads.sourceforge.net/sourceforge/libtorrent/$pkgname-$pkgver.tar.gz)
sha1sums=('f269399bf7bbc90579f8f115be40ea612c56f5c5')

build() {
  cd $pkgname-$pkgver
  PYTHON=/usr/bin/python2 \
  ./configure \
    --prefix=/usr \
    --enable-python-binding \
    --with-libgeoip=system \
    --with-libiconv
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
