summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeif Lotfy <seif@lotfy.com>2012-11-12 23:59:02 +0100
committerSeif Lotfy <seif@lotfy.com>2012-11-12 23:59:02 +0100
commit0d0b1726724242a4dc5020cf9fad1fc63b9bbda0 (patch)
treeba05e59b674a23165674cde1d739ec405a9e1fd3
parentebfdf53508b35259b37b5e001c8a078c60cc3eb9 (diff)
downloadzeitgeist-0d0b1726724242a4dc5020cf9fad1fc63b9bbda0.tar.gz
Add introspection example
-rw-r--r--configure.ac5
-rw-r--r--examples/python/find_events.py3
-rw-r--r--libzeitgeist/Makefile.am36
3 files changed, 44 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f69fa5c1..df5f23d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -186,6 +186,11 @@ AS_IF([test "x$enable_docs" != "xno"], [
AM_CONDITIONAL(ENABLE_DOCS, test "x$found_valadoc" = "xyes")
+
+AM_CONDITIONAL([HAVE_INTROSPECTION], [test "x$enable_vala" = "xyes"])
+# this will set HAVE_INTROSPECTION
+GOBJECT_INTROSPECTION_REQUIRE([1.30])
+
#################################################
# Ontology parsing dependencies
#################################################
diff --git a/examples/python/find_events.py b/examples/python/find_events.py
new file mode 100644
index 00000000..1cab2bcc
--- /dev/null
+++ b/examples/python/find_events.py
@@ -0,0 +1,3 @@
+from gi.repository import Zeitgeist
+log = Zeitgeist.Log.get_default()
+print log
diff --git a/libzeitgeist/Makefile.am b/libzeitgeist/Makefile.am
index b720425b..61bed4ef 100644
--- a/libzeitgeist/Makefile.am
+++ b/libzeitgeist/Makefile.am
@@ -72,6 +72,42 @@ DISTCLEANFILES = \
zeitgeist-2.0.vapi \
$(NULL)
+
+CLEANFILES =
+MAINTAINERCLEANFILES =
+
+
+-include $(INTROSPECTION_MAKEFILE)
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS =
+INTROSPECTION_COMPILER_ARGS = -l $(libfolks_dlname)
+
+if HAVE_INTROSPECTION
+introspection_sources = $(libzeitgeist_2_0_la_SOURCES)
+
+Zeitgeist-2.0.gir: libzeitgeist-2.0.la
+Zeitgeist_2_0_gir_INCLUDES = GObject-2.0
+Zeitgeist_2_0_gir_CFLAGS = $(INCLUDES)
+Zeitgeist_2_0_gir_LIBS = libzeitgeist-2.0.la
+Zeitgeist_2_0_gir_FILES = $(introspection_sources)
+GIRS = Zeitgeist-2.0.gir
+
+girdir = $(datadir)/gir-1.0
+dist_gir_DATA = $(GIRS)
+
+MAINTAINERCLEANFILES += $(dist_gir_DATA)
+
+typelibdir = $(libdir)/girepository-1.0
+nodist_typelib_DATA = $(GIRS:.gir=.typelib)
+
+CLEANFILES += $(nodist_typelib_DATA)
+endif
+
+MAINTAINERCLEANFILES += \
+ $(BUILT_SOURCES) \
+ $(NULL)
+
+
ontology_vala.stamp: ontology.vala.in ontology-uris.vala.in \
$(ONTOLOGY) $(top_srcdir)/data/ontology2code
$(AM_V_GEN)$(top_srcdir)/data/ontology2code --vala