Make Upower and powerd support optional

In some cases you really know that the daemon is never going to exist.
This commit is contained in:
Richard Hughes 2021-11-27 13:22:37 +00:00
parent 3ad283fc50
commit 3291bd40ce
9 changed files with 11 additions and 4 deletions

View File

@ -29,6 +29,7 @@ build() {
fi
arch-meson -D b_lto=false $CI ../build \
-Dplugin_intel_spi=true \
-Dplugin_powerd=false \
-Dlzma=true \
-Ddocs=gtkdoc \
-Defi_binary=false \

View File

@ -43,6 +43,8 @@ meson .. \
-Dplugin_thunderbolt=false \
-Dplugin_synaptics_mst=false \
-Dplugin_synaptics_rmi=false \
-Dplugin_upower=false \
-Dplugin_powerd=false \
-Dman=false \
-Dmetainfo=false \
-Dsoup_session_compat=false \

View File

@ -24,6 +24,7 @@ meson .. \
-Dplugin_msr=false \
-Dplugin_mtd=false \
-Dplugin_redfish=false \
-Dplugin_powerd=false \
-Dintrospection=false \
-Ddocs=none \
-Dlibxmlb:introspection=false \

View File

@ -44,7 +44,7 @@ ifneq ($(QUBES_OPTION),)
CONFARGS += -Dqubes=true
endif
CONFARGS += -Dplugin_dummy=true -Ddocs=gtkdoc -Dsupported_build=true
CONFARGS += -Dplugin_dummy=true -Dplugin_powerd=false -Ddocs=gtkdoc -Dsupported_build=true
%:
dh $@ --with gir

View File

@ -278,6 +278,7 @@ fwupd wrapper for Qubes OS
%endif
-Dman=true \
-Dbluez=true \
-Dplugin_powerd=false \
-Dsupported_build=true
%meson_build
@ -454,7 +455,6 @@ done
%{_libdir}/fwupd-plugins-%{fwupdplugin_version}/libfu_plugin_pci_bcr.so
%{_libdir}/fwupd-plugins-%{fwupdplugin_version}/libfu_plugin_pci_mei.so
%{_libdir}/fwupd-plugins-%{fwupdplugin_version}/libfu_plugin_pixart_rf.so
%{_libdir}/fwupd-plugins-%{fwupdplugin_version}/libfu_plugin_powerd.so
%{_libdir}/fwupd-plugins-%{fwupdplugin_version}/libfu_plugin_realtek_mst.so
%{_libdir}/fwupd-plugins-%{fwupdplugin_version}/libfu_plugin_redfish.so
%{_libdir}/fwupd-plugins-%{fwupdplugin_version}/libfu_plugin_rts54hid.so

View File

@ -36,6 +36,8 @@ option('plugin_mtd', type : 'boolean', value : true, description : 'enable MTD s
option('plugin_flashrom', type : 'boolean', value : false, description : 'enable libflashrom support')
option('plugin_platform_integrity', type : 'boolean', value : false, description : 'enable platform integrity support')
option('plugin_intel_spi', type : 'boolean', value : false, description : 'enable Intel SPI support')
option('plugin_upower', type : 'boolean', value : true, description : 'enable support for UPower')
option('plugin_powerd', type : 'boolean', value : true, description : 'enable support for powerd')
option('qubes', type : 'boolean', value : false, description : 'build packages for Qubes OS')
option('supported_build', type : 'boolean', value : false, description: 'distribution package with upstream support')
option('systemd', type : 'boolean', value : true, description : 'enable systemd support')

View File

@ -1,4 +1,4 @@
if host_machine.system() == 'linux' and gio.version().version_compare('>=2.58')
if get_option('plugin_powerd') and host_machine.system() == 'linux' and gio.version().version_compare('>=2.58')
cargs = ['-DG_LOG_DOMAIN="FuPluginPowerd"']
shared_module('fu_plugin_powerd',

View File

@ -1,4 +1,4 @@
if host_machine.system() == 'linux'
if get_option('plugin_upower') and host_machine.system() == 'linux'
cargs = ['-DG_LOG_DOMAIN="FuPluginUpower"']
shared_module('fu_plugin_upower',

View File

@ -175,6 +175,7 @@ parts:
-Dintrospection=false,
-Dman=false,
-Dplugin_modem_manager=true,
-Dplugin_powerd=false,
-Dudevdir=$SNAPCRAFT_STAGE/lib/udev,
"-Dgusb:tests=false",
"-Dgusb:docs=false",