215 lines
6.7 KiB
Diff
215 lines
6.7 KiB
Diff
commit e798ff19cd36daaed68b86edc7ebdb9dcfe1c057
|
|
Author: r-vdp <ramses@well-founded.dev>
|
|
Date: Tue Oct 15 11:46:38 2024 +0200
|
|
|
|
Add option for installation sysconfdir
|
|
|
|
diff --git a/data/bios-settings.d/meson.build b/data/bios-settings.d/meson.build
|
|
index b0ff5b106..29b60a3be 100644
|
|
--- a/data/bios-settings.d/meson.build
|
|
+++ b/data/bios-settings.d/meson.build
|
|
@@ -1,5 +1,5 @@
|
|
if build_standalone and host_machine.system() == 'linux'
|
|
install_data('README.md',
|
|
- install_dir: join_paths(sysconfdir, 'fwupd', 'bios-settings.d')
|
|
+ install_dir: join_paths(datadir, 'fwupd', 'bios-settings.d')
|
|
)
|
|
endif
|
|
diff --git a/data/meson.build b/data/meson.build
|
|
index 9db5cd756..cf3181c8b 100644
|
|
--- a/data/meson.build
|
|
+++ b/data/meson.build
|
|
@@ -27,7 +27,7 @@ endif
|
|
|
|
if build_standalone
|
|
install_data(['fwupd.conf'],
|
|
- install_dir: join_paths(sysconfdir, 'fwupd'),
|
|
+ install_dir: join_paths(sysconfdir_install, 'fwupd'),
|
|
install_mode: 'rw-r-----',
|
|
)
|
|
plugin_quirks += files([
|
|
diff --git a/data/pki/meson.build b/data/pki/meson.build
|
|
index 686064195..72ae401bd 100644
|
|
--- a/data/pki/meson.build
|
|
+++ b/data/pki/meson.build
|
|
@@ -7,13 +7,13 @@ install_data([
|
|
'GPG-KEY-Linux-Foundation-Firmware',
|
|
'GPG-KEY-Linux-Vendor-Firmware-Service',
|
|
],
|
|
- install_dir: join_paths(sysconfdir, 'pki', 'fwupd')
|
|
+ install_dir: join_paths(sysconfdir_install, 'pki', 'fwupd')
|
|
)
|
|
install_data([
|
|
'GPG-KEY-Linux-Foundation-Metadata',
|
|
'GPG-KEY-Linux-Vendor-Firmware-Service',
|
|
],
|
|
- install_dir: join_paths(sysconfdir, 'pki', 'fwupd-metadata')
|
|
+ install_dir: join_paths(sysconfdir_install, 'pki', 'fwupd-metadata')
|
|
)
|
|
endif
|
|
|
|
@@ -21,11 +21,11 @@ if supported_pkcs7
|
|
install_data([
|
|
'LVFS-CA.pem',
|
|
],
|
|
- install_dir: join_paths(sysconfdir, 'pki', 'fwupd')
|
|
+ install_dir: join_paths(sysconfdir_install, 'pki', 'fwupd')
|
|
)
|
|
install_data([
|
|
'LVFS-CA.pem',
|
|
],
|
|
- install_dir: join_paths(sysconfdir, 'pki', 'fwupd-metadata')
|
|
+ install_dir: join_paths(sysconfdir_install, 'pki', 'fwupd-metadata')
|
|
)
|
|
endif
|
|
diff --git a/data/remotes.d/meson.build b/data/remotes.d/meson.build
|
|
index 10201bc9a..fba712491 100644
|
|
--- a/data/remotes.d/meson.build
|
|
+++ b/data/remotes.d/meson.build
|
|
@@ -11,14 +11,14 @@ if build_standalone and get_option('lvfs') != 'false'
|
|
output: 'lvfs.conf',
|
|
configuration: con3,
|
|
install: true,
|
|
- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
|
|
+ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
|
|
)
|
|
configure_file(
|
|
input: 'lvfs-testing.conf',
|
|
output: 'lvfs-testing.conf',
|
|
configuration: con3,
|
|
install: true,
|
|
- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
|
|
+ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
|
|
)
|
|
i18n.merge_file(
|
|
input: 'lvfs.metainfo.xml',
|
|
@@ -52,12 +52,12 @@ configure_file(
|
|
output: 'vendor.conf',
|
|
configuration: con2,
|
|
install: get_option('vendor_metadata'),
|
|
- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
|
|
+ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
|
|
)
|
|
configure_file(
|
|
input: 'vendor-directory.conf',
|
|
output: 'vendor-directory.conf',
|
|
configuration: con2,
|
|
install: true,
|
|
- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
|
|
+ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
|
|
)
|
|
diff --git a/docs/meson.build b/docs/meson.build
|
|
index 5693edcc8..181c359a4 100644
|
|
--- a/docs/meson.build
|
|
+++ b/docs/meson.build
|
|
@@ -124,7 +124,7 @@ if build_docs
|
|
],
|
|
build_by_default: true,
|
|
install: true,
|
|
- install_dir: join_paths(datadir, 'doc'),
|
|
+ install_dir: join_paths(sysconfdir_install, 'doc'),
|
|
)
|
|
|
|
subdir('hsi-tests.d')
|
|
@@ -182,7 +182,7 @@ if build_docs
|
|
],
|
|
build_by_default: true,
|
|
install: true,
|
|
- install_dir: join_paths(datadir, 'doc'),
|
|
+ install_dir: join_paths(sysconfdir_install, 'doc'),
|
|
)
|
|
man_cmd = []
|
|
foreach man: man_md
|
|
@@ -196,7 +196,7 @@ if build_docs
|
|
man_cmd,
|
|
],
|
|
install: true,
|
|
- install_dir: join_paths(datadir, 'doc', 'fwupd')
|
|
+ install_dir: join_paths(sysconfdir_install, 'doc', 'fwupd')
|
|
)
|
|
if hsi
|
|
install_data(['hsi.html'],
|
|
@@ -204,18 +204,18 @@ if build_docs
|
|
)
|
|
endif
|
|
install_data(['urlmap_fwupd.js'],
|
|
- install_dir: join_paths(datadir, 'doc', 'libfwupd')
|
|
+ install_dir: join_paths(sysconfdir_install, 'doc', 'libfwupd')
|
|
)
|
|
install_data(['urlmap_fwupdplugin.js'],
|
|
- install_dir: join_paths(datadir, 'doc', 'libfwupdplugin')
|
|
+ install_dir: join_paths(sysconfdir_install, 'doc', 'libfwupdplugin')
|
|
)
|
|
#make devhelp work
|
|
install_symlink('libfwupd',
|
|
- install_dir: join_paths(datadir, 'doc', 'fwupd'),
|
|
+ install_dir: join_paths(sysconfdir_install, 'doc', 'fwupd'),
|
|
pointing_to: join_paths('..', 'libfwupd'),
|
|
)
|
|
install_symlink('libfwupdplugin',
|
|
- install_dir: join_paths(datadir, 'doc', 'fwupd'),
|
|
+ install_dir: join_paths(sysconfdir_install, 'doc', 'fwupd'),
|
|
pointing_to: join_paths('..', 'libfwupdplugin'),
|
|
)
|
|
endif
|
|
diff --git a/meson.build b/meson.build
|
|
index 2ceaf531c..e4e764b97 100644
|
|
--- a/meson.build
|
|
+++ b/meson.build
|
|
@@ -201,6 +201,12 @@ endif
|
|
mandir = join_paths(prefix, get_option('mandir'))
|
|
localedir = join_paths(prefix, get_option('localedir'))
|
|
|
|
+if get_option('sysconfdir_install') != ''
|
|
+ sysconfdir_install = join_paths(prefix, get_option('sysconfdir_install'))
|
|
+else
|
|
+ sysconfdir_install = sysconfdir
|
|
+endif
|
|
+
|
|
diffcmd = find_program('diff')
|
|
gio = dependency('gio-2.0', version: '>= 2.72.0')
|
|
giounix = dependency('gio-unix-2.0', version: '>= 2.72.0', required: false)
|
|
diff --git a/meson_options.txt b/meson_options.txt
|
|
index a4a211fbb..6197fe502 100644
|
|
--- a/meson_options.txt
|
|
+++ b/meson_options.txt
|
|
@@ -7,6 +7,11 @@ option('bluez',
|
|
type: 'feature',
|
|
description: 'BlueZ support',
|
|
)
|
|
+option('sysconfdir_install',
|
|
+ type: 'string',
|
|
+ value: '',
|
|
+ description: 'sysconfdir to use during installation'
|
|
+)
|
|
option('build',
|
|
type: 'combo',
|
|
choices: [
|
|
diff --git a/plugins/uefi-capsule/meson.build b/plugins/uefi-capsule/meson.build
|
|
index 2dfc4d2f0..e5ac73edd 100644
|
|
--- a/plugins/uefi-capsule/meson.build
|
|
+++ b/plugins/uefi-capsule/meson.build
|
|
@@ -20,7 +20,7 @@ if host_machine.system() == 'linux'
|
|
output: '35_fwupd',
|
|
configuration: con2,
|
|
install: true,
|
|
- install_dir: join_paths(sysconfdir, 'grub.d')
|
|
+ install_dir: join_paths(sysconfdir_install, 'grub.d')
|
|
)
|
|
elif host_machine.system() == 'freebsd'
|
|
backend_srcs += 'fu-uefi-backend-freebsd.c'
|
|
@@ -93,7 +93,7 @@ if get_option('plugin_uefi_capsule_splash')
|
|
'--out', '@OUTPUT@',
|
|
],
|
|
install: true,
|
|
- install_dir: join_paths(datadir, 'fwupd'),
|
|
+ install_dir: join_paths(sysconfdir_install, 'fwupd'),
|
|
)
|
|
endif
|
|
|
|
@@ -146,4 +146,3 @@ summary({
|
|
'capsule splash': get_option('plugin_uefi_capsule_splash'),
|
|
}, section:'uefi capsule options')
|
|
endif
|
|
-
|