desktop/libtorrent-rasterbar/PKGBUILD

58 lines
1.5 KiB
Bash
Raw Normal View History

2011-01-25 09:35:33 +08:00
pkgname=libtorrent-rasterbar
pkgver=1.1.11
2017-04-13 22:30:59 +08:00
_pkgver=${pkgver//./_}
2017-09-09 21:49:49 +08:00
pkgrel=1
2011-01-25 09:35:33 +08:00
pkgdesc="A C++ library that aims to be a good alternative to all the other bittorrent implementations around"
url="https://libtorrent.org/"
2013-01-20 01:06:26 +08:00
arch=('x86_64')
2014-04-13 21:57:42 +08:00
license=('BSD')
2017-04-13 22:30:59 +08:00
depends=('boost-libs' 'python2' 'python3' 'geoip' 'websocketpp')
2015-08-11 05:18:04 +08:00
makedepends=('boost' 'cmake')
2014-04-13 21:57:42 +08:00
options=('!emptydirs')
source=(https://github.com/arvidn/libtorrent/archive/libtorrent_${_pkgver}/$pkgname-$pkgver.tar.gz)
sha256sums=('d98ea107513537771ce661d17ccc16148cda1294c2d42ff4efe314482e0de441')
2011-01-25 09:35:33 +08:00
2017-04-13 22:30:59 +08:00
prepare() {
mkdir py2 py3
cd libtorrent-libtorrent_${_pkgver}
2017-04-13 22:30:59 +08:00
# Avoid depending on newer processors
sed -i 's/-msse4.2//' configure.ac
./autotool.sh
}
_build() (
cd py$1
# FS#50745
_boost="boost_python"
if [ $1 -eq 3 ]; then _boost="boost_python3"; fi
# https://github.com/qbittorrent/qBittorrent/issues/5265#issuecomment-220007436
CXXFLAGS="$CXXFLAGS -std=c++11" \
PYTHON=/usr/bin/python$1 \
../libtorrent-libtorrent_${_pkgver}/configure \
2015-08-11 05:18:04 +08:00
--prefix=/usr \
--enable-python-binding \
2017-04-13 22:30:59 +08:00
--enable-examples \
--disable-static \
--with-libiconv \
--with-boost-python=$_boost
)
build() {
_build 2
_build 3
}
package() {
2017-04-13 22:30:59 +08:00
make -C py2 DESTDIR="$pkgdir" install
make -C py3 DESTDIR="$pkgdir" install
install -Dm644 libtorrent-libtorrent_${_pkgver}/COPYING \
2017-04-13 22:30:59 +08:00
"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
# Remove most example binaries
rm "$pkgdir"/usr/bin/{*_test,*_tester,simple_client,stats_counters}
}