[tracker/direct-access: 83/158] libtracker-sparql: Use dedicated module directory
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/direct-access: 83/158] libtracker-sparql: Use dedicated module directory
- Date: Thu, 5 Aug 2010 16:34:33 +0000 (UTC)
commit 5fee9b9fade44b9e7c5d0c80d391cfeed141ca8e
Author: Jürg Billeter <j bitron ch>
Date: Tue Jul 20 18:11:58 2010 +0200
libtracker-sparql: Use dedicated module directory
src/libtracker-bus/Makefile.am | 24 +++++++--------------
src/libtracker-direct/Makefile.am | 24 +++++++--------------
src/libtracker-sparql/Makefile.am | 5 ++++
src/libtracker-sparql/config.vapi | 23 +++++++++++++++++++++
src/libtracker-sparql/tracker-plugin-loader.vala | 7 ++---
tests/functional-tests/Makefile.am | 4 +-
6 files changed, 49 insertions(+), 38 deletions(-)
---
diff --git a/src/libtracker-bus/Makefile.am b/src/libtracker-bus/Makefile.am
index cd345dc..4117377 100644
--- a/src/libtracker-bus/Makefile.am
+++ b/src/libtracker-bus/Makefile.am
@@ -1,5 +1,7 @@
include $(top_srcdir)/Makefile.decl
+modulesdir = $(libdir)/tracker-$(TRACKER_API_VERSION)/sparql-modules
+
INCLUDES = \
-DG_LOG_DOMAIN=\"Tracker\" \
-DTRACKER_COMPILATION \
@@ -11,26 +13,21 @@ INCLUDES = \
$(GLIB2_CFLAGS) \
$(GCOV_CFLAGS)
-lib_LTLIBRARIES = libtracker-bus- TRACKER_API_VERSION@.la
-
-libtracker_busincludedir = $(includedir)/tracker-$(TRACKER_API_VERSION)/libtracker-bus
+modules_LTLIBRARIES = libtracker-bus.la
libtracker_bus_la_VALASOURCES = \
tracker-bus.vala \
tracker-array-cursor.vala
-libtracker_bus_ TRACKER_API_VERSION@_la_SOURCES = \
+libtracker_bus_la_SOURCES = \
libtracker-bus.vala.stamp \
$(libtracker_bus_la_VALASOURCES:.vala=.c) \
tracker-bus-fd-cursor.c
-libtracker_bus_ TRACKER_API_VERSION@_la_LDFLAGS = \
- -shared -fPIC -module -avoid-version
-
-# -export-symbols-regex '^tracker_.*'
+libtracker_bus_la_LDFLAGS = \
+ -module -avoid-version -no-undefined
-libtracker_businclude_HEADERS = \
- $(top_srcdir)/src/libtracker-sparql/tracker-sparql-$(TRACKER_API_VERSION).vapi \
+noinst_HEADERS = \
tracker-bus.h
# Vala sources
@@ -38,16 +35,11 @@ vapi_sources = \
$(top_srcdir)/src/libtracker-sparql/tracker-sparql-$(TRACKER_API_VERSION).vapi \
$(top_srcdir)/src/libtracker-common/libtracker-common.vapi
-# Vala bindings
-vapidir = $(datadir)/vala/vapi
-vapi_DATA = \
- tracker-bus-$(TRACKER_API_VERSION).vapi
-
libtracker-bus.vala.stamp: $(libtracker_bus_la_VALASOURCES) $(vapi_sources)
$(AM_V_GEN)$(VALAC) $(GCOV_VALAFLAGS) -C $(VALAFLAGS) --pkg gio-2.0 --pkg dbus-glib-1 -H tracker-bus.h --vapi tracker-bus-$(TRACKER_API_VERSION).vapi $^
$(AM_V_GEN)touch $@
-libtracker_bus_ TRACKER_API_VERSION@_la_LIBADD = \
+libtracker_bus_la_LIBADD = \
$(top_builddir)/src/libtracker-common/libtracker-common.la \
$(GLIB2_LIBS) \
$(DBUS_LIBS)
diff --git a/src/libtracker-direct/Makefile.am b/src/libtracker-direct/Makefile.am
index edf1c04..07adece 100644
--- a/src/libtracker-direct/Makefile.am
+++ b/src/libtracker-direct/Makefile.am
@@ -1,5 +1,7 @@
include $(top_srcdir)/Makefile.decl
+modulesdir = $(libdir)/tracker-$(TRACKER_API_VERSION)/sparql-modules
+
INCLUDES = \
-DG_LOG_DOMAIN=\"Tracker\" \
-DTRACKER_COMPILATION \
@@ -11,24 +13,19 @@ INCLUDES = \
$(GLIB2_CFLAGS) \
$(GCOV_CFLAGS)
-lib_LTLIBRARIES = libtracker-direct- TRACKER_API_VERSION@.la
-
-libtracker_directincludedir = $(includedir)/tracker-$(TRACKER_API_VERSION)/libtracker-direct
+modules_LTLIBRARIES = libtracker-direct.la
libtracker_direct_la_VALASOURCES = \
tracker-direct.vala
-libtracker_direct_ TRACKER_API_VERSION@_la_SOURCES = \
+libtracker_direct_la_SOURCES = \
libtracker-direct.vala.stamp \
$(libtracker_direct_la_VALASOURCES:.vala=.c)
-libtracker_direct_ TRACKER_API_VERSION@_la_LDFLAGS = \
- -shared -fPIC -module -avoid-version
-
-# -export-symbols-regex '^tracker_.*'
+libtracker_direct_la_LDFLAGS = \
+ -module -avoid-version -no-undefined
-libtracker_directinclude_HEADERS = \
- $(top_srcdir)/src/libtracker-sparql/tracker-sparql-$(TRACKER_API_VERSION).vapi \
+noinst_HEADERS = \
tracker-direct.h
# Vala sources
@@ -38,16 +35,11 @@ vapi_sources = \
$(top_srcdir)/src/libtracker-data/libtracker-data.vapi \
$(top_srcdir)/src/libtracker-data/tracker-sparql-query.vapi
-# Vala bindings
-vapidir = $(datadir)/vala/vapi
-vapi_DATA = \
- tracker-direct-$(TRACKER_API_VERSION).vapi
-
libtracker-direct.vala.stamp: $(libtracker_direct_la_VALASOURCES) $(vapi_sources)
$(AM_V_GEN)$(VALAC) $(GCOV_VALAFLAGS) -C $(VALAFLAGS) --pkg gio-2.0 -H tracker-direct.h --vapi tracker-direct-$(TRACKER_API_VERSION).vapi $^
$(AM_V_GEN)touch $@
-libtracker_direct_ TRACKER_API_VERSION@_la_LIBADD = \
+libtracker_direct_la_LIBADD = \
$(top_builddir)/src/libtracker-data/libtracker-data.la \
$(GLIB2_LIBS)
diff --git a/src/libtracker-sparql/Makefile.am b/src/libtracker-sparql/Makefile.am
index 534b0fa..64c4793 100644
--- a/src/libtracker-sparql/Makefile.am
+++ b/src/libtracker-sparql/Makefile.am
@@ -1,8 +1,11 @@
include $(top_srcdir)/Makefile.decl
+modulesdir = $(libdir)/tracker-$(TRACKER_API_VERSION)/sparql-modules
+
INCLUDES = \
-DG_LOG_DOMAIN=\"Tracker\" \
-DTRACKER_COMPILATION \
+ -DSPARQL_MODULES_DIR=\""$(modulesdir)"\" \
-I$(top_srcdir)/src \
-I$(top_builddir)/src \
$(WARN_CFLAGS) \
@@ -40,6 +43,7 @@ vapi_DATA = \
# Vala sources
vapi_sources = \
+ config.vapi \
$(top_srcdir)/src/vapi/posix.vapi \
$(top_srcdir)/src/vapi/glib-2.0-fixes.vapi
@@ -62,5 +66,6 @@ MAINTAINERCLEANFILES = \
tracker-sparql.h
EXTRA_DIST = \
+ config.vapi \
$(libtracker_sparql_la_VALASOURCES) \
libtracker-sparql.vala.stamp
diff --git a/src/libtracker-sparql/config.vapi b/src/libtracker-sparql/config.vapi
new file mode 100644
index 0000000..2e593e7
--- /dev/null
+++ b/src/libtracker-sparql/config.vapi
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2010, Nokia <ivan frade nokia com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+[CCode (cprefix = "", lower_case_cprefix = "")]
+namespace Config {
+ public const string SPARQL_MODULES_DIR;
+}
diff --git a/src/libtracker-sparql/tracker-plugin-loader.vala b/src/libtracker-sparql/tracker-plugin-loader.vala
index 2935ca4..703b8f2 100644
--- a/src/libtracker-sparql/tracker-plugin-loader.vala
+++ b/src/libtracker-sparql/tracker-plugin-loader.vala
@@ -91,8 +91,7 @@ class Tracker.Sparql.PluginLoader : Connection {
if (env_path != null && env_path.length > 0) {
path = env_path;
} else {
- // FIXME: Get from config
- path = "/tmp";
+ path = Config.SPARQL_MODULES_DIR;
}
File dir = File.new_for_path (path);
@@ -101,12 +100,12 @@ class Tracker.Sparql.PluginLoader : Connection {
debug ("Searching for modules in folder '%s' ..", dir_path);
// First get direct library details
- string direct_path = Module.build_path (dir_path, "tracker-direct-0.9");
+ string direct_path = Module.build_path (dir_path, "tracker-direct");
direct = load_plugins_from_path (direct_path, direct_only /* required */);
if (!direct_only) {
// Second get bus library details
- string bus_path = Module.build_path (dir_path, "tracker-bus-0.9");
+ string bus_path = Module.build_path (dir_path, "tracker-bus");
bus = load_plugins_from_path (bus_path, true /* required */);
}
diff --git a/tests/functional-tests/Makefile.am b/tests/functional-tests/Makefile.am
index ca76516..abacd7f 100644
--- a/tests/functional-tests/Makefile.am
+++ b/tests/functional-tests/Makefile.am
@@ -88,7 +88,7 @@ direct-test.vala.stamp: $(direct_test_VALASOURCES) $(direct_vapi_sources)
$(AM_V_GEN)touch $@
direct_test_LDADD = \
- $(top_builddir)/src/libtracker-direct/libtracker-direct-$(TRACKER_API_VERSION).la \
+ $(top_builddir)/src/libtracker-direct/libtracker-direct.la \
$(top_builddir)/src/libtracker-sparql/libtracker-sparql-$(TRACKER_API_VERSION).la \
$(GIO_LIBS) \
$(GLIB2_LIBS)
@@ -102,7 +102,7 @@ bus-test.vala.stamp: $(bus_test_VALASOURCES) $(bus_vapi_sources)
$(AM_V_GEN)touch $@
bus_test_LDADD = \
- $(top_builddir)/src/libtracker-bus/libtracker-bus-$(TRACKER_API_VERSION).la \
+ $(top_builddir)/src/libtracker-bus/libtracker-bus.la \
$(top_builddir)/src/libtracker-sparql/libtracker-sparql-$(TRACKER_API_VERSION).la \
$(top_builddir)/src/libtracker-common/libtracker-common.la \
$(GIO_LIBS) \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]