PKGBUILDs/extra/libtorrent-rasterbar/PKGBUILD

65 lines
1.7 KiB
Bash
Raw Normal View History

2019-12-22 18:33:29 +00:00
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Hugo Doria <hugo@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - explicitly link v5/v6 with libatomic
pkgname=libtorrent-rasterbar
2020-06-09 20:04:12 +00:00
pkgver=1.2.7
2020-02-16 23:16:26 +00:00
pkgrel=1
2019-12-22 18:33:29 +00:00
epoch=1
pkgdesc="A C++ BitTorrent library that aims to be a good alternative to all the other implementations around"
url="https://www.rasterbar.com/products/libtorrent/"
arch=('x86_64')
license=('BSD')
depends=('boost-libs')
makedepends=('boost' 'python2' 'python')
options=('!emptydirs')
_pkgver=${pkgver//./_}
2020-06-09 20:04:12 +00:00
source=(https://github.com/arvidn/libtorrent/releases/download/libtorrent_$_pkgver/$pkgname-$pkgver.tar.gz)
sha512sums=('60dfb31b1300b3aa2219227b3a263ba73aedb54a90aa940c117027651779cb972d6e1badf9519f6ad7947233b54df608b829bab34493ceda9e4cb8913041a752')
2019-12-22 18:33:29 +00:00
prepare() {
mkdir py2 py3
cd $pkgname-$pkgver
# Avoid depending on newer processors
sed -i 's/-msse4.2//' configure.ac
autoreconf -if
}
_build() (
cd py$1
# FS#50745
_boost="boost_python"
if [ $1 -eq 3 ]; then _boost="boost_python3"; fi
[[ $CARCH == "arm" || $CARCH == "armv6h" ]] && LIBS="-latomic"
LIBS=$LIBS PYTHON=/usr/bin/python$1 \
../$pkgname-$pkgver/configure \
--prefix=/usr \
--enable-python-binding \
--enable-examples \
--disable-static \
--with-libiconv \
--with-boost-python=$_boost
)
build() {
_build 2
_build 3
}
package() {
make -C py2 DESTDIR="$pkgdir" install
make -C py3 DESTDIR="$pkgdir" install
install -Dm644 $pkgname-$pkgver/COPYING \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# Remove most example binaries
rm "$pkgdir"/usr/bin/{*_test,*_tester,simple_client,stats_counters}
}