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