summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/musicpd/mpd_agldemo.inc
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2022-02-14 17:38:28 -0500
committerScott Murray <scott.murray@konsulko.com>2022-02-15 22:25:18 +0000
commit3d520839afffc7096d599f07210a63bd4b21c427 (patch)
treee22558678011b0fc2cfacc2aaf1414a1fe168f98 /recipes-multimedia/musicpd/mpd_agldemo.inc
parentd771fdbc4c03cb3a131b235359f9bea681dd3196 (diff)
Add backports of mpd and related recipes
Backport the recipe for the latest (0.23.5) version of mpd (Music Player Daemon) from meta-openembedded's master branch. This provides a version with native PipeWire support, and should help make the upcoming upgrade to Yocto Project 3.5 (aka Kirkstone) easier. Additionally, the recipes for the related libmpdclient library and mpc utility are also backported to ensure compatibility. The provided bbappend for the mpd recipe tweaks the backport to build with the older version of meson in dunfell, and applies configuration to approximate the lightmediascanner set up with regards to media location and using /var/volatile for metadata storage for robustness. Bug-AGL: SPEC-4255 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: Ida58289a16079f48c3467d55aef4a608671ffc37
Diffstat (limited to 'recipes-multimedia/musicpd/mpd_agldemo.inc')
-rw-r--r--recipes-multimedia/musicpd/mpd_agldemo.inc57
1 files changed, 57 insertions, 0 deletions
diff --git a/recipes-multimedia/musicpd/mpd_agldemo.inc b/recipes-multimedia/musicpd/mpd_agldemo.inc
new file mode 100644
index 00000000..8bbd5919
--- /dev/null
+++ b/recipes-multimedia/musicpd/mpd_agldemo.inc
@@ -0,0 +1,57 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
+
+# Remove curl dependency to disable WebDAV support.
+# Ideally this should be addressed by adding a PACKAGECONFIG option
+# in the upstream recipe.
+DEPENDS:remove = "curl"
+
+SRC_URI += "file://0001-Tweaks-to-allow-building-with-older-meson.patch \
+ file://mpd-volatiles.conf"
+
+# The older meson in poky dunfell complains about the use of the
+# build.{c_std,cpp_std} options even though they work, so we need to
+# flag them to be ignored in the unknown configure option QA test.
+# This can be removed after upgrading to Yocto Project 3.5.
+UNKNOWN_CONFIGURE_WHITELIST = "build.c_std build.cpp_std"
+
+# This also needs to be pushed upstream.
+PACKAGECONFIG[pipewire] = "-Dpipewire=enabled,-Dpipewire=disabled,pipewire"
+
+# Prune the default configuration a bit to remove various streaming/server
+# options that are not required.
+PACKAGECONFIG = " \
+ ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "aac", "", d)} \
+ bzip2 \
+ daemon \
+ ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "ffmpeg aac", "", d)} \
+ flac \
+ libsamplerate \
+ mpg123 \
+ sndfile \
+ opus \
+ vorbis \
+ wavpack \
+ zlib \
+ pipewire \
+ id3tag \
+"
+
+SYSTEMD_AUTO_ENABLE = "enable"
+
+# Override default as AGL's PipeWire configuration does not make use of audio
+# group. As opposed to using the group setting in mpd.conf, this keeps the
+# files created in /var/lib/mpd as mpd.mpd, which seems safer.
+USERADD_PARAM:${PN} = " \
+ --system --no-create-home \
+ --home ${localstatedir}/lib/mpd \
+ --groups pipewire \
+ --user-group mpd"
+
+# Install volatile redirect for /var/lib/mpd to avoid any chance of metadata
+# corruption on reboot. This matches what as previously done with the
+# lightmediascanner configuration.
+do_install:append() {
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -D -m 0644 ${WORKDIR}/mpd-volatiles.conf ${D}${sysconfdir}/tmpfiles.d/mpd.conf
+ fi
+}