[tracker/data-in-binary-dirs: 11/12] data: Merge all miner .desktop files into existing DBus .service files



commit 4b869976bf2a2a6bf3c5d9caa37d2f3c523747af
Author: Martyn Russell <martyn lanedo com>
Date:   Fri Sep 26 00:22:49 2014 +0100

    data: Merge all miner .desktop files into existing DBus .service files
    
    So .service files store just the 'Name' and 'Exec' information for the DBus name
    and binary to instantiate. Now we keep the 'Path', '_DisplayName' and
    'Comment' in here too. These all come from the data/miners/*.desktop files
    which no longer exist and are mainly used for tracker-control to know about
    miners that are not running and that exist or have been installed.
    
    The old '_Description' is now '_Comment'.
    The old '_Name' is now '_DisplayName'
    The old 'DBusPath' is now 'Path'.
    
    As usual all '_' prefixed keys are translated so tracker-control still shows
    translated miners in its output.

 Makefile.am                                        |    2 +-
 configure.ac                                       |    2 -
 data/.gitignore                                    |    2 -
 data/Makefile.am                                   |    1 -
 data/miners/.gitignore                             |    1 -
 data/miners/Makefile.am                            |   51 --------------------
 .../tracker-miner-applications.desktop.in.in       |    6 --
 data/miners/tracker-miner-evolution.desktop.in.in  |    5 --
 data/miners/tracker-miner-extract.desktop.in.in    |    6 --
 data/miners/tracker-miner-files.desktop.in.in      |    6 --
 data/miners/tracker-miner-rss.desktop.in.in        |    5 --
 data/miners/tracker-miner-userguides.desktop.in.in |    6 --
 po/POTFILES.in                                     |    1 +
 src/libtracker-control/tracker-miner-manager.c     |   14 +++---
 src/miners/apps/Makefile.am                        |   19 +++++--
 ...edesktop.Tracker1.Miner.Applications.service.in |    3 -
 ...sktop.Tracker1.Miner.Applications.service.in.in |    8 +++
 src/miners/fs/Makefile.am                          |   17 +++++--
 ...org.freedesktop.Tracker1.Miner.Files.service.in |    3 -
 ....freedesktop.Tracker1.Miner.Files.service.in.in |    8 +++
 src/miners/rss/Makefile.am                         |   19 +++++--
 .../org.freedesktop.Tracker1.Miner.RSS.service.in  |    3 -
 ...rg.freedesktop.Tracker1.Miner.RSS.service.in.in |    8 +++
 src/miners/user-guides/Makefile.am                 |   19 +++++--
 ...reedesktop.Tracker1.Miner.Userguides.service.in |    3 -
 ...desktop.Tracker1.Miner.Userguides.service.in.in |    8 +++
 src/plugins/evolution/Makefile.am                  |   28 ++++++++---
 ...rg.freedesktop.Tracker1.Miner.EMails.service.in |    2 -
 ...freedesktop.Tracker1.Miner.EMails.service.in.in |    7 +++
 src/tracker-extract/Makefile.am                    |   15 +++++-
 ...g.freedesktop.Tracker1.Miner.Extract.service.in |    3 -
 ...reedesktop.Tracker1.Miner.Extract.service.in.in |    8 +++
 32 files changed, 145 insertions(+), 144 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 1498e6b..5791a08 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-SUBDIRS = data src docs po utils examples
+SUBDIRS = src docs po utils examples
 
 if HAVE_UNIT_TESTS
 SUBDIRS += tests
diff --git a/configure.ac b/configure.ac
index 20c8dc3..4842875 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2556,8 +2556,6 @@ AM_CONDITIONAL(HAVE_ARTWORK, test "x$have_artwork" = "xyes")
 ##################################################################
 
 AC_CONFIG_FILES([
-       data/Makefile
-       data/miners/Makefile
        docs/Makefile
        docs/design/Makefile
        docs/manpages/Makefile
diff --git a/po/POTFILES.in b/po/POTFILES.in
index e48b84f..63fc71f 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -22,6 +22,7 @@ src/miners/apps/tracker-miner-apps.desktop.in.in
 src/miners/fs/tracker-main.c
 src/miners/fs/tracker-miner-files.c
 src/miners/fs/tracker-miner-fs.desktop.in.in
+src/miners/fs/org.freedesktop.Tracker1.Miner.Files.service.in
 src/miners/fs/org.freedesktop.Tracker.Miner.Files.gschema.xml.in
 src/miners/rss/tracker-main.c
 src/miners/rss/tracker-miner-rss.c
diff --git a/src/libtracker-control/tracker-miner-manager.c b/src/libtracker-control/tracker-miner-manager.c
index 0a7c4ea..cf05bb6 100644
--- a/src/libtracker-control/tracker-miner-manager.c
+++ b/src/libtracker-control/tracker-miner-manager.c
@@ -40,10 +40,10 @@
 
 #define TRACKER_MINER_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_TYPE_MINER_MANAGER, 
TrackerMinerManagerPrivate))
 
-#define DESKTOP_ENTRY_GROUP "Desktop Entry"
-#define DBUS_NAME_KEY "DBusName"
-#define DBUS_PATH_KEY "DBusPath"
-#define DISPLAY_NAME_KEY "Name"
+#define DESKTOP_ENTRY_GROUP "D-BUS Service"
+#define DBUS_NAME_KEY "Name"
+#define DBUS_PATH_KEY "Path"
+#define DISPLAY_NAME_KEY "DisplayName"
 #define DESCRIPTION_KEY "Comment"
 
 typedef struct TrackerMinerManagerPrivate TrackerMinerManagerPrivate;
@@ -759,9 +759,9 @@ check_file (GFile    *file,
 
        data = g_slice_new0 (MinerData);
        data->dbus_path = dbus_path;
-       data->dbus_name = dbus_name;
+       data->dbus_name = dbus_name;        /* In .service file as Name */
        data->display_name = display_name;
