void-packages/srcpkgs/libtorrent-rasterbar/template

74 lines
2.0 KiB
Bash

# Template file for 'libtorrent-rasterbar'
pkgname=libtorrent-rasterbar
version=1.2.4
revision=1
build_style=gnu-configure
configure_args="--enable-examples --enable-python-binding
--with-boost=${XBPS_CROSS_BASE}/usr
--with-boost-python=boost_python${py3_ver//./}"
hostmakedepends="automake pkg-config intltool libtool python3-devel"
makedepends="libressl-devel boost-devel geoip-devel python3-devel"
short_desc="C++ bittorrent library by Rasterbar Software"
maintainer="Eivind Uggedal <eivind@uggedal.com>"
license="BSD-3-Clause"
homepage="https://libtorrent.org/"
distfiles="https://github.com/arvidn/libtorrent/releases/download/libtorrent-${version//./_}/libtorrent-rasterbar-${version}.tar.gz"
checksum=8759bddb589006ee164438588adaf007325b3bcaf6ae4c64d87a2b914409c680
if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
makedepends+=" libatomic-devel"
LDFLAGS+=" -latomic"
fi
pre_configure() {
local _py3_ver=${py3_ver}${py3_abiver}
export PYTHON_CPPFLAGS="-I${XBPS_CROSS_BASE}/usr/include/python${_py3_ver}"
export PYTHON_CXXFLAGS="-I${XBPS_CROSS_BASE}/usr/include/python${_py3_ver}"
export PYTHON_EXTRA_LDFLAGS="-L${XBPS_CROSS_BASE}/usr/lib -lpython${_py3_ver}"
autoreconf -fi
}
pre_build() {
if [ "$CROSS_BUILD" ]; then
for f in ${XBPS_CROSS_BASE}/${py3_lib}/_sysconfigdata_*; do
f=${f##*/}
export _PYTHON_SYSCONFIGDATA_NAME=${f%.py}
done
export PYTHONPATH=${XBPS_CROSS_BASE}/${py3_lib}
fi
}
pre_install() {
pre_build
}
post_install() {
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"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
vmove "usr/lib/*.a"
}
}
libtorrent-rasterbar-examples_package() {
short_desc+=" - example binaries"
pkg_install() {
vmove usr/bin
}
}