void-packages/srcpkgs/libtorrent-rasterbar/template

67 lines
1.8 KiB
Bash

# Template file for 'libtorrent-rasterbar'
# Breaks ABI/API without changing soname, revbump all dependants
pkgname=libtorrent-rasterbar
version=2.0.10
revision=1
build_style=cmake
configure_args="-Dbuild_examples=ON -Dbuild_tools=ON
-Dpython-bindings=ON -Dbuild_tests=ON"
hostmakedepends="pkg-config gettext python3-devel python3-setuptools"
makedepends="openssl-devel boost-devel geoip-devel python3-devel"
short_desc="C++ bittorrent library by Rasterbar Software"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD-3-Clause"
homepage="https://libtorrent.org/"
distfiles="https://github.com/arvidn/libtorrent/releases/download/v${version}/${pkgname}-${version}.tar.gz"
checksum=fc935b8c1daca5c0a4d304bff59e64e532be16bb877c012aea4bda73d9ca885d
CXXFLAGS="-std=c++14"
# TODO: The test_resume failed in CI for i686 but passed with xbps-uunshare
make_check=ci-skip
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} openssl-devel boost-devel geoip-devel"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/share/cmake
vmove usr/lib/cmake
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
}
}
libtorrent-rasterbar-examples_package() {
short_desc+=" - example binaries"
pkg_install() {
vmove usr/bin
}
}