bb2380de154dfd445b108141400bc399c472962c
[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 # v0.4.7
18 SRCREV = "afb177b5e0840d54dc41d02920702c3c9580ce02"
19
20 # patches to be able to compile with lower version of meson that is available in AGL.
21 SRC_URI += "\
22     file://0001-Revert-wp-uninstalled-build-this-script-with-the-mes.patch \
23     file://0002-Revert-tests-add-pipewire-env-variables-when-running.patch \
24 "
25
26 PV = "0.4.5"
27 S  = "${WORKDIR}/git"
28
29 WPAPI="0.4"
30
31 # use shared lua from the system instead of the static bundled one
32 EXTRA_OEMESON += "-Dsystem-lua=true"
33
34 # introspection in practice is only used for generating API docs
35 # API docs are available on the website and we don't need to build them
36 # (plus they depend on hotdoc which is not available here)
37 EXTRA_OEMESON += "-Dintrospection=disabled -Ddoc=disabled"
38
39 PACKAGECONFIG = "\
40     ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
41 "
42
43 PACKAGECONFIG[systemd] = "-Dsystemd=enabled -Dsystemd-system-service=true -Dsystemd-user-service=false,-Dsystemd=disabled -Dsystemd-system-service=false -Dsystemd-user-service=false,systemd"
44
45 do_configure:prepend() {
46     # relax meson version requirement
47     # we only need 0.54 when building with -Dsystem-lua=false
48     sed "s/meson_version : '>= 0.56.0'/meson_version : '>= 0.53.2'/" ${S}/meson.build > ${S}/tmp.build
49     mv -f ${S}/tmp.build ${S}/meson.build
50 }
51
52 PACKAGES =+ "\
53     lib${PN}-${WPAPI} \
54     ${PN}-config \
55 "
56
57 SYSTEMD_SERVICE:${PN} = "wireplumber.service"
58 FILES:${PN} = "\
59     ${bindir}/wireplumber \
60     ${bindir}/wpctl \
61     ${bindir}/wpexec \
62     ${libdir}/wireplumber-${WPAPI}/* \
63     ${datadir}/wireplumber/* \
64     ${systemd_system_unitdir}/* \
65 "
66 RPROVIDES:${PN} += "virtual/pipewire-sessionmanager"
67 RDEPENDS:${PN} += "virtual/wireplumber-config"
68
69 FILES:lib${PN}-${WPAPI} = "\
70     ${libdir}/libwireplumber-${WPAPI}.so.* \
71 "
72
73 FILES:${PN}-config += "\
74     ${sysconfdir}/wireplumber/* \
75 "
76 CONFFILES:${PN}-config += "\
77     ${sysconfdir}/wireplumber/* \
78 "
79 RPROVIDES:${PN}-config += "virtual/wireplumber-config"