meta-pipewire: backport pipewire updates from master
[AGL/meta-agl.git] / meta-pipewire / recipes-multimedia / wireplumber / wireplumber_git.bb
1 SUMMARY     = "Session / Policy Manager for PipeWire"
2 HOMEPAGE    = "https://gitlab.freedesktop.org/pipewire/wireplumber"
3 BUGTRACKER  = "https://gitlab.freedesktop.org/pipewire/wireplumber/issues"
4 AUTHOR      = "George Kiagiadakis <george.kiagiadakis@collabora.com>"
5 SECTION     = "multimedia"
6
7 LICENSE = "MIT"
8 LIC_FILES_CHKSUM = "file://LICENSE;beginline=3;md5=e8ad01a5182f2c1b3a2640e9ea268264"
9
10 inherit meson pkgconfig systemd
11
12 DEPENDS = "glib-2.0 glib-2.0-native pipewire lua"
13
14 SRC_URI = "\
15     git://gitlab.freedesktop.org/pipewire/wireplumber.git;protocol=https;branch=master \
16 "
17 SRCREV = "ecef960b7859b9b24885840453a3ddf4812845f2"
18
19 #PV = "0.3.95+git${SRCPV}"
20 PV = "0.3.95"
21 S  = "${WORKDIR}/git"
22
23 WPAPI="0.4"
24
25 # use shared lua from the system instead of the static bundled one
26 EXTRA_OEMESON += "-Dsystem-lua=true"
27
28 # introspection in practice is only used for generating API docs
29 # API docs are available on the website and we don't need to build them
30 # (plus they depend on hotdoc which is not available here)
31 EXTRA_OEMESON += "-Dintrospection=disabled -Ddoc=disabled"
32
33 PACKAGECONFIG = "\
34     ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
35 "
36
37 PACKAGECONFIG[systemd] = "-Dsystemd=enabled -Dsystemd-system-service=true -Dsystemd-user-service=false,-Dsystemd=disabled -Dsystemd-system-service=false -Dsystemd-user-service=false,systemd"
38
39 do_configure_prepend() {
40     # relax meson version requirement
41     # we only need 0.54 when building with -Dsystem-lua=false
42     sed "s/meson_version : '>= 0.54.0'/meson_version : '>= 0.51.0'/" ${S}/meson.build > ${S}/tmp.build
43     mv -f ${S}/tmp.build ${S}/meson.build
44 }
45
46 PACKAGES =+ "\
47     lib${PN}-${WPAPI} \
48     ${PN}-config \
49 "
50
51 SYSTEMD_SERVICE_${PN} = "wireplumber.service"
52 FILES_${PN} = "\
53     ${bindir}/wireplumber \
54     ${bindir}/wpctl \
55     ${bindir}/wpexec \
56     ${libdir}/wireplumber-${WPAPI}/* \
57     ${datadir}/wireplumber/* \
58     ${systemd_system_unitdir}/* \
59 "
60 RPROVIDES_${PN} += "virtual/pipewire-sessionmanager"
61 RDEPENDS_${PN} += "virtual/wireplumber-config"
62
63 FILES_lib${PN}-${WPAPI} = "\
64     ${libdir}/libwireplumber-${WPAPI}.so.* \
65 "
66
67 FILES_${PN}-config += "\
68     ${sysconfdir}/wireplumber/* \
69 "
70 CONFFILES_${PN}-config += "\
71     ${sysconfdir}/wireplumber/* \
72 "
73 RPROVIDES_${PN}-config += "virtual/wireplumber-config"