-       data->description = description;
+       data->description = description;    /* In .desktop file as _comment */
 
        priv->miners = g_list_prepend (priv->miners, data);
 
@@ -829,7 +829,7 @@ initialize_miners_data (TrackerMinerManager *manager)
        }
 
        file = g_file_new_for_path (miners_dir);
-       directory_foreach (file, ".desktop", (GFunc) check_file, manager);
+       directory_foreach (file, ".service", (GFunc) check_file, manager);
        g_object_unref (file);
 }
 
diff --git a/src/miners/apps/Makefile.am b/src/miners/apps/Makefile.am
index 74a3587..d31dd57 100644
--- a/src/miners/apps/Makefile.am
+++ b/src/miners/apps/Makefile.am
@@ -22,14 +22,22 @@ tracker_miner_apps_LDADD =                             \
        $(TRACKER_MINER_APPS_LIBS)
 
 # DBus interfaces (XML files) and services
-service_in_files = org.freedesktop.Tracker1.Miner.Applications.service.in
-
-%.service: %.service.in
+%.service.in: %.service.in.in
        @sed -e "s|@libexecdir[ ]|${libexecdir}|" $< > $@
 
 servicedir = $(DBUS_SERVICES_DIR)
 service_DATA = org.freedesktop.Tracker1.Miner.Applications.service
 
+INTLTOOL_SERVICE_RULE='%.service:   %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u'
+ INTLTOOL_SERVICE_RULE@
+
+install-data-hook:
+       cd $(DESTDIR)$(datadir)/tracker/miners && \
+               $(LN_S) -f $(servicedir)/$(service_DATA)
+uninstall-local:
+       cd $(DESTDIR)$(datadir)/tracker/miners && \
+               $(RM) $(DESTDIR)$(datadir)/tracker/miners/$(service_DATA)
+
 # Desktop files: First we fix the VERSION and libexecdir
 %.desktop.in: %.desktop.in.in
        @sed -e "s|@libexecdir[ ]|${libexecdir}|" \
@@ -44,8 +52,9 @@ autostart_DATA = tracker-miner-apps.desktop
 CLEANFILES = \
        $(autostart_DATA) \
        $(autostart_DATA:.desktop=.desktop.in) \
-       $(service_DATA)
+       $(service_DATA) \
+       $(service_DATA:.service=.service.in)
 
 EXTRA_DIST = \
        $(autostart_DATA:.desktop=.desktop.in.in) \
-       $(service_in_files)
+       $(service_DATA:.service=.service.in.in)
diff --git a/src/miners/apps/org.freedesktop.Tracker1.Miner.Applications.service.in.in 
b/src/miners/apps/org.freedesktop.Tracker1.Miner.Applications.service.in.in
new file mode 100644
index 0000000..100fb77
--- /dev/null
+++ b/src/miners/apps/org.freedesktop.Tracker1.Miner.Applications.service.in.in
@@ -0,0 +1,8 @@
+[D-BUS Service]
+Name=org.freedesktop.Tracker1.Miner.Applications
+Exec= libexecdir@/tracker-miner-apps
+
+# Miner details needed for tracker-control
+Path=/org/freedesktop/Tracker1/Miner/Applications
+_DisplayName=Applications
+_Comment=Applications data miner
diff --git a/src/miners/fs/Makefile.am b/src/miners/fs/Makefile.am
index 9dcfd08..fec5cdf 100644
--- a/src/miners/fs/Makefile.am
+++ b/src/miners/fs/Makefile.am
@@ -54,14 +54,22 @@ tracker_miner_fs_LDADD =                               \
 configdir = $(datadir)/tracker
 config_DATA = tracker-miner-files-index.xml
 
