summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1ce7ee2e24f766924087adffd553fff1bde9e856 (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
49
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=cast_control
pkgver=0.16.1
pkgrel=1
epoch=1
pkgdesc="Control Chromecasts from Linux and D-Bus"
arch=('any')
url="https://github.com/alexdelorenzo/cast_control"
license=('AGPL-3.0-or-later')
depends=(
  'python-aiopath'
  'python-app_paths'
  'python-appdirs'
  'python-click'
  'python-daemons'
  'python-gobject'
  'python-iteration-utilities'
  'python-mpris_server'
  'python-pychromecast'
  'python-pydbus'
  'python-rich'
  'python-validators'
)
makedepends=(
  'python-build'
  'python-hatchling'
  'python-installer'
  'python-wheel'
)
optdepends=(
  'playerctl: Get the D-Bus name for your device'
)
conflicts=('chromecast_mpris')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('66ff3fdb4b22140f42f9fd2db2b734246f730fde80cfa45d07fd1e0eb20b08a6')

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

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

  # Neither build nor rye pack module folder
  local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
  cp -r "src/$pkgname" "${pkgdir}${site_packages}"
}