summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3de731de0488950b9d99a53e25241c9f6e5e7de9 (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Maintainer: envolution
# Contributor: dreieck (https://aur.archlinux.org/account/dreieck)
# shellcheck shell=bash disable=SC2034,SC2154
# ci|forcedep=python-libpulse-git|
pkgname="pa-dlna"
pkgver=1.0
pkgrel=3
pkgdesc="Forwards audio to DLNA devices via PulseAudio or PipeWire (via 'python-libpulse')"
arch=(
  'any'
)
url="https://gitlab.com/xdegaye/pa-dlna"
license=('MIT')
provides=(
  "pa-dlna=${pkgver}"
  "upnp-cmd=${pkgver}"
  "upnp-cmd-git=${pkgver}"
  "python-pa_dlna=${pkgver}"
  "python-pa_dlna-git=${pkgver}"
  "PULSEAUDIO-DLNA-SINK"
)

depends=(
  'libpulse' # For `parec` executable
  'python'
  'python-psutil'
  'python-libpulse>=0.7'
  'python-systemd'
)

makedepends=(
  'git'
  'python-build'
  'python-flit-core'
  'python-installer'
  'python-setuptools'
  'python-wheel'
)

optdepends=(
  'ffmpeg: multiple formats support'
  'flac: flac transcoding support'
  'lame: mp3 transcoding support'
  'pulse-native-provider: To be used by a local pulseaudio implementation'
  'pipewire-pulse: To be used by a local pipewire implementation'
  'pulseaudio-dlna: Service file for pa-dlna in systemd format'
)

checkdepends=(python-pytest)

source=(
  "git+${url}.git#tag=${pkgver}"
)

sha256sums=('996f22943e03cb93fda2a1ef3ccc6731f09f0430c3e1f4ffe41e3fe3d849acc6')

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

check() {
  cd "$pkgname"
  pytest -k 'not test_main'
}

package() {
  cd "$pkgname"
  python -m installer --destdir="${pkgdir}" dist/*.whl
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
# vim:set ts=2 sw=2 et: