72 lines
1.9 KiB
Bash
72 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.13
|
|
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="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=976d2771ffcd564f08a63351e9c22e842aaa8cd29f6f7fe25d169c038a844e85
|
|
|
|
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
|
|
}
|
|
}
|