Add a bbappend to the pipewire recipe to create the required symlink
in /etc/systemd/user/sockets.target.wants to enable per-user socket
activation. A bbappend is used as this change is likely to be AGL
specific (for now?).
Bug-AGL: SPEC-2521
Change-Id: I4b349ab8151eabfb933f2dcfcf9d293fcb3ea321
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
--- /dev/null
+do_install_append() {
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ # Execute these manually on behalf of systemctl script (from systemd-systemctl-native.bb)
+ # because it does not support systemd's user mode.
+ mkdir -p ${D}${sysconfdir}/systemd/user/sockets.target.wants/
+ ln -sf ${systemd_user_unitdir}/pipewire.socket ${D}${sysconfdir}/systemd/user/sockets.target.wants/pipewire.socket
+ fi
+}
+
+FILES_${PN} += "${sysconfdir}/systemd/user/"
+