aboutsummaryrefslogtreecommitdiffstats
path: root/community/playerctl/APKBUILD
blob: ff6a451160e5864f01cdc01323f7a90ab768f955 (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
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Steven Guikal <void@fluix.one>
pkgname=playerctl
pkgver=2.4.1
pkgrel=3
pkgdesc="MPRIS command-line controller for music players"
url="https://github.com/altdesktop/playerctl"
arch="all"
license="LGPL-3.0-or-later"
makedepends="
	glib-dev
	gobject-introspection-dev
	meson
	"
checkdepends="
	dbus-x11
	py3-dbus-next
	py3-pytest
	py3-pytest-asyncio
	py3-pytest-timeout
	"
subpackages="
	$pkgname-dev
	$pkgname-doc
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/altdesktop/playerctl/archive/v$pkgver.tar.gz"

build() {
	abuild-meson \
		-Dgtk-doc=false \
		-Dintrospection=true \
		. output
	meson compile -C output
}

check() {
	export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:./output/playerctl"
	export PATH="$PATH:./output/playerctl"
	# Require dbus-daemon
	dbus-run-session -- pytest --asyncio-mode auto \
		--ignore test/test_daemon.py \
		--deselect test/test_basics.py::test_system_list_players
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
	rm -f "$pkgdir"/usr/lib/*.a
}

sha512sums="
2d84f657b07c948cd6990d9e79c4eb6e83f97c387ac53c2322fc0adbeb853950fa935332233329e7555db7d157f3ced6498cc102edaffd78849ca1f7d4c49bdc  playerctl-2.4.1.tar.gz
"