summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d185fed8a3bd0edc0594f86858da80db7b694dbc (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
# Maintainer: Aayush Kumar <aayush214.kumar@gmail.com>
pkgname=torrcli
pkgver=0.3.3
pkgrel=1
pkgdesc="A cli based torrent client built with libtorrent"
arch=('x86_64')
url="https://github.com/aayushkdev/torrcli"
license=('MIT')
depends=('python' 'python-pip' 'libtorrent-rasterbar' 'python-rich' 'python-torrfetch' 'systemd')
makedepends=('python-setuptools' 'python-wheel' 'python-build' 'python-installer')
install="torrcli.install"
source=(
    "https://github.com/aayushkdev/torrcli/archive/refs/tags/v${pkgver}.tar.gz"
    "torrcli.service"
    "torrcli.install"
)

build() {
    cd "$srcdir/${pkgname}-${pkgver}"
    python -m build --wheel --no-isolation
}

package() {
    cd "$srcdir/${pkgname}-${pkgver}"
    python -m installer --destdir="$pkgdir" dist/*.whl

    sed 's|__PYTHON__|/usr/bin/python|' "$srcdir/torrcli.service" > torrcli.service.patched
    install -Dm644 torrcli.service.patched "$pkgdir/usr/lib/systemd/system/torrcli.service"

    install -Dm644 torrcli.conf.example "$pkgdir/usr/share/torrcli/torrcli.conf.example"
}
sha256sums=('SKIP'
            'SKIP'
            'SKIP')