void-packages/srcpkgs/libtorrent-rasterbar/template
2021-10-09 08:01:08 -04:00

71 lines
1.9 KiB
Bash

# Template file for 'libtorrent-rasterbar'
# Breaks ABI/API without changing soname, revbump all dependants
pkgname=libtorrent-rasterbar
version=1.2.14
revision=2
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="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=9e27bf359b45236d4490960faffc796528f3adbdea6aeb6881d39f310e27953f
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} openssl-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
}
}