summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6cba0611369edbcafa8971e2961e22fd7bb650aa (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
# Maintainer: Adam Perkowski <adas1per@protonmail.com>
# https://github.com/adamperkowski/PKGBUILDs
pkgname=doccli
pkgver=2.10
pkgrel=1
pkgdesc='CLI do oglÄ…dania anime z docchi.pl'
arch=('any')
url="https://github.com/TowarzyszFatCat/$pkgname"
license=('GPL-3.0')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('2dcd98f8e052074e8e4669a7f65e96604ac591cd263f0dd182cb321ddc5bcfe3')
depends=('mpv' 'yt-dlp' 'python>=3.9')

build() {
    cd "$pkgname-$pkgver"

    python3 -m venv venv
    source venv/bin/activate
    pip install requests yt-dlp inquirerpy termcolor
    pip install https://github.com/qwertyquerty/pypresence/archive/master.zip
    deactivate
}

package() {
    cd "$pkgname-$pkgver"

    install -Dm0755 *.py -t "$pkgdir/usr/lib/$pkgname"
    cp -r venv "$pkgdir/usr/lib/$pkgname/venv"

    install -Dm0755 "../$pkgname.sh" "$pkgdir/usr/bin/$pkgname"
    install -Dm0755 "${pkgname}_skip.lua" -t "$pkgdir/usr/share/mpv/scripts"

    install -Dm644 icon.ico "$pkgdir/usr/share/icons/$pkgname.ico"
    install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
    install -Dm644 DISCLAIMER.md -t "$pkgdir/usr/share/doc/$pkgname"
    install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}