summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-bsp/fwupd/fwupd_2.0.12.bb
blob: eb43c3d86552fd98a0b0b3d9bdf751fd8341b721 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
SUMMARY = "A simple daemon to allow session software to update firmware"
LICENSE = "LGPL-2.1-or-later"
LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"

DEPENDS = "\
    curl \
    gcab \
    glib-2.0 \
    json-glib \
    hwdata \
    libjcat \
    libusb \
    libxmlb \
    python3-jinja2-native \
    vala-native \
"

SRC_URI = "\
    https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz \
    file://0001-build-certs.py-use-usr-bin-env-for-python3.patch \
    file://0001-fu-lzma-common.c-reduce-lzma-compression-level-from-.patch \
    file://run-ptest \
"
SRC_URI[sha256sum] = "83eab17ef2e65249491aef5e99419827b43ac56d40c5b0747b59ee94b147215e"

UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases"
UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"

# Machine-specific as we examine MACHINE_FEATURES to decide whether to build the UEFI plugins
PACKAGE_ARCH = "${MACHINE_ARCH}"

inherit meson vala gobject-introspection systemd bash-completion pkgconfig gi-docgen ptest manpages

GIDOCGEN_MESON_OPTION = 'docs'
GIDOCGEN_MESON_ENABLE_FLAG = 'enabled'
GIDOCGEN_MESON_DISABLE_FLAG = 'disabled'
GIR_MESON_ENABLE_FLAG = 'enabled'
GIR_MESON_DISABLE_FLAG = 'disabled'

EXTRA_OEMESON = "-Dvendor_ids_dir=${datadir}/hwdata"

PACKAGECONFIG ??= "\
    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
    ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
    ${@bb.utils.filter('DISTRO_FEATURES', 'bluetooth polkit', d)} \
    gnutls \
    hsi \
    plugin_flashrom \
    plugin_modem_manager \
    protobuf \
"

PACKAGECONFIG[bluetooth] = "-Dbluez=enabled,-Dbluez=disabled"
PACKAGECONFIG[firmware-packager] = "-Dfirmware-packager=true,-Dfirmware-packager=false"
PACKAGECONFIG[fish-completion] = "-Dfish_completion=true,-Dfish_completion=false"
PACKAGECONFIG[gnutls] = "-Dgnutls=enabled,-Dgnutls=disabled,gnutls"
PACKAGECONFIG[hsi] = "-Dhsi=enabled,-Dhsi=disabled"
PACKAGECONFIG[libarchive] = "-Dlibarchive=enabled,-Dlibarchive=disabled,libarchive"
PACKAGECONFIG[libdrm] = "-Dlibdrm=enabled,-Dlibdrm=disabled,libdrm"
PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false"
PACKAGECONFIG[metainfo] = "-Dmetainfo=true,-Dmetainfo=false"
PACKAGECONFIG[polkit] = "-Dpolkit=enabled,-Dpolkit=disabled,polkit"
PACKAGECONFIG[readline] = "-Dreadline=enabled,-Dreadline=disabled,readline"
PACKAGECONFIG[systemd] = "-Dsystemd=enabled,-Dsystemd=disabled,systemd"
PACKAGECONFIG[tests] = "-Dtests=true,-Dtests=false,gcab-native"

# TODO plugins-all meta-option that expands to all plugin_*?
PACKAGECONFIG[plugin_flashrom] = "-Dplugin_flashrom=enabled,-Dplugin_flashrom=disabled,flashrom"
PACKAGECONFIG[protobuf] = "-Dprotobuf=enabled,-Dprotobuf=disabled,protobuf-c-native protobuf-c"
PACKAGECONFIG[plugin_modem_manager] = "-Dplugin_modem_manager=enabled,-Dplugin_modem_manager=disabled,libqmi modemmanager"
PACKAGECONFIG[plugin_uefi_capsule_splash] = "-Dplugin_uefi_capsule_splash=true,-Dplugin_uefi_capsule_splash=false,python3-pygobject"

FILES:${PN} += "\
    ${libdir}/fwupd-plugins-* \
    ${libdir}/fwupd-${PV} \
    ${systemd_unitdir} \
    ${nonarch_libdir}/sysusers.d/fwupd.conf \
    ${datadir}/fish \
    ${datadir}/metainfo \
    ${datadir}/icons \
    ${datadir}/dbus-1 \
    ${datadir}/polkit-1 \
    ${nonarch_libdir}/modules-load.d \
"

FILES:${PN}-ptest += "${libexecdir}/installed-tests/ \
                      ${datadir}/installed-tests/"
RDEPENDS:${PN}-ptest += "gnome-desktop-testing python3"

# ESP mounting, not strictly necessary
RRECOMMENDS:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'polkit', 'udisks2', '', d)}"

INSANE_SKIP:${PN}-ptest += "buildpaths"