community/apk-polkit-rs: add notice about service enablement and tests

This commit is contained in:
Pablo Correa Gómez 2023-04-17 12:08:12 +00:00 committed by psykose
parent 2857a3d562
commit c1be74b65a
3 changed files with 22 additions and 4 deletions

View File

@ -3,17 +3,17 @@
pkgname=apk-polkit-rs
pkgver=2.1.0
_gitlabsha=51c4e9ff37243ed681440118272f9e33
pkgrel=0
pkgrel=1
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 xvfb-run dbus"
checkdepends="appstream bash dbus py3-dbusmock"
subpackages="$pkgname-dev $pkgname-dbg $pkgname-lang"
install="$pkgname.post-install $pkgname.post-upgrade"
source="https://gitlab.alpinelinux.org/Cogitri/apk-polkit-rs/uploads/$_gitlabsha/apk-polkit-rs-$pkgver.tar.xz"
options="!check" # tests need polkit etc running so just skip it on builders for now
case "$CARCH" in
riscv64)
@ -37,7 +37,6 @@ build() {
check() {
dbus-run-session -- \
xvfb-run -a \
meson test --no-rebuild --print-errorlogs -C output
}

View File

@ -0,0 +1,8 @@
#!/bin/sh
cat << __EOF__
* apk-polkit-rs should be running for the service to be available for
* GNOME Software. Please run:
* "rc-update add apk-polkit-server default && rc-service apk-polkit-server start"
* if you want GNOME Software to work with APK
__EOF__

View File

@ -0,0 +1,11 @@
#!/bin/sh
ver_old=$2
if [ "$(apk version -t "$ver_old" '2.1.0-r1')" = '<' ]; then
cat <<- __EOF__
* apk-polkit-rs should be running for the service to be available for
* GNOME Software. Please run:
* "rc-update add apk-polkit-server default && rc-service apk-polkit-server start"
* if you want GNOME Software to work with APK
__EOF__
fi