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