main/postmarketos-base-ui: audio backend improvements (MR 5145)

- Merge pulseaudio and audio-pulse subpkgs
  Just general cleanup, there's no reason to have a separate pulseaudio
  subpackage now since both were being installed anyways (one indirectly
  depended on the other)

- Add 'none' option for audio backend
  Some users might not want to have an audio backend installed taking
  up disk space. For example they're running a headless server or just
  don't want audio I/O, and PA + dependencies, which include mesa(!!)
  can be a lot... I measured 208MB

Note about drop the pulseaudio subpkg and it's "provides="...
This was done in 6e325417, when pmos-base-ui was split off from
pmos-base (3 years ago). I'm not sure how many people are still rocking
a 3yo pmOS install, but the original package (see 92e43e83) was only
pulled in by install_if, so I think the chance that it's in someone's
world file would be really really low.
This commit is contained in:
Clayton Craft 2024-05-17 12:12:13 -07:00
parent d20a7944bf
commit 96e61da7a2
No known key found for this signature in database
GPG key ID: 4A4CED6D7EDF950A

View file

@ -1,7 +1,7 @@
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=postmarketos-base-ui
pkgver=22
pkgrel=4
pkgrel=5
pkgdesc="Meta package for minimal postmarketOS UI base"
url="https://postmarketos.org"
arch="noarch"
@ -23,6 +23,7 @@ depends="
"
_pmb_recommends="font-twemoji"
subpackages="
$pkgname-audio-none:_audio_none
$pkgname-audio-pipewire:_audio_pipewire
$pkgname-audio-pulseaudio:_audio_pulseaudio
$pkgname-bluez
@ -32,7 +33,6 @@ subpackages="
$pkgname-networkmanager-usb-tethering:_usb_tethering
$pkgname-networkmanager
$pkgname-openrc-settingsd:_openrc_settingsd
$pkgname-pulseaudio
$pkgname-qt-tweaks:qt_tweaks
$pkgname-qt-wayland:qt_wayland
$pkgname-tinydm
@ -153,13 +153,6 @@ tinydm() {
amove etc/tinydm.d/env-wayland.d/50-sdl-wayland.sh
}
pulseaudio() {
install_if="$pkgname=$pkgver-r$pkgrel pulseaudio"
depends="pulseaudio-utils"
provides="postmarketos-base-pulseaudio=$pkgver-r$pkgrel"
amove etc/pulse/default.pa.d/postmarketos.pa
}
_obexd() {
install_if="$pkgname=$pkgver-r$pkgrel bluez-obexd"
replaces="bluez-obexd"
@ -230,6 +223,14 @@ iwd() {
amove usr/lib/NetworkManager/conf.d/50-iwd.conf
}
_audio_none() {
pkgdesc="Do not install any audio backend."
provides="postmarketos-base-ui-audio=$pkgver-r$pkgrel"
provider_priority=10
mkdir "$subpkgdir"
}
_audio_pipewire() {
pkgdesc="Use pipewire as the audio backend. (but may not work with all devices)"
depends="pipewire-alsa pipewire-pulse"
@ -241,12 +242,12 @@ _audio_pipewire() {
_audio_pulseaudio() {
pkgdesc="Use pulseaudio as the audio backend."
depends="alsa-plugins-pulse pulseaudio pulseaudio-alsa !pipewire-pulse"
depends="alsa-plugins-pulse pulseaudio pulseaudio-alsa pulseaudio-utils !pipewire-pulse"
provides="postmarketos-base-ui-audio=$pkgver-r$pkgrel"
provider_priority=100
mkdir "$subpkgdir"
amove usr/share/wireplumber/wireplumber.conf.d/50-pulseaudio.conf
amove etc/pulse/default.pa.d/postmarketos.pa
}
flatpak() {