summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4158a808e4980194c2cf9db8dc38a9a5a00a3c0f (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
46
47
48
# Maintainer: Jason Nader <jason *add-dot-here* nader *you-know-what-goes-here* protonmail.com>

_pkgname="catt"
pkgname="$_pkgname-git"
pkgver=0.12.12.r0.g52a2a10
pkgrel=1
pkgdesc='Cast All The Things - Send videos from many, many online sources to your Chromecast.'
url="https://github.com/skorokithakis/catt"
license=('BSD-2-Clause')
arch=('any')

depends=('python')
makedepends=(
  'git'
  'python-installer'
  'python-poetry'
)

_pkgsrc="$_pkgname"
source=("$_pkgname"::"git+$url.git")
sha256sums=('SKIP')

provides=("$_pkgname=${pkgver%%.r*}")
conflicts=("$_pkgname")

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

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

package() {
  depends+=(
    'python-click'
    'python-pychromecast'
    'yt-dlp'
  )

  cd "$_pkgsrc"
  python -m installer --destdir="$pkgdir" dist/*.whl

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