aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libtorrent-rasterbar/APKBUILD
blob: 609c030c2998fc7965863b308f287299bb19df80 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Contributor: August Klein <amatcoder@gmail.com>
# Maintainer: August Klein <amatcoder@gmail.com>
pkgname=libtorrent-rasterbar
pkgver=1.2.3
_pkgver=${pkgver//./_}
pkgrel=0
pkgdesc="Feature complete C++ bittorrent implementation"
options="!check" # Tests hang on all arches
url="https://www.rasterbar.com/products/libtorrent"
arch="all"
license="BSD-3-Clause"
depends_dev="boost-dev openssl-dev python3-dev"
makedepends="$depends_dev linux-headers"
subpackages="py3-$pkgname:_py3 $pkgname-static $pkgname-dev"
source="https://github.com/arvidn/libtorrent/releases/download/libtorrent-$_pkgver/libtorrent-rasterbar-$pkgver.tar.gz"

build() {
	local _py3ver=$(python3 -c 'import sys; print("{}{}".format(sys.version_info.major, sys.version_info.minor))')
	PYTHON=/usr/bin/python3 \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-tests \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-python-binding \
		--with-boost-system=boost_python$_py3ver
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

_py3() {
	pkgdesc="Python3 bindings for $pkgname"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
}

sha512sums="18cffb86c5affcde79860236440eaca492fce71f16c2ccc5e20ec0d9351fbfb6c15d97e203b61c8cf8168f86cf31459ce0b76a4b0559244f9add385434ff4ae6  libtorrent-rasterbar-1.2.3.tar.gz"