Skip to content
Snippets Groups Projects
Verified Commit 2beeeca3 authored by Clayton Craft's avatar Clayton Craft :speech_balloon: Committed by achill (fossdd)
Browse files

systemd/systemd-services: add unit files for alsa-utils

parent f0a72fc9
No related branches found
No related tags found
1 merge request!6287add systemd unit files for alsa-utils
Pipeline #217382 passed
......@@ -7,7 +7,7 @@
# How to add a new service file (5 steps):
pkgname=systemd-services
# 1. bump pkgver
pkgver=61
pkgver=62
pkgrel=0
pkgdesc="Systemd service files"
url="https://postmarketos.org"
......@@ -20,6 +20,7 @@ license="BSD-3-Clause"
# of the package this service file should be part of
# ALPHABETICAL ORDER!!!
subpackages="
alsa-utils-systemd:_service
apk-polkit-rs-systemd:_service
at-spi2-core-systemd:_service
baloo-systemd:_service
......@@ -90,6 +91,7 @@ subpackages="
"
# 3. Add a new entry below with the list of service files
# to install for that package
_alsa_utils_sources="system/alsa-restore.service system/alsa-state.service" # Adapted from https://git.alsa-project.org/?p=alsa-utils.git;a=tree;f=alsactl
_apk_polkit_rs_sources="system/apk-polkit-server.service"
_at_spi2_core_sources="user/at-spi-dbus-bus.service"
_baloo_sources="user/kde-baloo.service"
......@@ -200,6 +202,7 @@ flatpath() {
# 4. Add the _sources variable to the list below
source="$(flatpath \
$_alsa_utils_sources \
$_apk_polkit_rs_sources \
$_at_spi2_core_sources \
$_baloo_sources \
......@@ -272,6 +275,7 @@ source="$(flatpath \
# 5. Add any *system* or *user* unit files that should be passed to 'systemctl
# preset'. Variables with *system* unit files should use "_system_presets" and
# variables with *user* unit files should use "_user_presets".
_alsa_utils_system_presets="alsa-restore.service alsa-state.service"
_apk_polkit_rs_system_presets="apk-polkit-server.service"
_bluez_system_presets="bluetooth.service"
_connman_system_presets="connman-wait-online.service"
......@@ -361,6 +365,8 @@ package() {
}
sha512sums="
99279e69962225e4b1888d202bffaa68263a3ffb8ab8ebb95069eb756de330c2a08307c9426ffb58733b3a000ef388bb041956cb219f239db2e6e65360983b0c system-alsa-restore.service
7f79adb7d523408d841d78016b86ceee1fba06fecc70ca0e4cbdf348a09ed19b9cbb9051e0457f7c52db208e4d86d2471bc4a697fec8e7e5070c01e2a0b4dfcc system-alsa-state.service
269dfc4748a9f1c4f49be8bab399d7412b6ff3b6d6ed9b3f2e31074b791789fb39aad450b4d43d318e7a070d1118ba79f216782b064cd106feac3eb4a8ca5581 system-apk-polkit-server.service
12f5e008b0a41b3426b29f33556689ef88ba7184293ddb78fdaaf05cc4d029fd0b4c8fbef668aefed103a9f48c525f04a8e4e60ddc6e4329698aaf761b8e8f81 user-at-spi-dbus-bus.service
c68f0c9f09f3e26a5d317792177057bbcfd83f7cd9c57b235325a836cf01c83abd4c0ab0088b2f3777d85497f35d25b1498ac5d29b717d3f5c0f0651ef1b6054 user-kde-baloo.service
......
#
# Note that two different ALSA card state management schemes exist and they
# can be switched using a file exist check - /etc/alsa/state-daemon.conf .
#
[Unit]
Description=Save/Restore Sound Card State
ConditionPathExists=!/etc/alsa/state-daemon.conf
ConditionPathExistsGlob=/dev/snd/control*
[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=-/usr/sbin/alsactl restore
ExecStop=-/usr/sbin/alsactl store
[Install]
WantedBy=sound.target
#
# Note that two different ALSA card state management schemes exist and they
# can be switched using a file exist check - /etc/alsa/state-daemon.conf .
#
[Unit]
Description=Manage Sound Card State (restore and store)
ConditionPathExists=/etc/alsa/state-daemon.conf
[Service]
Type=simple
ExecStart=-/usr/sbin/alsactl -s -n 19 -c rdaemon
ExecStop=-/usr/sbin/alsactl -s kill save_and_quit
[Install]
WantedBy=sound.target
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