From: Hugo Villeneuve Date: Thu, 8 Jan 2026 21:46:51 +0000 (-0500) Subject: shairport-sync: use recipe from meta-dimonoff X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=63b7d95e8062ee9a231ce39d78b8cf714dc31a38;p=yocto%2Fmeta-hvmpd.git shairport-sync: use recipe from meta-dimonoff Signed-off-by: Hugo Villeneuve --- diff --git a/recipes-multimedia/shairport-sync/files/mpc-stop.sh b/recipes-multimedia/shairport-sync/files/mpc-stop.sh deleted file mode 100644 index 03fa34c..0000000 --- a/recipes-multimedia/shairport-sync/files/mpc-stop.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# This script is used by shairport-sync to stop MPD -# before starting a new playback session, so that it can -# access the sound card. - -mpc stop diff --git a/recipes-multimedia/shairport-sync/files/shairport-sync.conf.in b/recipes-multimedia/shairport-sync/files/shairport-sync.conf.in deleted file mode 100644 index b778852..0000000 --- a/recipes-multimedia/shairport-sync/files/shairport-sync.conf.in +++ /dev/null @@ -1,29 +0,0 @@ -// 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. -}; diff --git a/recipes-multimedia/shairport-sync/shairport-sync/mpc-stop.sh b/recipes-multimedia/shairport-sync/shairport-sync/mpc-stop.sh new file mode 100644 index 0000000..03fa34c --- /dev/null +++ b/recipes-multimedia/shairport-sync/shairport-sync/mpc-stop.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +# This script is used by shairport-sync to stop MPD +# before starting a new playback session, so that it can +# access the sound card. + +mpc stop diff --git a/recipes-multimedia/shairport-sync/shairport-sync/shairport-sync.conf.in b/recipes-multimedia/shairport-sync/shairport-sync/shairport-sync.conf.in new file mode 100644 index 0000000..b778852 --- /dev/null +++ b/recipes-multimedia/shairport-sync/shairport-sync/shairport-sync.conf.in @@ -0,0 +1,29 @@ +// 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. +}; diff --git a/recipes-multimedia/shairport-sync/shairport-sync_%.bbappend b/recipes-multimedia/shairport-sync/shairport-sync_%.bbappend new file mode 100644 index 0000000..c5444e6 --- /dev/null +++ b/recipes-multimedia/shairport-sync/shairport-sync_%.bbappend @@ -0,0 +1,22 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI += " \ + file://shairport-sync.conf.in \ + file://mpc-stop.sh \ +" + +AIRPLAY_SERVER_NAME ?= "%h shairplay-sync" + +do_install:append() { + sed -e "s/@AIRPLAY_SERVER_NAME@/${AIRPLAY_SERVER_NAME}/" \ + ${UNPACKDIR}/shairport-sync.conf.in > ${UNPACKDIR}/shairport-sync.conf + install -d ${D}${sysconfdir}/ + install -m 0644 ${UNPACKDIR}/shairport-sync.conf ${D}${sysconfdir}/ + + # Modify shairport-sync start arguments to always stop MPD before playing: + sed -i -e "s@^\(ExecStart=.*\)@\1 -w --on-start=${bindir}/mpc-stop.sh@g" \ + ${D}${systemd_system_unitdir}/shairport-sync.service + + install -d ${D}${bindir} + install -m 0755 ${UNPACKDIR}/mpc-stop.sh ${D}${bindir} +} diff --git a/recipes-multimedia/shairport-sync/shairport-sync_git.bb b/recipes-multimedia/shairport-sync/shairport-sync_git.bb deleted file mode 100644 index d4f9677..0000000 --- a/recipes-multimedia/shairport-sync/shairport-sync_git.bb +++ /dev/null @@ -1,59 +0,0 @@ -DESCRIPTION = "AirPlay audio player. Shairport Sync adds multi-room capability with Audio Synchronisation" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSES;md5=9f329b7b34fcd334fb1f8e2eb03d33ff" - -DEPENDS = " libconfig popt avahi openssl alsa-lib" - -PV = "4.3.7" -SRCBRANCH = "master" -SRCREV = "3c8ceb7c97c8782903ec48e280023436711e0913" -SRC_URI = "git://github.com/mikebrady/shairport-sync;protocol=https;branch=${SRCBRANCH}" - -SRC_URI += " \ - file://shairport-sync.conf.in \ - file://mpc-stop.sh \ -" - -inherit autotools pkgconfig systemd useradd - -EXTRA_OECONF = " \ - --with-alsa \ - --with-stdout \ - --with-ssl=openssl \ - --with-avahi \ - --with-metadata \ - --with-libdaemon \ - --with-systemd \ - --without-create-user-group \ -" - -AIRPLAY_SERVER_NAME ?= "%h shairplay-sync" - -do_install:append() { - sed -e "s/@AIRPLAY_SERVER_NAME@/${AIRPLAY_SERVER_NAME}/" \ - ${UNPACKDIR}/shairport-sync.conf.in > ${UNPACKDIR}/shairport-sync.conf - install -d ${D}${sysconfdir}/ - install -m 0644 ${UNPACKDIR}/shairport-sync.conf ${D}${sysconfdir}/ - - # Modify shairport-sync start arguments to always stop MPD before playing: - sed -i -e "s@^\(ExecStart=.*\)@\1 -w --on-start=${bindir}/mpc-stop.sh@g" \ - ${D}${systemd_system_unitdir}/shairport-sync.service - - install -d ${D}${bindir} - install -m 0755 ${UNPACKDIR}/mpc-stop.sh ${D}${bindir} -} - -SYSTEMD_SERVICE:${PN} = " \ - shairport-sync.service \ -" - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM:${PN} = " \ - --system \ - --no-create-home \ - --home ${runstatedir}/shairport-sync \ - --groups audio \ - --user-group shairport-sync \ -" - -RDEPENDS:${PN} = "avahi-daemon"