[tracker] tracker-miner-fs: Make building this optional



commit 7ddf90573a8347cbe94e526bb8c6d70a7aa3b7a8
Author: Martyn Russell <martyn lanedo com>
Date:   Thu Aug 23 21:21:47 2012 +0100

    tracker-miner-fs: Make building this optional
    
    Now you can use --disable-miner-fs (default=enabled)
    
    NOTE: the miner-fs also includes application and user guide mining built in.
    
    Fixes GB#628857

 configure.ac              |   36 +++++++++++++++++++++++++++++++++++-
 data/Makefile.am          |    7 +++++--
 data/dbus/Makefile.am     |   14 ++++++++------
 data/gschemas/Makefile.am |   18 ++++++++++++++----
 data/miners/Makefile.am   |    7 ++++++-
 src/miners/Makefile.am    |    6 +++++-
 6 files changed, 73 insertions(+), 15 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 41dc18d..6043cb8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1105,6 +1105,31 @@ fi
 AM_CONDITIONAL(HAVE_MEEGOTOUCH, test "x$have_meegotouch" = "xyes")
 
 ##################################################################
+# Check for tracker-miner-fs
+##################################################################
+
+have_tracker_miner_fs="yes"
+
+AC_ARG_ENABLE(miner_fs,
+              AS_HELP_STRING([--enable-miner-fs],
+                             [enable File System miner [[default=yes]]]),,
+                             [enable_tracker_miner_fs=yes])
+
+enable_tracker_miner_fs=$enable_miner_fs
+
+if test "x$enable_tracker_miner_fs" = "xyes"; then
+   if test "x$have_tracker_miner_fs" != "xyes"; then
+      AC_MSG_ERROR([Couldn't find tracker-miner-fs dependencies ($TRACKER_MINER_FS_REQUIRED).])
+   fi
+else
+   if test "x$enable_tracker_miner_fs" = "xno"; then
+      have_tracker_miner_fs="no  (disabled)"
+   fi
+fi
+
+AM_CONDITIONAL(HAVE_TRACKER_MINER_FS, test "x$have_tracker_miner_fs" = "xyes")
+
+##################################################################
 # Check for tracker-miner-flickr
 ##################################################################
 
@@ -1403,6 +1428,12 @@ AC_ARG_ENABLE([tracker-preferences],
                              [enable the tracker preferences dialog [[default=auto]]]),,
               [enable_tracker_preferences=auto])
 
+# If we don't have miner-fs enabled, the preferences are pointless
+# So we override in this case.
+if test "x$enable_tracker_miner_fs" = "xyes" ; then
+   enable_tracker_miner_fs = "no"
+fi
+
 if test "x$enable_tracker_preferences" = "xyes" ; then
    if test "x$have_tracker_preferences" != "xyes"; then
       AC_MSG_ERROR([Couldn't find tracker-preferences dependencies ($TRACKER_PREFERENCES_REQUIRED).])
@@ -2388,7 +2419,10 @@ Metadata Extractors:
 
 Data Miners:
 
-	Applications:                           yes (MeeGo support: $have_meegotouch)
+	FS:                                     $have_tracker_miner_fs (MeeGo support: $have_meegotouch)
+	  Includes File Systems
+	  Includes Applications
+	  Includes User Guides
 	RSS:                                    $have_tracker_miner_rss
 	Evolution:                              $have_tracker_miner_evolution ($tracker_miner_evolution_install_dir)
         Thunderbird:                            $have_tracker_miner_thunderbird ($tracker_miner_thunderbird_install_dir)
diff --git a/data/Makefile.am b/data/Makefile.am
index 69c1092..26b4b16 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -35,8 +35,11 @@ desktop_in_files =                                     \
 # Third we choose what we want installed based on config
 autostartdir = $(sysconfdir)/xdg/autostart
 autostart_DATA =                                       \
-	tracker-store.desktop                          \
-	tracker-miner-fs.desktop
+	tracker-store.desktop
+
+if HAVE_TRACKER_MINER_FS
+autostart_DATA += tracker-miner-fs.desktop
+endif
 
 if HAVE_TRACKER_MINER_RSS
 autostart_DATA += tracker-miner-rss.desktop
diff --git a/data/dbus/Makefile.am b/data/dbus/Makefile.am
index d43d5da..eb1c8c6 100644
--- a/data/dbus/Makefile.am
+++ b/data/dbus/Makefile.am
@@ -21,15 +21,12 @@ service_in_files = \
 	org.freedesktop.Tracker1.Miner.Applications.service.in \
 	org.freedesktop.Tracker1.Miner.EMails.service.in \
 	org.freedesktop.Tracker1.Miner.Files.service.in \
+	org.freedesktop.Tracker1.Miner.Userguides.service.in \
 	org.freedesktop.Tracker1.Miner.Flickr.service.in \
 	org.freedesktop.Tracker1.Miner.RSS.service.in  \
 	org.freedesktop.Tracker1.Extract.service.in \
 	org.freedesktop.Tracker1.Writeback.service.in
 
-if HAVE_MAEMO
-service_in_files += org.freedesktop.Tracker1.Miner.Userguides.service.in
-endif
-
 %.service: %.service.in
 	@sed -e "s|@libexecdir[ ]|${libexecdir}|" $< > $@
 
@@ -37,14 +34,19 @@ endif
 servicedir = $(DBUS_SERVICES_DIR)
 service_DATA = \
 	org.freedesktop.Tracker1.service \
-	org.freedesktop.Tracker1.Miner.Applications.service \
-	org.freedesktop.Tracker1.Miner.Files.service   \
 	org.freedesktop.Tracker1.Extract.service \
 	org.freedesktop.Tracker1.Writeback.service
 
+if HAVE_TRACKER_MINER_FS
+service_DATA += \
+	org.freedesktop.Tracker1.Miner.Files.service \
+	org.freedesktop.Tracker1.Miner.Applications.service
+
 if HAVE_MAEMO
+# Userguides are done in the miner-fs process
 service_DATA += org.freedesktop.Tracker1.Miner.Userguides.service
 endif
+endif
 
 if HAVE_TRACKER_MINER_EVOLUTION
 service_DATA += org.freedesktop.Tracker1.Miner.EMails.service
diff --git a/data/gschemas/Makefile.am b/data/gschemas/Makefile.am
index 16f90a5..e282ee4 100644
--- a/data/gschemas/Makefile.am
+++ b/data/gschemas/Makefile.am
@@ -2,14 +2,24 @@ include $(top_srcdir)/Makefile.decl
 
 gsettings_ENUM_NAMESPACE = org.freedesktop.Tracker
 gsettings_ENUM_FILES = $(top_srcdir)/src/libtracker-common/tracker-enums.h
-gsettings_SCHEMAS = \
+
+base_schemas = \
 	org.freedesktop.Tracker.gschema.xml \
 	org.freedesktop.Tracker.DB.gschema.xml \
 	org.freedesktop.Tracker.FTS.gschema.xml \
 	org.freedesktop.Tracker.Store.gschema.xml \
 	org.freedesktop.Tracker.Extract.gschema.xml \
-	org.freedesktop.Tracker.Writeback.gschema.xml \
-	org.freedesktop.Tracker.Miner.Files.gschema.xml
+	org.freedesktop.Tracker.Writeback.gschema.xml
+
+miner_fs_schema = org.freedesktop.Tracker.Miner.Files.gschema.xml
+
+all_schemas = $(base_schemas) $(miner_fs_schema)
+
+gsettings_SCHEMAS = $(base_schemas)
+
+if HAVE_TRACKER_MINER_FS
+gsettings_SCHEMAS += $(miner_fs_schema)
+endif
 
 @INTLTOOL_XML_NOMERGE_RULE@
 
@@ -18,4 +28,4 @@ gsettings_SCHEMAS = \
 CLEANFILES = $(gsettings_SCHEMAS)
 
 EXTRA_DIST = \
-	$(gsettings_SCHEMAS:.xml=.xml.in)
+	$(all_schemas:.xml=.xml.in)
diff --git a/data/miners/Makefile.am b/data/miners/Makefile.am
index 0bfbb6c..a0abed6 100644
--- a/data/miners/Makefile.am
+++ b/data/miners/Makefile.am
@@ -18,13 +18,18 @@ desktop_in_files =                                     \
 
 tracker_minersdir = $(datadir)/tracker/miners
 
-tracker_miners_DATA =                                  \
+tracker_miners_DATA =
+
+if HAVE_TRACKER_MINER_FS
+tracker_miners_DATA +=                                 \
 	tracker-miner-applications.desktop             \
 	tracker-miner-files.desktop
 
 if HAVE_MAEMO
+# Userguides are done in the miner-fs process
 tracker_miners_DATA += tracker-miner-userguides.desktop
 endif
+endif
 
 if HAVE_TRACKER_MINER_EVOLUTION
 tracker_miners_DATA += tracker-miner-evolution.desktop
diff --git a/src/miners/Makefile.am b/src/miners/Makefile.am
index 0cf41ea..dd1afb0 100644
--- a/src/miners/Makefile.am
+++ b/src/miners/Makefile.am
@@ -1,6 +1,10 @@
 include $(top_srcdir)/Makefile.decl
 
-SUBDIRS = fs
+SUBDIRS =
+
+if HAVE_TRACKER_MINER_FS
+SUBDIRS += fs
+endif
 
 if HAVE_TRACKER_MINER_RSS
 SUBDIRS += rss



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