mpd \
mpc \
ympd \
+ shairport-sync \
+"
+
+# Needed by shairport-sync:
+IMAGE_INSTALL:append = " \
+ avahi-daemon \
"
IMAGE_INSTALL:append = " \
--- /dev/null
+From e339921792ce7b92d4563a5dd0c675a1bb06e953 Mon Sep 17 00:00:00 2001
+From: Hugo Villeneuve <hugo@hugovil.com>
+Date: Mon, 19 Feb 2024 12:20:43 -0500
+Subject: [PATCH] yocto: disable user/group creation
+
+---
+ Makefile.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index d9cfbf6e..c1765489 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -277,7 +277,7 @@ INSTALL_SYSTEMV_TARGET = install-systemv-local
+ # will be stored in a scripts folder in the _build_ folder
+ # which will be the source folder if you're not using a separate build folder
+
+-$(INSTALL_SYSTEMV_TARGET): scripts/shairport-sync $(INSTALL_USER_TARGET)
++$(INSTALL_SYSTEMV_TARGET): scripts/shairport-sync
+ install -d $(DESTDIR)$(sysconfdir)/init.d
+ [ -e $(DESTDIR)$(sysconfdir)/init.d/shairport-sync ] || install -m 0755 scripts/shairport-sync $(DESTDIR)$(sysconfdir)/init.d
+
+@@ -297,7 +297,7 @@ INSTALL_SYSTEMD_TARGET = install-systemd-local
+ # will be stored in a scripts folder in the _build_ folder
+ # which will be the source folder if you're not using a separate build folder
+
+-$(INSTALL_SYSTEMD_TARGET): scripts/$(SYSTEMD_SERVICE) $(INSTALL_USER_TARGET)
++$(INSTALL_SYSTEMD_TARGET): scripts/$(SYSTEMD_SERVICE)
+ install -d $(DESTDIR)$(systemdsystemunitdir)
+ [ -e $(DESTDIR)$(systemdsystemunitdir)/shairport-sync.service ] || install -m 0644 scripts/$(SYSTEMD_SERVICE) $(DESTDIR)$(systemdsystemunitdir)/shairport-sync.service
+
+--
+2.39.2
+
--- /dev/null
+// hvmpd Shairport Sync configuration file
+
+general =
+{
+ name = "@AIRPLAY_SERVER_NAME@";
+ interpolation = "basic";
+ mdns_backend = "avahi";
+};
+
+// How to deal with metadata, including artwork
+metadata =
+{
+ enabled = "yes"; // Solicit metadata from the source and to pass it on via a pipe
+ include_cover_art = "no";
+ pipe_name = "/tmp/shairport-sync-metadata";
+};
+
+sessioncontrol =
+{
+ allow_session_interruption = "yes";
+};
+
+// Parameters for the "alsa" audio back end (only back end that supports synchronised audio)
+alsa =
+{
+ //output_device = "default"; // the name of the alsa output device. Use "alsamixer" or "aplay" to find out the names of devices, mixers, etc.
+ //mixer_control_name = "PCM"; // the name of the mixer to use to adjust output volume. If not specified, volume in adjusted in software.
+ //mixer_device = "default"; // the mixer_device default is whatever the output_device is. Normally you wouldn't have to use this.
+};
--- /dev/null
+DESCRIPTION = "AirPlay audio player. Shairport Sync adds multi-room capability with Audio Synchronisation"
+LICENSE="MIT"
+LIC_FILES_CHKSUM = "file://LICENSES;md5=9f329b7b34fcd334fb1f8e2eb03d33ff"
+
+SRCBRANCH = "master"
+SRCREV = "165431a8973d06a5d18fe3e26e2981612ea7701b"
+SRC_URI = "git://github.com/mikebrady/shairport-sync;protocol=https;branch=${SRCBRANCH}"
+
+SRC_URI += " \
+ file://0001-yocto-disable-user-group-creation.patch \
+ file://shairport-sync.conf.in \
+"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = " \
+ --with-alsa \
+ --with-stdout \
+ --with-ssl=openssl \
+ --with-avahi \
+ --with-metadata \
+ --with-libdaemon \
+ --with-systemd \
+"
+
+DEPENDS = " libconfig popt avahi openssl alsa-lib"
+
+inherit autotools pkgconfig systemd
+
+AIRPLAY_SERVER_NAME ?= "%h shairplay-sync"
+
+do_install:append() {
+ sed -e "s/@AIRPLAY_SERVER_NAME@/${AIRPLAY_SERVER_NAME}/" \
+ ${WORKDIR}/shairport-sync.conf.in > ${WORKDIR}/shairport-sync.conf
+ install -d ${D}${sysconfdir}/
+ install -m 0644 ${WORKDIR}/shairport-sync.conf ${D}${sysconfdir}/
+}
+
+SYSTEMD_SERVICE:${PN} = " \
+ shairport-sync.service \
+"
+
+inherit useradd
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM:${PN} = " \
+ --system \
+ --no-create-home \
+ --home ${runstatedir}/shairport-sync \
+ --groups audio \
+ --user-group shairport-sync \
+"