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