# Template file for 'libtorrent-rasterbar' # Breaks ABI/API without changing soname, revbump all dependants pkgname=libtorrent-rasterbar version=1.2.12 revision=1 build_style=cmake configure_args="-DCMAKE_CXX_STANDARD=11 -Dbuild_examples=ON -Dbuild_tools=ON -Dpython-bindings=ON" hostmakedepends="pkg-config intltool libtool python3-devel" makedepends="libressl-devel boost-devel geoip-devel python3-devel" short_desc="C++ bittorrent library by Rasterbar Software" maintainer="Jürgen Buchmüller " license="BSD-3-Clause" homepage="https://libtorrent.org/" distfiles="https://github.com/arvidn/libtorrent/releases/download/v${version}/${pkgname}-${version}.tar.gz" checksum=c3744ac9fa41f6e6ebf79538a2ea678df76a2cbbaf3ac6ae2c05455314e5cce8 if [ "$XBPS_CHECK_PKGS" ]; then configure_args+=" -Dbuild_tests=ON" fi if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then makedepends+=" libatomic-devel" fi pre_configure() { if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then vsed -i CMakeLists.txt -e "s;Threads::Threads;& atomic;" fi } post_install() { local f # Install examples. They are not installed with make install :P for f in client_test connection_tester dump_torrent simple_client upnp_test \ custom_storage make_torrent stats_counters; do vbin ${wrksrc}/build/examples/${f} done vlicense LICENSE } libtorrent-rasterbar-python3_package() { lib32disabled=yes short_desc+=" - Python3 bindings" pkg_install() { vmove "usr/lib/python3*" } } libtorrent-rasterbar-devel_package() { depends="${sourcepkg}>=${version}_${revision} libressl-devel boost-devel geoip-devel" if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then depends+=" libatomic-devel" fi short_desc+=" - development files" pkg_install() { vmove usr/include vmove usr/share/cmake vmove usr/lib/pkgconfig vmove "usr/lib/*.so" } } libtorrent-rasterbar-examples_package() { short_desc+=" - example binaries" pkg_install() { vmove usr/bin } }