-service_in_files = org.freedesktop.Tracker1.Miner.Files.service.in
-
-%.service: %.service.in
+%.service.in: %.service.in.in
        @sed -e "s|@libexecdir[ ]|${libexecdir}|" $< > $@
 
 servicedir = $(DBUS_SERVICES_DIR)
 service_DATA = org.freedesktop.Tracker1.Miner.Files.service
 
+INTLTOOL_SERVICE_RULE='%.service:   %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u'
+ INTLTOOL_SERVICE_RULE@
+
+install-data-hook:
+       cd $(DESTDIR)$(datadir)/tracker/miners && \
+               $(LN_S) -f $(servicedir)/$(service_DATA)
+uninstall-local:
+       cd $(DESTDIR)$(datadir)/tracker/miners && \
+               $(RM) $(DESTDIR)$(datadir)/tracker/miners/$(service_DATA)
+
 # Desktop files: First we fix the VERSION and libexecdir
 if HAVE_LIBMEDIAART
 requires="libmediaart-1.0"
@@ -93,11 +101,12 @@ CLEANFILES = \
        $(autostart_DATA) \
        $(autostart_DATA:.desktop=.desktop.in) \
        $(service_DATA) \
+       $(service_DATA:.service=.service.in) \
        $(gsettings_SCHEMAS)
 
 EXTRA_DIST = \
        $(autostart_DATA:.desktop=.desktop.in.in) \
        $(config_DATA) \
-       $(service_in_files) \
+       $(service_DATA:.service=.service.in.in) \
        $(gsettings_SCHEMAS:.xml=.xml.in)
 
diff --git a/src/miners/fs/org.freedesktop.Tracker1.Miner.Files.service.in.in 
b/src/miners/fs/org.freedesktop.Tracker1.Miner.Files.service.in.in
new file mode 100644
index 0000000..1a285d9
--- /dev/null
+++ b/src/miners/fs/org.freedesktop.Tracker1.Miner.Files.service.in.in
@@ -0,0 +1,8 @@
+[D-BUS Service]
+Name=org.freedesktop.Tracker1.Miner.Files
+Exec= libexecdir@/tracker-miner-fs
+
+# Miner details needed for tracker-control
+Path=/org/freedesktop/Tracker1/Miner/Files
+_DisplayName=File System
+_Comment=File system data miner
diff --git a/src/miners/rss/Makefile.am b/src/miners/rss/Makefile.am
index a607c35..7c1dbc6 100644
--- a/src/miners/rss/Makefile.am
+++ b/src/miners/rss/Makefile.am
@@ -22,14 +22,22 @@ tracker_miner_rss_LDADD =                              \
        $(TRACKER_MINER_RSS_LIBS)
 
 # DBus interfaces (XML files) and services
-service_in_files = org.freedesktop.Tracker1.Miner.RSS.service.in
-
-%.service: %.service.in
+%.service.in: %.service.in.in
        @sed -e "s|@libexecdir[ ]|${libexecdir}|" $< > $@
 
 servicedir = $(DBUS_SERVICES_DIR)
 service_DATA = org.freedesktop.Tracker1.Miner.RSS.service
 
+INTLTOOL_SERVICE_RULE='%.service:   %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u'
+ INTLTOOL_SERVICE_RULE@
+
+install-data-hook:
+       cd $(DESTDIR)$(datadir)/tracker/miners && \
+               $(LN_S) -f $(servicedir)/$(service_DATA)
+uninstall-local:
+       cd $(DESTDIR)$(datadir)/tracker/miners && \
+               $(RM) $(DESTDIR)$(datadir)/tracker/miners/$(service_DATA)
+
 # Desktop files: First we fix the VERSION and libexecdir
 %.desktop.in: %.desktop.in.in
        @sed -e "s|@libexecdir[ ]|${libexecdir}|" \
@@ -44,8 +52,9 @@ autostart_DATA = tracker-miner-rss.desktop
 CLEANFILES = \
        $(autostart_DATA) \
        $(autostart_DATA:.desktop=.desktop.in) \
-       $(service_DATA)
+       $(service_DATA) \
+       $(service_DATA:.service=.service.in)
 
 EXTRA_DIST = \
        $(autostart_DATA:.desktop=.desktop.in.in) \
