summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD101
2 files changed, 57 insertions, 68 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 673729132885..4ce5ed95c3db 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,28 @@
pkgbase = libtorrent-rasterbar-git
pkgdesc = A C++ BitTorrent library that aims to be a good alternative to all the other implementations around (git version)
- pkgver = 1.2.RC2.r32.g3e582100d
+ pkgver = 2.0.7.r503.g5e9b0fabb
pkgrel = 1
url = https://www.rasterbar.com/products/libtorrent/
- arch = i686
arch = x86_64
license = BSD
makedepends = git
+ makedepends = cmake
makedepends = boost
- makedepends = python2
- makedepends = python
- depends = boost-libs
- optdepends = python2: for python2 bindings
- optdepends = python: for python3 bindings
+ depends = gcc-libs
+ depends = openssl
provides = libtorrent-rasterbar
conflicts = libtorrent-rasterbar
- source = libtorrent-rasterbar::git+https://github.com/arvidn/libtorrent.git
+ source = libtorrent-rasterbar::git+https://github.com/arvidn/libtorrent.git#branch=master
+ source = git+https://github.com/arvidn/libsimulator.git
+ source = git+https://github.com/arvidn/try_signal.git
+ source = git+https://github.com/paullouisageneau/boost-asio-gnutls.git
+ source = git+https://github.com/paullouisageneau/libdatachannel.git
+ source = json-vinniefalco::git+https://github.com/vinniefalco/json.git
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
sha256sums = SKIP
pkgname = libtorrent-rasterbar-git
-
diff --git a/PKGBUILD b/PKGBUILD
index 6dbff271f755..ca61414c0289 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,79 +1,62 @@
-# Maintainer : Daniel Bermond < gmail-com: danielbermond >
+# Maintainer : Daniel Bermond <dbermond@archlinux.org>
pkgname=libtorrent-rasterbar-git
-pkgver=1.2.RC2.r32.g3e582100d
+pkgver=2.0.7.r503.g5e9b0fabb
pkgrel=1
pkgdesc='A C++ BitTorrent library that aims to be a good alternative to all the other implementations around (git version)'
url='https://www.rasterbar.com/products/libtorrent/'
-arch=('i686' 'x86_64')
+arch=('x86_64')
license=('BSD')
-depends=('boost-libs')
-makedepends=('git' 'boost' 'python2' 'python')
-optdepends=('python2: for python2 bindings'
- 'python: for python3 bindings')
+depends=('gcc-libs' 'openssl')
+makedepends=('git' 'cmake' 'boost') # 'python' 'python-setuptools'
+#optdepends=('boost-libs: for python bindings'
+# 'python: for python bindings')
provides=('libtorrent-rasterbar')
conflicts=('libtorrent-rasterbar')
-source=('libtorrent-rasterbar'::'git+https://github.com/arvidn/libtorrent.git')
-sha256sums=('SKIP')
+source=('libtorrent-rasterbar'::'git+https://github.com/arvidn/libtorrent.git#branch=master'
+ 'git+https://github.com/arvidn/libsimulator.git'
+ 'git+https://github.com/arvidn/try_signal.git'
+ 'git+https://github.com/paullouisageneau/boost-asio-gnutls.git'
+ 'git+https://github.com/paullouisageneau/libdatachannel.git'
+ 'json-vinniefalco'::'git+https://github.com/vinniefalco/json.git')
+sha256sums=('SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP'
+ 'SKIP')
prepare() {
- cd libtorrent-rasterbar
-
- mkdir -p py2 py3
-
- # avoid depending on newer processors
- sed -i 's/-msse4.2//' configure.ac
-
- ./autotool.sh
+ git -C libtorrent-rasterbar submodule init
+ git -C libtorrent-rasterbar config --local submodule.simulation/libsimulator.url "${srcdir}/libsimulator"
+ git -C libtorrent-rasterbar config --local submodule.deps/try_signal.url "${srcdir}/try_signal"
+ git -C libtorrent-rasterbar config --local submodule.deps/asio-gnutls.url "${srcdir}/boost-asio-gnutls"
+ git -C libtorrent-rasterbar config --local submodule.deps/libdatachannel.url "${srcdir}/libdatachannel"
+ git -C libtorrent-rasterbar config --local submodule.deps/json.url "${srcdir}/json-vinniefalco"
+ git -C libtorrent-rasterbar -c protocol.file.allow='always' submodule update
}
pkgver() {
- cd libtorrent-rasterbar
-
- # git, tags available
- git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/_/./g;s/^libtorrent\.//'
-}
-
-_build() {
- cd "${srcdir}/libtorrent-rasterbar/py${1}"
-
- printf '%s\n' "Building for python${1}..."
-
- # FS#50745
- [ "$1" -eq '2' ] && local _boost='boost_python'
- [ "$1" -eq '3' ] && local _boost='boost_python3'
-
- # force C++11 mode (needed by qBittorrent)
- # https://github.com/qbittorrent/qBittorrent/issues/5265#issuecomment-220007436
- export CXXFLAGS="${CXXFLAGS} -std=c++11"
-
- export PYTHON="/usr/bin/python${1}"
-
- ../configure \
- --prefix='/usr' \
- --enable-python-binding \
- --enable-examples \
- --disable-static \
- --with-libiconv \
- --with-boost-python="${_boost}"
-
- make
+ git -C libtorrent-rasterbar describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/_/./g;s/^libtorrent.//;s/^v//'
}
build() {
- _build 2
- _build 3
+ # NOTE: needs -Dboost-python-module-name to specify the correct boost python cmake config file
+ # https://github.com/arvidn/libtorrent/blob/5e9b0fabb3a4117b8848fbab5bd153dfa51bf70f/bindings/python/CMakeLists.txt#L3-L9
+
+ # NOTE: python bindings fails to build at the time of the last package update, disabling it
+
+ cmake -B build -S libtorrent-rasterbar \
+ -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
+ -DCMAKE_SKIP_RPATH:BOOL='YES' \
+ -Dpython-bindings:BOOL='OFF' \
+ -Dboost-python-module-name='python' \
+ -Dpython-egg-info='ON' \
+ -Wno-dev
+ make -C build
}
package() {
- cd libtorrent-rasterbar
-
- make -C py2 DESTDIR="$pkgdir" install
- make -C py3 DESTDIR="$pkgdir" install
-
- # license
- install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-
- # remove most example binaries
- rm "$pkgdir"/usr/bin/{*_test,*_tester,simple_client,stats_counters}
+ make -C build DESTDIR="$pkgdir" install
+ install -D -m644 libtorrent-rasterbar/COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}