diff options
Diffstat (limited to 'community')
-rw-r--r-- | community/libtorrent-rasterbar/APKBUILD | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/community/libtorrent-rasterbar/APKBUILD b/community/libtorrent-rasterbar/APKBUILD new file mode 100644 index 0000000000..226dc4ae92 --- /dev/null +++ b/community/libtorrent-rasterbar/APKBUILD @@ -0,0 +1,61 @@ +# Contributor: August Klein <amatcoder@gmail.com> +# Maintainer: August Klein <amatcoder@gmail.com> +pkgname=libtorrent-rasterbar +pkgver=1.2.14 +pkgrel=0 +pkgdesc="Feature complete C++ bittorrent implementation" +url="https://www.rasterbar.com/products/libtorrent" +arch="all !armv7" +license="BSD-3-Clause" +depends_dev="boost-build boost-dev openssl-dev python3-dev py3-setuptools automake autoconf" +makedepends="$depends_dev linux-headers" +subpackages="py3-$pkgname:_py3 $pkgname-static $pkgname-dev" +source=" + https://github.com/arvidn/libtorrent/releases/download/v$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 \ + --with-std=c++14 + make +} + +check() { + make check +} + +package() { + make DESTDIR="$pkgdir" install + + cd bindings/python + python3 setup.py install --prefix /usr --root "$pkgdir/python" +} + +dev() { + default_dev + + mkdir -p "$subpkgdir/usr/share" + mv "$pkgdir/usr/share/cmake" "$subpkgdir/usr/share" +} + +_py3() { + pkgdesc="Python3 bindings for $pkgname" + + rm -rfv "$pkgdir"/usr/lib/python* + mv "$pkgdir/python" "$subpkgdir" +} + +sha512sums=" +9d23184785597a11f96e9d68ac7bd2ba73a9dbc0568c3fd81ba2f1ef2381f6ee290b48a77f1db6f7ee82aa1f6640a6a54dbfbfa7b236bb3be8a6e083dce6cd69 libtorrent-rasterbar-1.2.14.tar.gz +" |