From eace38e0d7dfb022a5c4620adea951e998ec4fa3 Mon Sep 17 00:00:00 2001 From: jane400 Date: Fri, 7 Jun 2024 17:49:36 +0200 Subject: [PATCH] main/postmarketos-base-ui: add -openrc subpackage (MR 5371) Co-authored-by: Clayton Craft --- main/postmarketos-base-ui/APKBUILD | 25 ++++++++++++++----- ... postmarketos-base-ui-openrc.post-install} | 0 ... postmarketos-base-ui-openrc.post-upgrade} | 0 3 files changed, 19 insertions(+), 6 deletions(-) rename main/postmarketos-base-ui/{postmarketos-base-ui.post-install => postmarketos-base-ui-openrc.post-install} (100%) rename main/postmarketos-base-ui/{postmarketos-base-ui.post-upgrade => postmarketos-base-ui-openrc.post-upgrade} (100%) diff --git a/main/postmarketos-base-ui/APKBUILD b/main/postmarketos-base-ui/APKBUILD index 7aeafc576..33c9d4fdd 100644 --- a/main/postmarketos-base-ui/APKBUILD +++ b/main/postmarketos-base-ui/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Clayton Craft pkgname=postmarketos-base-ui pkgver=25 -pkgrel=2 +pkgrel=3 pkgdesc="Meta package for minimal postmarketOS UI base" url="https://postmarketos.org" arch="noarch" @@ -28,6 +28,7 @@ subpackages=" $pkgname-bluez-openrc:_bluez_openrc $pkgname-bluez-obexd:_obexd $pkgname-elogind + $pkgname-openrc:_openrc $pkgname-flatpak $pkgname-networkmanager-usb-tethering:_usb_tethering $pkgname-networkmanager @@ -43,7 +44,6 @@ subpackages=" $pkgname-x11 postmarketos-default-camera:_default_camera " -install="$pkgname.post-install $pkgname.post-upgrade" replaces=" chrony wpa_supplicant-openrc @@ -92,10 +92,10 @@ source="$(flatpath $_source644 $_source600 $_source755)" _pmb_select="postmarketos-base-ui-wifi" package() { - # wifi and audio backends are provided by a subpackage in this APKBUILD, - # and it won't exist when this is evaluated at the top level. It's moved - # into this function to work around it. - depends="$depends postmarketos-base-ui-wifi postmarketos-base-ui-audio" + # wifi, audio and init backends are provided by a subpackage in this + # APKBUILD and it won't exist when this is evaluated at the top level. + # It's moved into this function to work around it. + depends="$depends $pkgname-wifi $pkgname-audio" local i for i in $_source644; do @@ -133,6 +133,19 @@ _bluez_openrc() { amove etc/conf.d/bluetooth } +_openrc() { + install_if="$pkgname=$pkgver-r$pkgrel openrc" + install="$subpkgname.post-install $subpkgname.post-upgrade" + depends=" + chrony-openrc + dbus-openrc + haveged-openrc + util-linux-openrc + " + + mkdir -p "$subpkgdir" +} + elogind() { install_if="$pkgname=$pkgver-r$pkgrel elogind" depends="sleep-inhibitor !systemd-logind" diff --git a/main/postmarketos-base-ui/postmarketos-base-ui.post-install b/main/postmarketos-base-ui/postmarketos-base-ui-openrc.post-install similarity index 100% rename from main/postmarketos-base-ui/postmarketos-base-ui.post-install rename to main/postmarketos-base-ui/postmarketos-base-ui-openrc.post-install diff --git a/main/postmarketos-base-ui/postmarketos-base-ui.post-upgrade b/main/postmarketos-base-ui/postmarketos-base-ui-openrc.post-upgrade similarity index 100% rename from main/postmarketos-base-ui/postmarketos-base-ui.post-upgrade rename to main/postmarketos-base-ui/postmarketos-base-ui-openrc.post-upgrade