diff --git a/testing/elementary-settings-daemon/00-make-packagekit-optional.patch b/testing/elementary-settings-daemon/00-make-packagekit-optional.patch new file mode 100644 index 00000000000..eee51291313 --- /dev/null +++ b/testing/elementary-settings-daemon/00-make-packagekit-optional.patch @@ -0,0 +1,55 @@ +diff --git a/meson.build b/meson.build +index 9b432ea..1d4d7c9 100644 +--- a/meson.build ++++ b/meson.build +@@ -13,7 +13,7 @@ glib_dep = dependency('glib-2.0') + granite_dep = dependency('granite', version: '>= 5.3.0') + gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0') + gexiv2_dep = dependency('gexiv2') +-pk_dep = dependency('packagekit-glib2') ++pk_dep = dependency('packagekit-glib2', required: false) + i18n = import('i18n') + gettext_name = meson.project_name() + +diff --git a/src/Application.vala b/src/Application.vala +index 018b7b9..c15385d 100644 +--- a/src/Application.vala ++++ b/src/Application.vala +@@ -78,9 +78,11 @@ public sealed class SettingsDaemon.Application : Gtk.Application { + protected override bool dbus_register (DBusConnection connection, string object_path) throws Error { + base.dbus_register (connection, object_path); + ++#if PK_AVAILABLE + connection.register_object (object_path, new Backends.SystemUpdate ()); ++#endif + +-#if UBUNTU_DRIVERS ++#if UBUNTU_DRIVERS && PK_AVAILABLE + connection.register_object (object_path, new Backends.UbuntuDrivers ()); + #endif + +diff --git a/src/meson.build b/src/meson.build +index 472148b..39b7525 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -9,12 +9,18 @@ sources = files( + 'Backends/NightLightSettings.vala', + 'Backends/PowerProfilesSync.vala', + 'Backends/PrefersColorSchemeSettings.vala', +- 'Backends/SystemUpdate.vala', +- 'Utils/PkUtils.vala', + 'Utils/SessionUtils.vala', + 'Utils/SunriseSunsetCalculator.vala', + ) + ++if pk_dep.found() ++ sources += files( ++ 'Backends/SystemUpdate.vala', ++ 'Utils/PkUtils.vala', ++ ) ++ args += '--define=PK_AVAILABLE' ++endif ++ + args = [] + + if get_option('ubuntu_drivers') diff --git a/testing/elementary-settings-daemon/APKBUILD b/testing/elementary-settings-daemon/APKBUILD new file mode 100644 index 00000000000..87e8717f5c2 --- /dev/null +++ b/testing/elementary-settings-daemon/APKBUILD @@ -0,0 +1,56 @@ +# Contributor: Angelo Verlain +maintainer="Angelo Verlain " +pkgname=elementary-settings-daemon +pkgver=8.3.0 +pkgrel=0 +pkgdesc="Elementary Settings Daemon" +url="https://github.com/elementary/settings-daemon" +# armhf, ppc64le and s390x blocked by fwpud +arch="all !armhf !ppc64le !s390x" +license="GPL-3.0-or-later" +makedepends=" + accountsservice-dev + coreutils + desktop-file-utils + fwupd-dev + geoclue-dev + gexiv2-dev + granite-dev + meson + vala + " +subpackages="$pkgname-lang $pkgname-openrc" +source=" + $pkgname-$pkgver.tar.gz::https://github.com/elementary/settings-daemon/archive/refs/tags/$pkgver.tar.gz + 00-make-packagekit-optional.patch + elementary-settings-daemon.initd + " +# no tests +options="!check" + +builddir="$srcdir/settings-daemon-$pkgver" + +build() { + abuild-meson \ + -Dsystemdsystemunitdir=no \ + -Dsystemduserunitdir=no \ + -Dubuntu_drivers=false \ + . output + meson compile -C output +} + +check() { + meson test --print-errorlogs -C output +} + +package() { + DESTDIR="$pkgdir" meson install --no-rebuild -C output + + install -Dm755 "$srcdir"/elementary-settings-daemon.initd "$pkgdir"/etc/user/init.d/elementary-settings-daemon +} + +sha512sums=" +6afb705389a1099aba744d11d53c1a2b02852f31532af6ae135e2a0a0e830d4f1b89be1057848c1182ec5a23feb7ffe419b521f87e767fe849c66bbdcf981255 elementary-settings-daemon-8.3.0.tar.gz +51b08ca551c4e7d3c946526f534d56364a52ac98e96e855bc576b633895589235542a1758c5adf40fbbe4aaf1edbebec7e7524fc80b51cd9d690f69017c43cff 00-make-packagekit-optional.patch +01f2d2866e57a7e1e7a63c51523d3decc5945aae859ea939199f7ddd66068d3eb791a11caf7e37a71017aa4dd0a006bc4197db9cae1172b0b1c92612e9dbf545 elementary-settings-daemon.initd +" diff --git a/testing/elementary-settings-daemon/elementary-settings-daemon.initd b/testing/elementary-settings-daemon/elementary-settings-daemon.initd new file mode 100644 index 00000000000..2fb3d031917 --- /dev/null +++ b/testing/elementary-settings-daemon/elementary-settings-daemon.initd @@ -0,0 +1,13 @@ +#!/sbin/openrc-run + +description="Portal service (Elementary Settings Daemon)" + +command="/usr/libexec/io.elementary.settings-daemon.xdg-desktop-portal" + +supervisor=supervise-daemon +error_logger="logger -t '${RC_SVCNAME}' -p daemon.error" + +depend() { + need dbus wireplumber + before pipewire-pulse +}