PKGBUILDs/extra/libtorrent-rasterbar/PKGBUILD

55 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
2021-01-17 20:14:31 +00:00
pkgver=1.2.11
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')
2020-12-02 16:21:54 +00:00
makedepends=('boost' 'python')
2019-12-22 18:33:29 +00:00
options=('!emptydirs')
2021-01-17 20:14:31 +00:00
source=(https://github.com/arvidn/libtorrent/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz
2020-12-02 16:21:54 +00:00
$pkgname-cxx14-fix.patch::https://github.com/arvidn/libtorrent/pull/5026.patch)
2021-01-17 20:14:31 +00:00
sha512sums=('abcfaa9f22f9adc030f0c4ec8dfd2e5070d1177cc2cf0bcb4e08dfca1b2e806a5c90a82d1860b5dc51efe3e8d2bea3c1d3d966c132a39bfdd5d4791e59bb503a'
2020-12-02 16:21:54 +00:00
'94ddc3bdfc33f7b5300cc01b7c821dbd9a1433cae93bb7d467a1a732e84e7be4a6e75fbd69e88802e2eecca9c8541ecd1856d4ca2b508af224562cb05de80cca')
2019-12-22 18:33:29 +00:00
prepare() {
cd $pkgname-$pkgver
2020-09-23 13:50:19 +00:00
# https://bugs.archlinux.org/task/67754
2020-12-02 16:21:54 +00:00
patch -p1 -i ../$pkgname-cxx14-fix.patch
2019-12-22 18:33:29 +00:00
# Avoid depending on newer processors
sed -i 's/-msse4.2//' configure.ac
autoreconf -if
}
2020-12-02 16:21:54 +00:00
build() {
cd $pkgname-$pkgver
2019-12-22 18:33:29 +00:00
[[ $CARCH == "arm" || $CARCH == "armv6h" ]] && LIBS="-latomic"
2020-12-02 16:21:54 +00:00
LIBS=$LIBS ./configure \
2019-12-22 18:33:29 +00:00
--prefix=/usr \
--enable-python-binding \
--enable-examples \
--disable-static \
--with-libiconv \
2020-12-02 16:21:54 +00:00
--with-boost-python=boost_python3
2019-12-22 18:33:29 +00:00
}
package() {
2020-12-02 16:21:54 +00:00
cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
2019-12-22 18:33:29 +00:00
# Remove most example binaries
rm "$pkgdir"/usr/bin/{*_test,*_tester,simple_client,stats_counters}
}