summaryrefslogtreecommitdiff
path: root/community/rtkit/APKBUILD
blob: a2b8453077324b93adfbc3478024aed6eabdae2d (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
# Contributor: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
pkgname=rtkit
pkgver=0.13
pkgrel=2
pkgdesc="D-Bus system service that enables real time scheduling on request"
url="https://github.com/heftig/rtkit"
arch="all"
license="GPL-3.0-only AND MIT" # README says BSD is used for client, but code uses MIT instead
depends="dbus"
# NOTE: polkit(-dev) is actually not required
# See https://github.com/void-linux/void-packages/commit/4d33558cf0e817335b87fa9fb99cf26f773b5033
makedepends="
	dbus-dev
	libcap-dev
	meson
	xxd
	zlib-dev
	"
subpackages="
	$pkgname-doc
	$pkgname-openrc
	"
install="$pkgname.pre-install"
source="
	https://github.com/heftig/rtkit/releases/download/v$pkgver/rtkit-$pkgver.tar.xz
	$pkgname.initd
	$pkgname.confd

	sched_getscheduler_sched_setscheduler.patch
	50-rtkit.rules
	"
options="!check"  # no tests are defined

build() {
	abuild-meson \
		-Dlibsystemd=disabled \
		-Dinstalled_tests=false \
		. output
	meson compile -j ${JOBS:-1} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output

	cd "$pkgdir"

	rm -r usr/lib/systemd
	# Don't add emtpy /usr/lib dir, but use rmdir instead of rm -rf to fail
	# if lib is no longer empty.
	rmdir usr/lib

	install -Dm755 "$srcdir"/$pkgname.initd etc/init.d/$pkgname
	install -Dm644 "$srcdir"/$pkgname.confd etc/conf.d/$pkgname
	install -Dm644 "$srcdir"/50-rtkit.rules "$pkgdir"/usr/share/polkit-1/rules.d/50-rtkit.rules
}

sha512sums="
c058d770a4ccfdf4e2e3a713748b6a705b6d3e148a903b9dbba4bba9d3ded2b819d7dfbfa37b9fad78e57c0a5f10f2f94226f8738f666e692a085ab297a36b36  rtkit-0.13.tar.xz
1eaf0af22ecd9f4860d8990719d55634745d01aeac9acbd6ea32a40ee2cae4981ac4357c20b28d414264d543e286a082b69a8ebcd264a98f239acd5ac603956b  rtkit.initd
c32d70b0b3f85ee51dcd30364f003852a4bed9151eecbb2bf6f70d4512ab1dce958c5161143056ca2f45979fb305e72d8dc97d86732a8fa11c12a3e1c7418eed  rtkit.confd
9a9bb315e8d207c673cb795f91e025f313bd3a1881323c968777db6c0029de85aaecd06cf833d3ffd7468477f6586de756c077220043631a60155f28c9d66ba3  sched_getscheduler_sched_setscheduler.patch
1d05906092b186f7483acf5e76cb83fb577e743a314a56d12260ed136007794acb9bc69969024837d3b096ea190feb1b87f8a0671528cd1b67c2d655b1b4a864  50-rtkit.rules
"