# Maintainer: Mineralwater Xu _pkgname=libtorrent-rasterbar pkgname=$_pkgname-mw pkgver=1.2.19 pkgrel=3 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=('b427c03efc9601f57bcd0473064191f77fb73a25abcb006e332c7b4b9140158a2f866418363fc13f594d6bd836d1c8b3902e2bef60fc5579f2d0d0c267a18ecd') 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/" }