nixpkgs/pkgs/by-name/fw/fwupd/installed-tests-path.patch

50 lines
2.0 KiB
Diff
Raw Normal View History

diff --git a/data/installed-tests/meson.build b/data/installed-tests/meson.build
index dfce86b1c..5e34c4fa6 100644
2019-01-27 23:15:00 +00:00
--- a/data/installed-tests/meson.build
+++ b/data/installed-tests/meson.build
@@ -86,5 +86,5 @@ configure_file(
2023-01-22 02:16:58 +00:00
output: 'fwupd-tests.conf',
configuration: con2,
2019-01-27 23:15:00 +00:00
install: true,
- install_dir: join_paths(datadir, 'fwupd', 'remotes.d'),
+ install_dir: join_paths(get_option('installed_test_prefix'), 'etc', 'fwupd', 'remotes.d'),
2019-01-27 23:15:00 +00:00
)
diff --git a/meson.build b/meson.build
index ca6ccdf92..36b1b47b0 100644
--- a/meson.build
+++ b/meson.build
@@ -188,8 +188,8 @@ else
datadir = join_paths(prefix, get_option('datadir'))
sysconfdir = join_paths(prefix, get_option('sysconfdir'))
localstatedir = join_paths(prefix, get_option('localstatedir'))
- installed_test_bindir = join_paths(libexecdir, 'installed-tests', meson.project_name())
- installed_test_datadir = join_paths(datadir, 'installed-tests', meson.project_name())
+ installed_test_bindir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', meson.project_name())
+ installed_test_datadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', meson.project_name())
daemon_dir = join_paths(libexecdir, 'fwupd')
endif
mandir = join_paths(prefix, get_option('mandir'))
@@ -497,6 +497,7 @@ gnome = import('gnome')
i18n = import('i18n')
conf.set_quoted('FWUPD_PREFIX', prefix)
+conf.set_quoted('FWUPD_INSTALLED_TEST_PREFIX', get_option('installed_test_prefix'))
conf.set_quoted('FWUPD_BINDIR', bindir)
conf.set_quoted('FWUPD_LIBDIR', libdir)
conf.set_quoted('FWUPD_LIBEXECDIR', libexecdir)
diff --git a/meson_options.txt b/meson_options.txt
index 877891126..bfc5d1afd 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -452,6 +452,10 @@ option('elogind',
'false': 'disabled',
},
)
+option('installed_test_prefix',
+ type: 'string',
+ description: 'Prefix for installed tests'
+)
option('tests',
type: 'boolean',
value: true,