summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2019-09-25 22:09:49 +0000
committerSam Thursfield <sam@afuera.me.uk>2019-09-25 22:09:49 +0000
commitf4e11792c2a202cd844bdf3f6f2f938110f00268 (patch)
tree4af94e2324f9fbaacfbcdd49477410bd51d8496d
parent4a7d50e51910ecbe6b291253e233161519e885a7 (diff)
parent7eb6f3c80c00402b00395eadd003ea583d16bca6 (diff)
downloadtracker-f4e11792c2a202cd844bdf3f6f2f938110f00268.tar.gz
Merge branch 'trackerutils-arch-independent' into 'master'
meson: Add option to define whether to install and where test utils See merge request GNOME/tracker!140
-rw-r--r--meson_options.txt4
-rw-r--r--utils/trackertestutils/meson.build23
2 files changed, 25 insertions, 2 deletions
diff --git a/meson_options.txt b/meson_options.txt
index fa1ce51dc..d4b3b2a81 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -22,3 +22,7 @@ option('dbus_services', type: 'string', value: '',
description: 'Directory to install D-Bus .service files (leave blank to use the value from dbus-1.pc)')
option('systemd_user_services', type: 'string', value: 'yes',
description: 'Directory to install systemd user .service files (or "yes" for default directory, "no" to disable installation)')
+option('test_utils', type: 'boolean', value: true,
+ description: 'Whether to install the tracker test utils')
+option('test_utils_dir', type: 'string', value: '',
+ description: 'Directory to install tracker test utils (or empty to use the default)')
diff --git a/utils/trackertestutils/meson.build b/utils/trackertestutils/meson.build
index e8ab94c72..78c6fa59d 100644
--- a/utils/trackertestutils/meson.build
+++ b/utils/trackertestutils/meson.build
@@ -1,3 +1,5 @@
+pkg = import('pkgconfig')
+
sources = [
'__init__.py',
'dbusdaemon.py',
@@ -7,5 +9,22 @@ sources = [
'psutil_mini.py',
]
-install_data(sources,
- install_dir: join_paths(tracker_internal_libs_dir, 'trackertestutils'))
+if get_option('test_utils')
+ testutils_dir = get_option('test_utils_dir')
+
+ if testutils_dir == ''
+ arch_independent_libdir = \
+ get_option('prefix') / 'lib' / 'tracker-' + tracker_api_version
+ testutils_dir = join_paths(arch_independent_libdir, 'trackertestutils')
+ endif
+
+ install_data(sources, install_dir: testutils_dir)
+
+ pkg.generate(
+ name: 'tracker-testutils-' + tracker_api_version,
+ description: 'tracker test utilities',
+ variables: [
+ 'python_path=' + testutils_dir
+ ]
+ )
+endif