-       $(service_in_files)
+       $(service_DATA:.service=.service.in.in)
diff --git a/src/miners/rss/org.freedesktop.Tracker1.Miner.RSS.service.in.in 
b/src/miners/rss/org.freedesktop.Tracker1.Miner.RSS.service.in.in
new file mode 100644
index 0000000..860d2c6
--- /dev/null
+++ b/src/miners/rss/org.freedesktop.Tracker1.Miner.RSS.service.in.in
@@ -0,0 +1,8 @@
+[D-BUS Service]
+Name=org.freedesktop.Tracker1.Miner.RSS
+Exec= libexecdir@/tracker-miner-rss
+
+# Miner details needed for tracker-control
+Path=/org/freedesktop/Tracker1/Miner/RSS
+_DisplayName=RSS/ATOM Feeds
+_Comment=Fetch RSS/ATOM Feeds
diff --git a/src/miners/user-guides/Makefile.am b/src/miners/user-guides/Makefile.am
index 0492644..60112bc 100644
--- a/src/miners/user-guides/Makefile.am
+++ b/src/miners/user-guides/Makefile.am
@@ -22,14 +22,22 @@ tracker_miner_user_guides_LDADD =                      \
        $(TRACKER_MINER_USER_GUIDES_LIBS)
 
 # DBus interfaces (XML files) and services
-service_in_files = org.freedesktop.Tracker1.Miner.Userguides.service.in
-
-%.service: %.service.in
+%.service.in: %.service.in.in
        @sed -e "s|@libexecdir[ ]|${libexecdir}|" $< > $@
 
 servicedir = $(DBUS_SERVICES_DIR)
 service_DATA = org.freedesktop.Tracker1.Miner.Userguides.service
 
+INTLTOOL_SERVICE_RULE='%.service:   %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u'
+ INTLTOOL_SERVICE_RULE@
+
+install-data-hook:
+       cd $(DESTDIR)$(datadir)/tracker/miners && \
+               $(LN_S) -f $(servicedir)/$(service_DATA)
+uninstall-local:
+       cd $(DESTDIR)$(datadir)/tracker/miners && \
+               $(RM) $(DESTDIR)$(datadir)/tracker/miners/$(service_DATA)
+
 # Desktop files: First we fix the VERSION and libexecdir
 %.desktop.in: %.desktop.in.in
        @sed -e "s|@libexecdir[ ]|${libexecdir}|" \
@@ -44,8 +52,9 @@ autostart_DATA = tracker-miner-user-guides.desktop
 CLEANFILES = \
        $(autostart_DATA) \
        $(autostart_DATA:.desktop=.desktop.in) \
-       $(service_DATA)
+       $(service_DATA) \
+       $(service_DATA:.service=.service.in)
 
 EXTRA_DIST = \
        $(autostart_DATA:.desktop=.desktop.in.in) \
-       $(service_in_files)
+       $(service_DATA:.service=.service.in.in)
diff --git a/src/miners/user-guides/org.freedesktop.Tracker1.Miner.Userguides.service.in.in 
b/src/miners/user-guides/org.freedesktop.Tracker1.Miner.Userguides.service.in.in
new file mode 100644
index 0000000..2f48570
--- /dev/null
+++ b/src/miners/user-guides/org.freedesktop.Tracker1.Miner.Userguides.service.in.in
@@ -0,0 +1,8 @@
+[D-BUS Service]
+Name=org.freedesktop.Tracker1.Miner.Userguides
+Exec= libexecdir@/tracker-miner-user-guides
+
+# Miner details needed for tracker-control
+Path=/org/freedesktop/Tracker1/Miner/Userguides
+_DisplayName=Userguides
+_Comment=Userguide data miner
diff --git a/src/plugins/evolution/Makefile.am b/src/plugins/evolution/Makefile.am
index f818ea2..6b5d8ff 100644
--- a/src/plugins/evolution/Makefile.am
+++ b/src/plugins/evolution/Makefile.am
@@ -44,15 +44,29 @@ CLEANFILES = \
 EXTRA_DIST = org-freedesktop-Tracker-evolution-plugin.eplug.xml
 
 # DBus interfaces (XML files) and services
-service_in_files = org.freedesktop.Tracker1.Miner.EMails.service.in
-
-%.service: %.service.in
+%.service.in: %.service.in.in
        @sed -e "s|@libexecdir[ ]|${libexecdir}|" $< > $@
 
 servicedir = $(DBUS_SERVICES_DIR)
 service_DATA = org.freedesktop.Tracker1.Miner.EMails.service
 
