mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-13 23:22:56 +00:00
trivial: Make the daemon functionality optional
This is useful when building just fwupdtool in a flatpak.
This commit is contained in:
parent
c7c53ff03d
commit
e43f832c5d
@ -24,9 +24,11 @@ install_data(['metadata.xml'],
|
||||
install_dir : join_paths(datadir, 'fwupd', 'remotes.d', 'fwupd')
|
||||
)
|
||||
|
||||
install_data(['90-fwupd-devices.rules'],
|
||||
install_dir : join_paths(udevdir, 'rules.d')
|
||||
)
|
||||
if get_option('daemon')
|
||||
install_data(['90-fwupd-devices.rules'],
|
||||
install_dir : join_paths(udevdir, 'rules.d')
|
||||
)
|
||||
endif
|
||||
|
||||
con2 = configuration_data()
|
||||
con2.set('libexecdir', libexecdir)
|
||||
|
@ -1,4 +1,4 @@
|
||||
if get_option('lvfs')
|
||||
if get_option('daemon') and get_option('lvfs')
|
||||
install_data([
|
||||
'lvfs.conf',
|
||||
'lvfs-testing.conf',
|
||||
|
27
meson.build
27
meson.build
@ -134,10 +134,6 @@ add_project_arguments('-D_GNU_SOURCE', language : 'c')
|
||||
gio = dependency('gio-2.0', version : '>= 2.45.8')
|
||||
gmodule = dependency('gmodule-2.0')
|
||||
giounix = dependency('gio-unix-2.0', version : '>= 2.45.8')
|
||||
polkit = dependency('polkit-gobject-1', version : '>= 0.103')
|
||||
if polkit.version().version_compare('>= 0.114')
|
||||
conf.set('HAVE_POLKIT_0_114', '1')
|
||||
endif
|
||||
gudev = dependency('gudev-1.0')
|
||||
if gudev.version().version_compare('>= 232')
|
||||
conf.set('HAVE_GUDEV_232', '1')
|
||||
@ -149,6 +145,17 @@ libarchive = dependency('libarchive')
|
||||
libjsonglib = dependency('json-glib-1.0', version : '>= 1.1.1')
|
||||
valgrind = dependency('valgrind', required: false)
|
||||
soup = dependency('libsoup-2.4', version : '>= 2.51.92')
|
||||
if get_option('daemon')
|
||||
polkit = dependency('polkit-gobject-1', version : '>= 0.103')
|
||||
if polkit.version().version_compare('>= 0.114')
|
||||
conf.set('HAVE_POLKIT_0_114', '1')
|
||||
endif
|
||||
udevdir = get_option('udevdir')
|
||||
if udevdir == ''
|
||||
udev = dependency('udev')
|
||||
udevdir = udev.get_pkgconfig_variable('udevdir')
|
||||
endif
|
||||
endif
|
||||
if get_option('pkcs7')
|
||||
gnutls = dependency('gnutls', version : '>= 3.4.4.1')
|
||||
conf.set('ENABLE_PKCS7', '1')
|
||||
@ -159,7 +166,6 @@ if get_option('gpg')
|
||||
conf.set('ENABLE_GPG', '1')
|
||||
endif
|
||||
libm = cc.find_library('m', required: false)
|
||||
udev = dependency('udev')
|
||||
uuid = dependency('uuid')
|
||||
libgcab = dependency('libgcab-1.0')
|
||||
if libgcab.version().version_compare('>= 0.8')
|
||||
@ -247,11 +253,6 @@ if systemdunitdir == '' and get_option('systemd')
|
||||
systemdunitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir')
|
||||
endif
|
||||
|
||||
udevdir = get_option('udevdir')
|
||||
if udevdir == ''
|
||||
udevdir = udev.get_pkgconfig_variable('udevdir')
|
||||
endif
|
||||
|
||||
gnome = import('gnome')
|
||||
i18n = import('i18n')
|
||||
|
||||
@ -288,11 +289,13 @@ subdir('data')
|
||||
subdir('docs')
|
||||
subdir('libfwupd')
|
||||
subdir('po')
|
||||
subdir('policy')
|
||||
if get_option('daemon')
|
||||
subdir('policy')
|
||||
endif
|
||||
subdir('src')
|
||||
subdir('plugins')
|
||||
subdir('contrib')
|
||||
|
||||
if get_option('systemd')
|
||||
if get_option('systemd') and get_option('daemon')
|
||||
meson.add_install_script('meson_post_install.sh', systemdunitdir, localstatedir)
|
||||
endif
|
||||
|
@ -1,4 +1,5 @@
|
||||
option('bootdir', type : 'string', value : '/boot/efi', description : 'Directory for EFI system partition')
|
||||
option('daemon', type : 'boolean', value : true, description : 'enable the fwupd daemon')
|
||||
option('consolekit', type : 'boolean', value : true, description : 'enable ConsoleKit support')
|
||||
option('gpg', type : 'boolean', value : true, description : 'enable the GPG verification support')
|
||||
option('gtkdoc', type : 'boolean', value : true, description : 'enable developer documentation')
|
||||
|
@ -44,7 +44,6 @@ libfwupdprivate = static_library(
|
||||
giounix,
|
||||
gudev,
|
||||
gusb,
|
||||
polkit,
|
||||
soup,
|
||||
sqlite,
|
||||
libarchive,
|
||||
@ -60,6 +59,7 @@ libfwupdprivate = static_library(
|
||||
],
|
||||
)
|
||||
|
||||
if get_option('daemon')
|
||||
fwupdmgr = executable(
|
||||
'fwupdmgr',
|
||||
sources : [
|
||||
@ -75,7 +75,6 @@ fwupdmgr = executable(
|
||||
giounix,
|
||||
gudev,
|
||||
gusb,
|
||||
polkit,
|
||||
soup,
|
||||
sqlite,
|
||||
libarchive,
|
||||
@ -93,6 +92,7 @@ fwupdmgr = executable(
|
||||
install : true,
|
||||
install_dir : bindir
|
||||
)
|
||||
endif
|
||||
|
||||
resources_src = gnome.compile_resources(
|
||||
'fwupd-resources',
|
||||
@ -141,7 +141,6 @@ fwupdtool = executable(
|
||||
gmodule,
|
||||
gudev,
|
||||
gusb,
|
||||
polkit,
|
||||
soup,
|
||||
sqlite,
|
||||
valgrind,
|
||||
@ -165,7 +164,7 @@ fwupdtool = executable(
|
||||
install_dir : join_paths(libexecdir, 'fwupd')
|
||||
)
|
||||
|
||||
if get_option('man')
|
||||
if get_option('daemon') and get_option('man')
|
||||
help2man = find_program('help2man')
|
||||
custom_target('fwupdmgr-man',
|
||||
input : fwupdmgr,
|
||||
@ -183,6 +182,7 @@ if get_option('man')
|
||||
)
|
||||
endif
|
||||
|
||||
if get_option('daemon')
|
||||
executable(
|
||||
'fwupd',
|
||||
resources_src,
|
||||
@ -242,6 +242,7 @@ executable(
|
||||
install : true,
|
||||
install_dir : join_paths(libexecdir, 'fwupd')
|
||||
)
|
||||
endif
|
||||
|
||||
if get_option('tests')
|
||||
testdatadir_src = join_paths(meson.source_root(), 'data', 'tests')
|
||||
@ -292,7 +293,6 @@ if get_option('tests')
|
||||
gmodule,
|
||||
gudev,
|
||||
gusb,
|
||||
polkit,
|
||||
soup,
|
||||
sqlite,
|
||||
valgrind,
|
||||
|
Loading…
Reference in New Issue
Block a user