Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 1 | SUMMARY = "A simple daemon to allow session software to update firmware" |
| 2 | LICENSE = "LGPL-2.1-or-later" |
| 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" |
| 4 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 5 | DEPENDS = "glib-2.0 libxmlb json-glib libjcat gcab vala-native" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 6 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 7 | SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz \ |
Patrick Williams | 8e7b46e | 2023-05-01 14:19:06 -0500 | [diff] [blame] | 8 | file://0001-meson-Avoid-absolute-buildtime-paths-in-generated-he.patch \ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 9 | file://run-ptest" |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 10 | SRC_URI[sha256sum] = "719a791ac4ba5988aeb93ec42778bd65d33cb075d0c093b5c04e5e1682be528a" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 11 | |
| 12 | UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases" |
| 13 | |
| 14 | # Machine-specific as we examine MACHINE_FEATURES to decide whether to build the UEFI plugins |
| 15 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 16 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 17 | inherit meson vala gobject-introspection systemd bash-completion pkgconfig gi-docgen ptest manpages useradd |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 18 | |
| 19 | GIDOCGEN_MESON_OPTION = 'docs' |
| 20 | GIDOCGEN_MESON_ENABLE_FLAG = 'docgen' |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 21 | GIDOCGEN_MESON_DISABLE_FLAG = 'disabled' |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 22 | |
| 23 | PACKAGECONFIG ??= "curl gnutls gudev gusb \ |
| 24 | ${@bb.utils.filter('DISTRO_FEATURES', 'bluetooth polkit', d)} \ |
| 25 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd offline', '', d)} \ |
| 26 | ${@bb.utils.contains('MACHINE_FEATURES', 'efi', 'plugin_uefi_capsule plugin_uefi_pk', '', d)} \ |
| 27 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests plugin_dummy', '', d)} \ |
| 28 | hsi \ |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 29 | plugin_android_boot \ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 30 | plugin_acpi_phat \ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 31 | plugin_bcm57xx \ |
| 32 | plugin_emmc \ |
| 33 | plugin_ep963x \ |
| 34 | plugin_fastboot \ |
| 35 | plugin_flashrom \ |
| 36 | plugin_gpio \ |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 37 | plugin_igsc \ |
| 38 | plugin_intel_me \ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 39 | plugin_intel_spi \ |
| 40 | plugin_logitech_bulkcontroller \ |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 41 | plugin_logitech_scribe \ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 42 | plugin_modem_manager \ |
| 43 | plugin_msr \ |
| 44 | plugin_nitrokey \ |
| 45 | plugin_nvme \ |
| 46 | plugin_parade_lspcon \ |
| 47 | plugin_pixart_rf \ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 48 | plugin_realtek_mst \ |
| 49 | plugin_redfish \ |
| 50 | plugin_synaptics_mst \ |
| 51 | plugin_synaptics_rmi \ |
| 52 | plugin_scsi \ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 53 | plugin_uf2 \ |
| 54 | plugin_upower \ |
| 55 | sqlite" |
| 56 | |
| 57 | PACKAGECONFIG[bluetooth] = "-Dbluez=true,-Dbluez=false" |
| 58 | PACKAGECONFIG[compat-cli] = "-Dcompat_cli=true,-Dcompat_cli=false" |
| 59 | PACKAGECONFIG[consolekit] = "-Dconsolekit=true,-Dconsolekit=false,consolekit" |
| 60 | PACKAGECONFIG[curl] = "-Dcurl=true,-Dcurl=false,curl" |
| 61 | PACKAGECONFIG[firmware-packager] = "-Dfirmware-packager=true,-Dfirmware-packager=false" |
| 62 | PACKAGECONFIG[fish-completion] = "-Dfish_completion=true,-Dfish_completion=false" |
| 63 | PACKAGECONFIG[gnutls] = "-Dgnutls=true,-Dgnutls=false,gnutls" |
| 64 | PACKAGECONFIG[gudev] = "-Dgudev=true,-Dgudev=false,libgudev" |
| 65 | PACKAGECONFIG[gusb] = "-Dgusb=true,-Dgusb=false,libgusb" |
| 66 | PACKAGECONFIG[hsi] = "-Dhsi=true,-Dhsi=false" |
| 67 | PACKAGECONFIG[libarchive] = "-Dlibarchive=true,-Dlibarchive=false,libarchive" |
| 68 | PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false" |
| 69 | PACKAGECONFIG[metainfo] = "-Dmetainfo=true,-Dmetainfo=false" |
| 70 | PACKAGECONFIG[offline] = "-Doffline=true,-Doffline=false" |
| 71 | PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false,polkit" |
| 72 | PACKAGECONFIG[sqlite] = "-Dsqlite=true,-Dsqlite=false,sqlite3" |
| 73 | PACKAGECONFIG[systemd] = "-Dsystemd=true,-Dsystemd=false,systemd" |
| 74 | PACKAGECONFIG[tests] = "-Dtests=true,-Dtests=false,gcab-native" |
| 75 | |
| 76 | |
| 77 | # TODO plugins-all meta-option that expands to all plugin_*? |
| 78 | PACKAGECONFIG[plugin_acpi_phat] = "-Dplugin_acpi_phat=true,-Dplugin_acpi_phat=false" |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 79 | PACKAGECONFIG[plugin_android_boot] = "-Dplugin_android_boot=enabled,-Dplugin_android_boot=disabled" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 80 | PACKAGECONFIG[plugin_bcm57xx] = "-Dplugin_bcm57xx=true,-Dplugin_bcm57xx=false" |
| 81 | PACKAGECONFIG[plugin_cfu] = "-Dplugin_cfu=true,-Dplugin_cfu=false" |
| 82 | PACKAGECONFIG[plugin_dell] = "-Dplugin_dell=true,-Dplugin_dell=false,libsmbios" |
| 83 | PACKAGECONFIG[plugin_dummy] = "-Dplugin_dummy=true,-Dplugin_dummy=false" |
| 84 | PACKAGECONFIG[plugin_emmc] = "-Dplugin_emmc=true,-Dplugin_emmc=false" |
| 85 | PACKAGECONFIG[plugin_ep963x] = "-Dplugin_ep963x=true,-Dplugin_ep963x=false" |
| 86 | PACKAGECONFIG[plugin_fastboot] = "-Dplugin_fastboot=true,-Dplugin_fastboot=false" |
| 87 | PACKAGECONFIG[plugin_flashrom] = "-Dplugin_flashrom=true,-Dplugin_flashrom=false,flashrom" |
Patrick Williams | 2390b1b | 2022-11-03 13:47:49 -0500 | [diff] [blame] | 88 | PACKAGECONFIG[plugin_gpio] = "-Dplugin_gpio=true,-Dplugin_gpio=false" |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 89 | PACKAGECONFIG[plugin_igsc] = "-Dplugin_igsc=enabled,-Dplugin_igsc=disabled" |
| 90 | PACKAGECONFIG[plugin_intel_me] = "-Dplugin_intel_me=enabled,-Dplugin_intel_me=disabled" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 91 | PACKAGECONFIG[plugin_intel_spi] = "-Dplugin_intel_spi=true -Dlzma=true,-Dplugin_intel_spi=false -Dlzma=false,xz" |
| 92 | PACKAGECONFIG[plugin_logitech_bulkcontroller] = "-Dplugin_logitech_bulkcontroller=true,-Dplugin_logitech_bulkcontroller=false,protobuf-c-native protobuf-c" |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 93 | PACKAGECONFIG[plugin_logitech_scribe] = "-Dplugin_logitech_scribe=enabled,-Dplugin_logitech_scribe=disabled" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 94 | PACKAGECONFIG[plugin_modem_manager] = "-Dplugin_modem_manager=true,-Dplugin_modem_manager=false,libqmi modemmanager" |
| 95 | PACKAGECONFIG[plugin_msr] = "-Dplugin_msr=true,-Dplugin_msr=false,cpuid" |
| 96 | PACKAGECONFIG[plugin_nitrokey] = "-Dplugin_nitrokey=true,-Dplugin_nitrokey=false" |
| 97 | PACKAGECONFIG[plugin_nvme] = "-Dplugin_nvme=true,-Dplugin_nvme=false" |
| 98 | PACKAGECONFIG[plugin_parade_lspcon] = "-Dplugin_parade_lspcon=true,-Dplugin_parade_lspcon=false" |
| 99 | PACKAGECONFIG[plugin_pixart_rf] = "-Dplugin_pixart_rf=true,-Dplugin_pixart_rf=false" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 100 | PACKAGECONFIG[plugin_powerd] = "-Dplugin_powerd=true,-Dplugin_powerd=false" |
| 101 | PACKAGECONFIG[plugin_realtek_mst] = "-Dplugin_realtek_mst=true,-Dplugin_realtek_mst=false" |
| 102 | PACKAGECONFIG[plugin_redfish] = "-Dplugin_redfish=true,-Dplugin_redfish=false" |
| 103 | PACKAGECONFIG[plugin_scsi] = "-Dplugin_scsi=true,-Dplugin_scsi=false" |
| 104 | PACKAGECONFIG[plugin_synaptics_mst] = "-Dplugin_synaptics_mst=true,-Dplugin_synaptics_mst=false" |
| 105 | PACKAGECONFIG[plugin_synaptics_rmi] = "-Dplugin_synaptics_rmi=true,-Dplugin_synaptics_rmi=false" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 106 | PACKAGECONFIG[plugin_tpm] = "-Dplugin_tpm=true,-Dplugin_tpm=false,tpm2-tss" |
| 107 | # Turn off the capsule splash as it needs G-I at buildtime, which isn't currently supported |
| 108 | PACKAGECONFIG[plugin_uefi_capsule] = "-Dplugin_uefi_capsule=true -Dplugin_uefi_capsule_splash=false,-Dplugin_uefi_capsule=false,efivar fwupd-efi" |
| 109 | PACKAGECONFIG[plugin_uefi_pk] = "-Dplugin_uefi_pk=true,-Dplugin_uefi_pk=false" |
| 110 | PACKAGECONFIG[plugin_uf2] = "-Dplugin_uf2=true,-Dplugin_uf2=false" |
| 111 | PACKAGECONFIG[plugin_upower] = "-Dplugin_upower=true,-Dplugin_upower=false" |
| 112 | |
| 113 | # Always disable these plugins on non-x86 platforms as they don't compile or are useless |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 114 | DISABLE_NON_X86 = "plugin_intel_me plugin_intel_spi plugin_msr" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 115 | DISABLE_NON_X86:x86 = "" |
| 116 | DISABLE_NON_X86:x86-64 = "" |
| 117 | PACKAGECONFIG:remove = "${DISABLE_NON_X86}" |
| 118 | |
Andrew Geissler | 6aa7eec | 2023-03-03 12:41:14 -0600 | [diff] [blame] | 119 | USERADD_PACKAGES = "${PN}" |
| 120 | USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 --shell /bin/nologin polkitd" |
| 121 | |
| 122 | do_install:append() { |
| 123 | if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then |
| 124 | #Fix up permissions on polkit rules.d to work with rpm4 constraints |
| 125 | chmod 700 ${D}/${datadir}/polkit-1/rules.d |
| 126 | chown polkitd:root ${D}/${datadir}/polkit-1/rules.d |
| 127 | fi |
| 128 | } |
| 129 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 130 | FILES:${PN} += "${libdir}/fwupd-plugins-* \ |
Andrew Geissler | c5535c9 | 2023-01-27 16:10:19 -0600 | [diff] [blame] | 131 | ${libdir}/fwupd-${PV} \ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 132 | ${systemd_unitdir} \ |
| 133 | ${datadir}/fish \ |
| 134 | ${datadir}/metainfo \ |
| 135 | ${datadir}/icons \ |
| 136 | ${datadir}/dbus-1 \ |
| 137 | ${datadir}/polkit-1 \ |
| 138 | ${nonarch_libdir}/modules-load.d" |
| 139 | |
| 140 | FILES:${PN}-ptest += "${libexecdir}/installed-tests/ \ |
| 141 | ${datadir}/installed-tests/" |
| 142 | RDEPENDS:${PN}-ptest += "gnome-desktop-testing" |