mpd: Fix patch fuzz warning
[AGL/meta-agl-demo.git] / recipes-multimedia / musicpd / mpd_agldemo.inc
1 FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
2
3 # Remove curl dependency to disable WebDAV support.
4 # Ideally this should be addressed by adding a PACKAGECONFIG option
5 # in the upstream recipe.
6 DEPENDS:remove = "curl"
7
8 SRC_URI += "file://mpd-volatiles.conf"
9
10 # This also needs to be pushed upstream.
11 PACKAGECONFIG[pipewire] = "-Dpipewire=enabled,-Dpipewire=disabled,pipewire"
12
13 # Prune the default configuration a bit to remove various streaming/server
14 # options that are not required.
15 PACKAGECONFIG = " \
16     ${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "aac", "", d)} \
17     bzip2 \
18     daemon \
19     ${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "ffmpeg aac", "", d)} \
20     flac \
21     libsamplerate \
22     mpg123 \
23     sndfile \
24     opus \
25     vorbis \
26     wavpack \
27     zlib \
28     pipewire \
29     id3tag \
30 "
31
32 SYSTEMD_AUTO_ENABLE = "enable"
33
34 # Override default as AGL's PipeWire configuration does not make use of audio
35 # group.  As opposed to using the group setting in mpd.conf, this keeps the
36 # files created in /var/lib/mpd as mpd.mpd, which seems safer.
37 USERADD_PARAM:${PN} = " \
38     --system --no-create-home \
39     --home ${localstatedir}/lib/mpd \
40     --groups pipewire \
41     --user-group mpd"
42
43 # Install volatile redirect for /var/lib/mpd to avoid any chance of metadata
44 # corruption on reboot.  This matches what as previously done with the
45 # lightmediascanner configuration.
46 do_install:append() {
47     if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
48         install -D -m 0644 ${WORKDIR}/mpd-volatiles.conf ${D}${sysconfdir}/tmpfiles.d/mpd.conf
49     fi
50 }