summaryrefslogtreecommitdiffstats
path: root/data/tracker
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--data/tracker/meson.build31
-rw-r--r--data/tracker/org.gnome.Nautilus.Tracker3.Miner.Extract.service.in7
-rw-r--r--data/tracker/org.gnome.Nautilus.Tracker3.Miner.Files.service.in7
-rw-r--r--data/tracker/org.gnome.Nautilus.domain.rule.in21
4 files changed, 66 insertions, 0 deletions
diff --git a/data/tracker/meson.build b/data/tracker/meson.build
new file mode 100644
index 0000000..5320af1
--- /dev/null
+++ b/data/tracker/meson.build
@@ -0,0 +1,31 @@
+# Files needed for running Tracker inside the Flatpak sandbox, for systems
+# which don't have a suitable version of Tracker in the host OS.
+#
+# We must export the .service files from the sandbox so they work on the
+# session bus. This means the Tracker domain name must correspond with the
+# application ID.
+
+domain_ontologies_dir = get_option('datadir') / 'tracker3' / 'domain-ontologies'
+dbus_services_dir = get_option('datadir') / 'dbus-1' / 'services'
+
+tracker_domain_config = configuration_data()
+tracker_domain_config.set('application_id', application_id)
+tracker_domain_config.set('domain_rule', get_option('prefix') / domain_ontologies_dir / application_id + '.domain.rule')
+
+configure_file(
+ input: 'org.gnome.Nautilus.domain.rule.in',
+ output: application_id + '.domain.rule',
+ configuration: tracker_domain_config,
+ install_dir: domain_ontologies_dir)
+
+configure_file(
+ input: 'org.gnome.Nautilus.Tracker3.Miner.Extract.service.in',
+ output: application_id + '.Tracker3.Miner.Extract.service',
+ configuration: tracker_domain_config,
+ install_dir: dbus_services_dir)
+
+configure_file(
+ input: 'org.gnome.Nautilus.Tracker3.Miner.Files.service.in',
+ output: application_id + '.Tracker3.Miner.Files.service',
+ configuration: tracker_domain_config,
+ install_dir: dbus_services_dir)
diff --git a/data/tracker/org.gnome.Nautilus.Tracker3.Miner.Extract.service.in b/data/tracker/org.gnome.Nautilus.Tracker3.Miner.Extract.service.in
new file mode 100644
index 0000000..eb7a87a
--- /dev/null
+++ b/data/tracker/org.gnome.Nautilus.Tracker3.Miner.Extract.service.in
@@ -0,0 +1,7 @@
+[D-BUS Service]
+Name=@application_id@.Tracker3.Miner.Extract
+Exec=/app/libexec/tracker-extract-3 --domain-ontology @domain_rule@
+
+# Miner details needed for tracker-control
+Path=/org/freedesktop/Tracker3/Miner/Extract
+NameSuffix=Miner.Files
diff --git a/data/tracker/org.gnome.Nautilus.Tracker3.Miner.Files.service.in b/data/tracker/org.gnome.Nautilus.Tracker3.Miner.Files.service.in
new file mode 100644
index 0000000..4fa7371
--- /dev/null
+++ b/data/tracker/org.gnome.Nautilus.Tracker3.Miner.Files.service.in
@@ -0,0 +1,7 @@
+[D-BUS Service]
+Name=@application_id@.Tracker3.Miner.Files
+Exec=/app/libexec/tracker-miner-fs-3 --domain-ontology @domain_rule@ --initial-sleep 0
+
+# Miner details needed for tracker-control
+Path=/org/freedesktop/Tracker3/Miner/Files
+NameSuffix=Miner.Files
diff --git a/data/tracker/org.gnome.Nautilus.domain.rule.in b/data/tracker/org.gnome.Nautilus.domain.rule.in
new file mode 100644
index 0000000..ec0808e
--- /dev/null
+++ b/data/tracker/org.gnome.Nautilus.domain.rule.in
@@ -0,0 +1,21 @@
+# This defines a private Tracker domain for Nautilus.
+#
+# It's used to run the Tracker indexer inside a Flatpak sandbox, when Nautilus
+# is running on a host that doesn't have a suitable version of Tracker
+# installed.
+
+[DomainOntology]
+# Location for the Tracker database
+CacheLocation=$XDG_CACHE_HOME/nautilus/miner/files
+
+# Name of the ontology to use, must be one located in
+# $(sharedir)/tracker/ontologies
+OntologyName=nepomuk
+
+# DBus name for the owner (not optional). Tracker will use
+# the domain as the prefix of the DBus name for all the
+# services related to this domain ontology.
+Domain=@application_id@
+
+# List of miners we expect to run in this domain.
+Miners=Miner.Files;Miner.Extract