# Maintainer: Mineralwater Xu _pkgname=libtorrent-rasterbar pkgname=$_pkgname-mw pkgver=1.2.18 pkgrel=1 epoch=2 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=('4ac7ad6357a612bdc537d4dbce40935a43c32295773870e490d1acffab9841b2bb3052e476a91f702b7b5eb2ab3e6282792f53593cdcb06ddbd6f1d5a3097ee7') build() { cd "$_pkgname-$pkgver" cmake \ -B "_build" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_PREFIX="/usr" \ -DCMAKE_INSTALL_LIBDIR="lib" \ -Dpython-bindings=ON \ -Dboost-python-module-name="python" \ ./ make -C "_build" } package() { cd "$_pkgname-$pkgver" make -C "_build" DESTDIR="$pkgdir" install install -Dm644 "LICENSE" -t "$pkgdir/usr/share/licenses/$_pkgname/" }