- INTLTOOL_DESKTOP_RULE@
-
-CLEANFILES += $(autostart_DATA) $(desktop_in_files) $(service_DATA)
-EXTRA_DIST += $(desktop_in_in_files) $(service_in_files)
+INTLTOOL_SERVICE_RULE='%.service:   %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u'
+ INTLTOOL_SERVICE_RULE@
+
+install-data-hook:
+       cd $(DESTDIR)$(datadir)/tracker/miners && \
+               $(LN_S) -f $(servicedir)/$(service_DATA)
+uninstall-local:
+       cd $(DESTDIR)$(datadir)/tracker/miners && \
+               $(RM) $(DESTDIR)$(datadir)/tracker/miners/$(service_DATA)
+
+# Dist / Clean rules for all data
+CLEANFILES += \
+       $(autostart_DATA) \
+       $(desktop_in_files) \
+       $(service_DATA) \
+       $(service_DATA:.service=.service.in)
+
+EXTRA_DIST += \
+       $(desktop_in_in_files) \
+       $(service_DATA:.service=.service.in.in)
diff --git a/src/plugins/evolution/org.freedesktop.Tracker1.Miner.EMails.service.in.in 
b/src/plugins/evolution/org.freedesktop.Tracker1.Miner.EMails.service.in.in
new file mode 100644
index 0000000..e9b233e
--- /dev/null
+++ b/src/plugins/evolution/org.freedesktop.Tracker1.Miner.EMails.service.in.in
@@ -0,0 +1,7 @@
+[D-BUS Service]
+Name=org.freedesktop.Tracker1.Miner.Emails
+
+# Miner details needed for tracker-control
+Path=/org/freedesktop/Tracker1/Miner/Emails
+_DisplayName=Emails
+_Comment=Evolution Email miner
diff --git a/src/tracker-extract/Makefile.am b/src/tracker-extract/Makefile.am
index 88ab25c..b8ceaa8 100644
--- a/src/tracker-extract/Makefile.am
+++ b/src/tracker-extract/Makefile.am
@@ -595,12 +595,22 @@ config_DATA = \
        tracker-extract.xml \
        tracker-extract-priority.xml
 
-%.service: %.service.in
+%.service.in: %.service.in.in
        @sed -e "s|@libexecdir[ ]|${libexecdir}|" $< > $@
 
 servicedir = $(DBUS_SERVICES_DIR)
 service_DATA = org.freedesktop.Tracker1.Miner.Extract.service
 
+INTLTOOL_SERVICE_RULE='%.service:   %.service.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; 
$(INTLTOOL_MERGE) $(top_srcdir)/po $< [$]@ -d -u'
+ INTLTOOL_SERVICE_RULE@
+
+install-data-hook:
+       cd $(DESTDIR)$(datadir)/tracker/miners && \
+               $(LN_S) -f $(servicedir)/$(service_DATA)
+uninstall-local:
+       cd $(DESTDIR)$(datadir)/tracker/miners && \
+               $(RM) $(DESTDIR)$(datadir)/tracker/miners/$(service_DATA)
+
 # Desktop files: First we fix the VERSION and libexecdir
 %.desktop.in: %.desktop.in.in
        @sed -e "s|@libexecdir[ ]|${libexecdir}|" \
@@ -626,10 +636,11 @@ CLEANFILES += \
        $(autostart_DATA) \
        $(autostart_DATA:.desktop=.desktop.in) \
        $(service_DATA) \
+       $(service_DATA:.service=.service.in) \
        $(gsettings_SCHEMAS)
 
 EXTRA_DIST += \
        $(autostart_DATA:.desktop=.desktop.in.in) \
-       $(service_DATA:.service=.service.in) \
        $(config_DATA) \
+       $(service_DATA:.service=.service.in.in) \
        $(gsettings_SCHEMAS:.xml=.xml.in)
diff --git a/src/tracker-extract/org.freedesktop.Tracker1.Miner.Extract.service.in.in 
b/src/tracker-extract/org.freedesktop.Tracker1.Miner.Extract.service.in.in
new file mode 100644
index 0000000..5c4ad14
--- /dev/null
+++ b/src/tracker-extract/org.freedesktop.Tracker1.Miner.Extract.service.in.in
@@ -0,0 +1,8 @@
+[D-BUS Service]
+Name=org.freedesktop.Tracker1.Miner.Extract
+Exec= libexecdir@/tracker-extract
+
+# Miner details needed for tracker-control
+Path=/org/freedesktop/Tracker1/Miner/Extract
+_DisplayName=Extractor
+_Comment=Metadata extractor


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]