aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libtorrent-rasterbar/APKBUILD
blob: b4758c3909ffee54b3c5fd59c07afdc40d0faeee (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
48
49
50
51
52
# Contributor: August Klein <amatcoder@gmail.com>
# Maintainer: August Klein <amatcoder@gmail.com>
pkgname=libtorrent-rasterbar
pkgver=1.2.10
pkgrel=1
pkgdesc="Feature complete C++ bittorrent implementation"
options="!check" # Tests hang on all arches
url="https://www.rasterbar.com/products/libtorrent"
arch="all !armv7"
license="BSD-3-Clause"
depends_dev="boost-dev openssl-dev python3-dev automake autoconf"
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
	cxx14.patch
	"

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 \
		--with-std=c++14
	make
}

check() {
	make check
}

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

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

sha512sums="50f912d85eefa94c560613cf53d9a2cb00bf4ed800f15e7a43dca35dd941a931a681d1d9ac7305cde0b435bdcf7c6e76a71fbb60d95aefbdca6f982d57b3951f  libtorrent-rasterbar-1.2.10.tar.gz
a3126164ec35260f3d388471adee08e19e4e39d189c7bdaba1634f6b86ce13a3b41c9a1f3a2c9a012a03f968942257bc3226983b5260687fbbff80ab324eddfe  cxx14.patch"