summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e55c0eedc35f2afed2d04a70de29c3f51f60db15 (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
41
42
43
44
45
# Maintainer: Jason Nader <jason *add-dot-here* nader *you-know-what-goes-here* protonmail.com>

_pkgname='catt'
pkgname="$_pkgname-git"
pkgver=0.12.10.r1.g82cd0fe
pkgrel=1
pkgdesc='Cast All The Things - Send videos from many, many online sources to your Chromecast.'
arch=('any')
url="https://github.com/skorokithakis/catt"
license=('BSD')
depends=()
makedepends=(
  'git'
  'python-installer'
  'python-poetry'
  'python-setuptools'
)
source=("$_pkgname"::"git+$url")
sha256sums=('SKIP')
provides=("$_pkgname")
conflicts=(${provides[@]})

pkgver() {
  cd "$_pkgname"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$_pkgname"
  python -m poetry build --format wheel
}

package() {
  depends+=(
    'python-click'
    'python-importlib-metadata'  # silence namcap warning
    'python-pychromecast'
    'yt-dlp'
  )

  cd "$_pkgname"
  install -Dm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
  install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
  python -m installer --destdir="$pkgdir" dist/*.whl
}