diff mbox series

[2/4] pipewire: consolidate install task

Message ID 20261204125546.3472805-2-ross.burton@arm.com
State New
Headers show
Series [1/4] pipewire: minor tweaks | expand

Commit Message

Ross Burton Dec. 4, 2026, 12:55 p.m. UTC
The recipe had grown a do_install:append, do_install:append:class-target,
and a do_install:postfunc over time.

These can be consolidated into a single do_install, with relative symlinks
created to avoid absolute paths in the native build.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .../pipewire/pipewire_1.6.11.bb               | 22 +++++++------------
 1 file changed, 8 insertions(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/meta/recipes-multimedia/pipewire/pipewire_1.6.11.bb b/meta/recipes-multimedia/pipewire/pipewire_1.6.11.bb
index c0aa4250c6e..3183ea338a1 100644
--- a/meta/recipes-multimedia/pipewire/pipewire_1.6.11.bb
+++ b/meta/recipes-multimedia/pipewire/pipewire_1.6.11.bb
@@ -155,29 +155,29 @@  PACKAGESPLITFUNCS:append = " set_dynamic_metapkg_rdepends "
 SPA_SUBDIR = "spa-0.2"
 PW_MODULE_SUBDIR = "pipewire-0.3"
 
-remove_unused_installed_files() {
+do_install:append() {
+    if ls ${D}${datadir}/doc/pipewire/html/dir_*html; then
+        sed -i "s,${WORKDIR},,g" ${D}${datadir}/doc/pipewire/html/dir_*html
+    fi
+
     # jack.conf is used by pipewire-jack (not the JACK SPA plugin).
     # Remove it if pipewire-jack is not built to avoid creating the
     # pipewire-jack package.
-    if ${@bb.utils.contains('PACKAGECONFIG', 'pipewire-jack', 'false', 'true', d)}; then
+    if ! ${@bb.utils.contains('PACKAGECONFIG', 'pipewire-jack', 'truw', 'false', d)}; then
         rm -f "${D}${datadir}/pipewire/jack.conf"
     fi
 
     # minimal.conf is an example of how to minimally configure the
     # daemon and is not meant to be used for production.
     rm -f "${D}${datadir}/pipewire/minimal.conf"
-}
 
-do_install:append:class-target() {
     # The pipewire-alsa plugin needs the following files in /etc/alsa/conf.d/ to
     # be picked up by alsa.
     install -d ${D}${sysconfdir}/alsa/conf.d
-    ln -sf ${datadir}/alsa/alsa.conf.d/50-pipewire.conf ${D}${sysconfdir}/alsa/conf.d/50-pipewire.conf
-    ln -sf ${datadir}/alsa/alsa.conf.d/99-pipewire-default.conf ${D}${sysconfdir}/alsa/conf.d/99-pipewire-default.conf
+    ln -rsf ${datadir}/alsa/alsa.conf.d/50-pipewire.conf ${D}${sysconfdir}/alsa/conf.d/50-pipewire.conf
+    ln -rsf ${datadir}/alsa/alsa.conf.d/99-pipewire-default.conf ${D}${sysconfdir}/alsa/conf.d/99-pipewire-default.conf
 }
 
-do_install[postfuncs] += "remove_unused_installed_files"
-
 python split_dynamic_packages () {
     # Create packages for each SPA plugin. These plugins are located
     # in individual subdirectories, so a recursive search is needed.
@@ -414,9 +414,3 @@  FILES:gstreamer1.0-pipewire = " \
 "
 
 BBCLASSEXTEND = "native nativesdk"
-
-do_install:append() {
-  if ls ${D}${datadir}/doc/pipewire/html/dir_*html; then
-    sed -i "s,${WORKDIR},,g" ${D}${datadir}/doc/pipewire/html/dir_*html
-  fi
-}