e096e30ae5e1138a234723b90aa8466ca98f23f8
[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://0001-output-PipeWire-activate-stream-in-Drain.patch \
9             file://mpd-volatiles.conf \
10 "
11
12 # The older meson in poky dunfell complains about the use of the
13 # build.{c_std,cpp_std} options even though they work, so we need to
14 # flag them to be ignored in the unknown configure option QA test.
15 # This can be removed after upgrading to Yocto Project 3.5.
16 UNKNOWN_CONFIGURE_OPT_IGNORE = "build.c_std build.cpp_std"
17
18 # This also needs to be pushed upstream.
19 PACKAGECONFIG[pipewire] = "-Dpipewire=enabled,-Dpipewire=disabled,pipewire"
20
21 # Prune the default configuration a bit to remove various streaming/server
22 # options that are not required.
23 PACKAGECONFIG = " \
24     ${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "aac", "", d)} \
25     bzip2 \
26     daemon \
27     ${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "ffmpeg aac", "", d)} \
28     flac \
29     libsamplerate \
30     mpg123 \
31     sndfile \
32     opus \
33     vorbis \
34     wavpack \
35     zlib \
36     pipewire \
37     id3tag \
38 "
39
40 SYSTEMD_AUTO_ENABLE = "enable"
41
42 # Override default as AGL's PipeWire configuration does not make use of audio
43 # group.  As opposed to using the group setting in mpd.conf, this keeps the
44 # files created in /var/lib/mpd as mpd.mpd, which seems safer.
45 USERADD_PARAM:${PN} = " \
46     --system --no-create-home \
47     --home ${localstatedir}/lib/mpd \
48     --groups pipewire \
49     --user-group mpd"
50
51 # Install volatile redirect for /var/lib/mpd to avoid any chance of metadata
52 # corruption on reboot.  This matches what as previously done with the
53 # lightmediascanner configuration.
54 do_install:append() {
55     if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
56         install -D -m 0644 ${WORKDIR}/mpd-volatiles.conf ${D}${sysconfdir}/tmpfiles.d/mpd.conf
57     fi
58 }