[gnome-photos/wip/rishi/build-flag-for-flatpak] build, flatpak: Add an option for installing Flatpak-specific files
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/build-flag-for-flatpak] build, flatpak: Add an option for installing Flatpak-specific files
- Date: Fri, 12 Mar 2021 14:55:15 +0000 (UTC)
commit f7543ce34d427828c9b5179616acf25d60823523
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Mar 12 15:54:20 2021 +0100
build, flatpak: Add an option for installing Flatpak-specific files
When running as a Flatpak, the application can use a private instace of
Tracker 3's filesystem miner on hosts without Tracker 3. This requires
a few extra files to be installed that are otherwise not necessary.
This should make it easier for downstream distributors to ensure the
correctness of builds, without having to understand too many details.
https://gitlab.gnome.org/GNOME/gnome-photos/-/merge_requests/174
data/meson.build | 46 ++++++++++++++++++++++++----------------------
meson.build | 1 +
meson_options.txt | 1 +
3 files changed, 26 insertions(+), 22 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 96201dad..6e7192e0 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -45,34 +45,36 @@ configure_file(
install_dir: dbus_services_dir,
)
-tracker_domain_conf = configuration_data()
-tracker_domain_conf.set('application_id', photos_namespace)
-tracker_domain_conf.set('libexecdir', photos_libexecdir)
+if photos_flatpak_enabled
+ tracker_domain_conf = configuration_data()
+ tracker_domain_conf.set('application_id', photos_namespace)
+ tracker_domain_conf.set('libexecdir', photos_libexecdir)
-domain_ontology_rule = photos_namespace + '.rule'
+ domain_ontology_rule = photos_namespace + '.rule'
-configure_file(
- input: domain_ontology_rule + '.in',
- output: domain_ontology_rule,
- configuration: tracker_domain_conf,
- install: true,
- install_dir: join_paths(photos_datadir, 'tracker3-miners', 'domain-ontologies'),
-)
-
-tracker_domain_services = [
- 'Tracker3.Miner.Extract',
- 'Tracker3.Miner.Files'
-]
-
-foreach service: tracker_domain_services
configure_file(
- input: '@0@.@1 service in'.format(photos_namespace, service),
- output: '@0@.@1@.service'.format(photos_namespace, service),
+ input: domain_ontology_rule + '.in',
+ output: domain_ontology_rule,
configuration: tracker_domain_conf,
install: true,
- install_dir: dbus_services_dir,
+ install_dir: join_paths(photos_datadir, 'tracker3-miners', 'domain-ontologies'),
)
-endforeach
+
+ tracker_domain_services = [
+ 'Tracker3.Miner.Extract',
+ 'Tracker3.Miner.Files'
+ ]
+
+ foreach service: tracker_domain_services
+ configure_file(
+ input: '@0@.@1 service in'.format(photos_namespace, service),
+ output: '@0@.@1@.service'.format(photos_namespace, service),
+ configuration: tracker_domain_conf,
+ install: true,
+ install_dir: dbus_services_dir,
+ )
+ endforeach
+endif
install_data(
photos_namespace + '.search-provider.ini',
diff --git a/meson.build b/meson.build
index 868f5c7c..b65822b9 100644
--- a/meson.build
+++ b/meson.build
@@ -23,6 +23,7 @@ photos_installed_test_execdir = join_paths(photos_libexecdir, 'installed-tests',
photos_namespace = 'org.gnome.Photos'
photos_buildtype = get_option('buildtype')
+photos_flatpak_enabled = get_option('flatpak')
photos_installed_tests_enabled = get_option('installed_tests')
photos_manuals_enabled = get_option('manuals')
diff --git a/meson_options.txt b/meson_options.txt
index ea67113d..edfab991 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,3 +1,4 @@
option('dogtail', type: 'boolean', value: true, description: 'test using dogtail')
+option('flatpak', type: 'boolean', value: false, description: 'Enable building for Flatpaks')
option('installed_tests', type: 'boolean', value: false, description: 'Enable installation of some test
cases')
option('manuals', type: 'boolean', value: false, description: 'Enable manual pages')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]