Skip to content
Snippets Groups Projects
Unverified Commit a679e513 authored by Casey's avatar Casey :recycle:
Browse files

systemd/*: use new abuild systemd helpers


Adjust everything to use the new systemd abuild helpers. These generate
the post-install/pre-deinstall and post-upgrade scripts automagically,
and abuild now provides some helpers where it's necessary to finegle
things a bit (e.g. see the pipewire-pulse-systemd subpackage).

Signed-off-by: default avatarCaleb Connolly <caleb@postmarketos.org>
Co-authored-by: default avatarClayton Craft <clayton@craftyguy.net>
Part-of: !6334
parent 310ce2f5
No related branches found
No related tags found
No related merge requests found
Showing
with 21 additions and 80 deletions
......@@ -4,7 +4,7 @@ maintainer="Jane Rachinger <jane400+pmaports@postmarketos.org>"
pkgname=cups
pkgver=99992.4.11
_pkgver=2.4.11
pkgrel=0
pkgrel=1
pkgdesc="The CUPS Printing System"
url="https://github.com/OpenPrinting/cups/"
arch="all"
......@@ -97,11 +97,6 @@ package() {
find usr/share/cups/model -name "*.ppd" -exec gzip -n9f {} +
}
systemd() {
install="$subpkgname.post-install $subpkgname.pre-deinstall"
default_systemd
}
dev() {
default_dev
......
#!/bin/sh
. /usr/lib/systemd/systemd-apk-macros.sh
systemd_service_post_install system cups.path cups.socket cups.service
#!/bin/sh
. /usr/lib/systemd/systemd-apk-macros.sh
systemd_service_pre_deinstall system cups.path cups.socket cups.service
......@@ -3,7 +3,7 @@
pkgname=gdm
pkgver=99948.0
_pkgver=48.0
pkgrel=0
pkgrel=1
pkgdesc="GNOME display manager"
url="https://wiki.gnome.org/Projects/GDM"
# blocked by gnome-shell
......@@ -76,11 +76,6 @@ package() {
install -m755 -D "$srcdir/Xsession" "$pkgdir"/etc/gdm
}
systemd() {
install="$subpkgname.post-install $subpkgname.pre-deinstall"
default_systemd
}
sha512sums="
3e4a320cc6a0b43d65122bacd2b99531695f20ec809a767b957d63a511e00da017a9a4abe815596c6ad1398c5d427418d5c51bf6162216f60fdae5e8095bd305 gdm-48.0.tar.xz
aa302c33c9b31e823ab98ca80c330c3f7eaa10d05c402cf111d78a35fbec82ce90bff34c19b713b6e352428c31df91f04bd01b58cae8968e130a991c73382020 0001-DOWNSTREAM-use-bin-touch-instead-of-usr-bin-touch.patch
......
#!/bin/sh
. /usr/lib/systemd/systemd-apk-macros.sh
systemd_service_post_install system gdm.service
#!/bin/sh
. /usr/lib/systemd/systemd-apk-macros.sh
systemd_service_pre_deinstall system gdm.service
......@@ -4,7 +4,7 @@
pkgname=gnome-keyring
pkgver=99946.2
_pkgver=46.2
pkgrel=0
pkgrel=1
pkgdesc="GNOME keyring"
url="https://wiki.gnome.org//Projects/GnomeKeyring"
arch="all"
......@@ -67,11 +67,6 @@ package() {
make DESTDIR="$pkgdir" install
}
systemd() {
install="$subpkgname.post-install $subpkgname.pre-deinstall"
default_systemd
}
sha512sums="
4229ca0606bdd1b84a3c737288df7f1fc1f8715734e3001964babd882201c3d818deabb3a7662dbf9b67316f03b234de84da3128fb991a500ef8305c2f962ba2 gnome-keyring-46.2.tar.xz
53e04eade3579fe5d65d11d6cde6c5fdffc9f73a3a7f372b1f4dbc7437212e753123c12854d3a5a7a22f3beb1b00604eec0371615ceb0f7024cb38cf35e33065 0001-build-Use-p11_module_configs-as-default-pkcs11-confi.patch
......
#!/bin/sh
. /usr/lib/systemd/systemd-apk-macros.sh
systemd_service_post_install user gnome-keyring-daemon
#!/bin/sh
. /usr/lib/systemd/systemd-apk-macros.sh
systemd_service_pre_deinstall user gnome-keyring-daemon
......@@ -5,7 +5,7 @@ maintainer="Jane Rachinger <jane400+pmaports@postmarketos.org>"
pkgname=networkmanager
pkgver=9991.52.0
_pkgver=1.52.0
pkgrel=0
pkgrel=1
pkgdesc="Network Management daemon"
url="https://wiki.gnome.org/Projects/NetworkManager"
arch="all"
......@@ -232,11 +232,6 @@ _default_plugin() {
amove $_plugindir/libnm*-${subpkgname#"$pkgname"-}.so
}
systemd() {
install="$subpkgname.post-install $subpkgname.pre-deinstall"
default_systemd
}
sha512sums="
6669467bad7a4965b92124506d25649bd6c95e90c34213edb3f854df9a163507ac5dd381ff53800254a2db703f23233f8dc5b59a75042532bd573fc8c7022158 networkmanager-1.52.0.tar.gz
0f79016bf717dea43830962f524deae8d1cedc274376e40bd912ebe63208c5b1c3b7a5aa14379da19020c587dbd5588df2f0066ca1540070a226983a43e4159b networkmanager.conf
......
#!/bin/sh
. /usr/lib/systemd/systemd-apk-macros.sh
systemd_service_post_install system NetworkManager.service
#!/bin/sh
. /usr/lib/systemd/systemd-apk-macros.sh
systemd_service_pre_deinstall system NetworkManager.service
......@@ -3,7 +3,7 @@
pkgname=pipewire
pkgver=9991.4.1
_pkgver=1.4.1
pkgrel=0
pkgrel=1
_so_ver=0.3
pkgdesc="Multimedia processing graphs"
url="https://pipewire.org/"
......@@ -49,6 +49,7 @@ subpackages="
$pkgname-doc
$pkgname-alsa
$pkgname-pulse
$pkgname-pulse-systemd:pulse_systemd
$pkgname-jack
$pkgname-jack-dev:jackdev
$pkgname-dev
......@@ -60,8 +61,9 @@ subpackages="
$pkgname-spa-tools:spa_tools
$pkgname-lang
$pkgname-echo-cancel:echo_cancel
$pkgname-systemd
"
install="$pkgname.post-upgrade $pkgname.post-install $pkgname.pre-deinstall"
install="$pkgname.post-upgrade $pkgname.post-install"
source="$pkgname-$_pkgver.tar.gz::https://github.com/PipeWire/pipewire/archive/refs/tags/$_pkgver.tar.gz
pipewire.desktop
pipewire-launcher.sh
......@@ -143,7 +145,6 @@ pulse() {
"
provides="pulseaudio=$pkgver-r$pkgrel pulseaudio-bluez=$pkgver-r$pkgrel"
provider_priority=1
install="$subpkgname.post-install $subpkgname.pre-deinstall"
amove usr/bin/pipewire-pulse
amove usr/lib/pipewire-$_so_ver/libpipewire-module-protocol-pulse.so
......@@ -151,8 +152,15 @@ pulse() {
amove usr/lib/pipewire-$_so_ver/libpipewire-module-filter-chain.so
amove usr/share/pipewire/pipewire-pulse.conf
amove usr/share/pipewire/pipewire-pulse.conf.avail
}
pulse_systemd() {
amove usr/lib/systemd/user/pipewire-pulse.service
amove usr/lib/systemd/user/pipewire-pulse.socket
# We can't just call default_systemd because that would take
# all the systemd unit files!
default_systemd_install_scripts
}
jack() {
......
#!/bin/sh
. /usr/lib/systemd/systemd-apk-macros.sh
systemd_service_post_install user pipewire-pulse.socket
#!/bin/sh
. /usr/lib/systemd/systemd-apk-macros.sh
systemd_service_pre_deinstall user pipewire-pulse.socket
#!/bin/sh
addgroup -S pipewire 2>/dev/null
. /usr/lib/systemd/systemd-apk-macros.sh
systemd_service_post_install user pipewire.socket
#!/bin/sh
. /usr/lib/systemd/systemd-apk-macros.sh
systemd_service_pre_deinstall user pipewire.socket
......@@ -2,7 +2,7 @@
# Co-maintainer: Clayton Craft <clayton@craftyguy.net>
# pmbootstrap installs this, if systemd is selected in "pmbootstrap init".
pkgname=postmarketos-base-systemd
pkgver=34
pkgver=35
pkgrel=0
pkgdesc="Meta package for running postmarketOS with systemd"
url="https://postmarketos.org"
......
#!/bin/sh
. /usr/lib/systemd/systemd-apk-macros.sh
system_preset_path="/usr/lib/systemd/system-preset/90-base.preset"
user_preset_path="/usr/lib/systemd/user-preset/90-base.preset"
......@@ -89,8 +87,10 @@ policy_changed() {
check_and_apply_presets() {
local type="$1"
local preset_path=""
local extra_args=""
if [ "$type" = user ]; then
preset_path="$user_preset_path"
extra_args="--global"
else
preset_path="$system_preset_path"
type="system"
......@@ -106,7 +106,7 @@ check_and_apply_presets() {
echo " wildcards are not supported yet, skipping"
else
if [ -f "/usr/lib/systemd/$type/$entry" ]; then
systemd_service_post_install "$type" "$entry"
systemctl --no-reload preset $extra_args "$entry"
else
echo " no unit file found, skipping"
fi
......
......@@ -3,7 +3,7 @@
pkgname=wireplumber
pkgver=9990.5.8
_pkgver=0.5.8
pkgrel=0
pkgrel=1
pkgdesc="Session / policy manager implementation for PipeWire"
url="https://pipewire.org/"
arch="all"
......@@ -30,12 +30,12 @@ subpackages="
$pkgname-lang
$pkgname-zsh-completion
$pkgname-doc
$pkgname-systemd
"
source="https://gitlab.freedesktop.org/PipeWire/wireplumber/-/archive/$_pkgver/wireplumber-$_pkgver.tar.gz"
provides="pipewire-session-manager"
provider_priority=50
install="$pkgname.post-install $pkgname.pre-deinstall"
builddir="$srcdir/$pkgname-$_pkgver"
case "$CARCH" in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment