# Maintainer: Mineralwater Xu _pkgname=libtorrent-rasterbar pkgname=$_pkgname-mw pkgver=1.2.15 pkgrel=4 epoch=1 pkgdesc="A C++ BitTorrent library that aims to be a good alternative to all the other implementations around" url="https://www.rasterbar.com/products/libtorrent/" arch=('x86_64') license=('BSD') depends=('boost-libs' 'openssl') makedepends=('boost' 'cmake' 'ninja' 'python-setuptools') options=('!emptydirs') provides=('libtorrent-rasterbar') conflicts=('libtorrent-rasterbar') source=(https://github.com/arvidn/libtorrent/releases/download/v$pkgver/$_pkgname-$pkgver.tar.gz) sha512sums=('c409c53ec9c299a05b51ab61d7df1209803cbd6070f0a014dd6fb42c30f6f5230ea90848330f901c61816bc70901e618409acacc95bb0e5acb7f81211d001fa2') prepare() { mkdir -p build } build() { cd build cmake -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX="/usr" \ -DCMAKE_INSTALL_LIBDIR="lib" \ -Dpython-bindings=ON \ -Dboost-python-module-name="python" \ -Dpython-egg-info=ON \ -GNinja ../$_pkgname-$pkgver ninja } package() { cd build DESTDIR="$pkgdir" ninja install install -Dm644 ../$_pkgname-$pkgver/COPYING -t "$pkgdir"/usr/share/licenses/$_pkgname/ }