summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a8240a7815ff7b3a7b3b14f143e7c5a2183b491f (plain)
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
pkgname=libtorrent-rasterbar-1
pkgver=1.2.15
pkgrel=1
pkgdesc="A C++ BitTorrent library that aims to be a good alternative to all the other implementations around"
url="https://www.rasterbar.com/products/libtorrent/"
arch=('x86_64')
license=('BSD')
depends=('boost-libs' 'openssl')
makedepends=('boost' 'cmake' 'ninja' 'python-setuptools')
provides=("libtorrent-rasterbar=${pkgver}")
conflicts=('libtorrent-rasterbar')
options=('!emptydirs')

_snapshot="libtorrent-rasterbar-${pkgver}"
_archive="${_snapshot}.tar.gz"

source=("${_archive}::https://github.com/arvidn/libtorrent/releases/download/v${pkgver}/${_archive}")
sha512sums=('c409c53ec9c299a05b51ab61d7df1209803cbd6070f0a014dd6fb42c30f6f5230ea90848330f901c61816bc70901e618409acacc95bb0e5acb7f81211d001fa2')

build() {
    mkdir -p "${srcdir}/build" && cd "$_"

    cmake -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX="/usr" \
        -DCMAKE_INSTALL_LIBDIR="lib" \
        -Dpython-bindings=ON \
        -Dboost-python-module-name="python" \
        -Dpython-egg-info=ON \
        -GNinja "${srcdir}/${_snapshot}"

    ninja
}

package() {
    cd "${srcdir}/build"
    DESTDIR="${pkgdir}" ninja install

    cd "${srcdir}/${_snapshot}"
    install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" "COPYING"
}