makedepends=(boost cmake python-setuptools)

description="A C++ BitTorrent library that aims to be a good alternative to all the other implementations around"
url="http://www.rasterbar.com/products/libtorrent/"

packager="Great-OS Team"
maintainer="Great-OS Team"

name=libtorrent-rasterbar
version=2.0.11
release=11

source=(https://github.com/arvidn/libtorrent/releases/download/v$version/$name-$version.tar.gz)

prepare() {
  python3 -m ensurepip
}

build() {

  mkdir -pv 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 \
        ../$name-$version

  ninja
  DESTDIR=$PKG ninja install
}
