# Maintainer: Mineralwater Xu _pkgname=libtorrent-rasterbar pkgname=$_pkgname-mw pkgver=1.2.14 pkgrel=1 epoch=1 pkgdesc="A C++ BitTorrent library that aims to be a good alternative to all the other implementations around" arch=('x86_64') url="https://www.rasterbar.com/products/libtorrent/" 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=('9d23184785597a11f96e9d68ac7bd2ba73a9dbc0568c3fd81ba2f1ef2381f6ee290b48a77f1db6f7ee82aa1f6640a6a54dbfbfa7b236bb3be8a6e083dce6cd69') 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/ }