summaryrefslogtreecommitdiff
path: root/community/apk-polkit-rs/APKBUILD
blob: e14565df10d9b88950b688b5990b9bd80272b145 (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
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=apk-polkit-rs
pkgver=2.1.1
_gitlabsha=d52c3da65fe202a9e97c3d228af952c6
pkgrel=0
pkgdesc="apk-polkit-rs exposes a DBus API for APK, the Alpine Package Keeper"
url="https://gitlab.alpinelinux.org/Cogitri/apk-polkit-rs"
arch="x86_64 armv7 armhf aarch64 x86 ppc64le riscv64"
license="GPL-3.0-or-later"
depends="polkit alpine-appstream-downloader"
makedepends="meson cargo polkit-dev glib-dev clang-dev apk-tools-dev"
checkdepends="appstream bash dbus py3-dbusmock"
subpackages="$pkgname-dev $pkgname-dbg $pkgname-lang $pkgname-openrc"
install="$pkgname.post-install $pkgname.post-upgrade"
source="https://gitlab.alpinelinux.org/Cogitri/apk-polkit-rs/uploads/$_gitlabsha/apk-polkit-rs-$pkgver.tar.xz"

case "$CARCH" in
riscv64)
	options="$options textrels"
	;;
esac


prepare() {
	default_prepare

	sed '/CBUILD/d' -i meson.build
	cargo fetch --target="$CTARGET" --locked
}

build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	dbus-run-session -- \
		meson test --no-rebuild --print-errorlogs -C output
}

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

sha512sums="
3fee5a23041708eb6008fb0cf6cba387fe32fb57a1fe1f4becb9ad2f234f4c461dad422d968503062244b3382056337d79218c99fdb30ce065d9ae9b300ec4a6  apk-polkit-rs-2.1.1.tar.xz
"