[tracker/thunderbird] thunderbird: Add initial build system around extension
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/thunderbird] thunderbird: Add initial build system around extension
- Date: Wed, 27 Jul 2011 16:08:20 +0000 (UTC)
commit 17e7f1a4a3a81d4170895c4edb43b98bff75b67f
Author: Martyn Russell <martyn lanedo com>
Date: Wed Jul 27 17:07:41 2011 +0100
thunderbird: Add initial build system around extension
configure.ac | 63 ++++++++++++++++++++
src/plugins/Makefile.am | 4 +
src/plugins/thunderbird/Makefile.am | 35 +++++++++++
.../thunderbird/{install.rdf => install.rdf.in} | 2 +-
4 files changed, 103 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ec10dd5..a0c5b04 100644
--- a/configure.ac
+++ b/configure.ac
@@ -393,6 +393,21 @@ else
fi
+# Check requirements for tracker-miner-thunderbird
+TRACKER_MINER_THUNDERBIRD_REQUIRED=5.0
+have_tracker_miner_thunderbird="no "
+
+AC_PATH_PROG(THUNDERBIRD, thunderbird, thunderbird)
+if test -n $THUNDERBIRD; then
+ thunderbird_version=`$THUNDERBIRD --version | cut -d" " -f3`
+
+ # This is a crappy way to do it, we should improve this.
+ if test "$thunderbird_version" = "$TRACKER_MINER_THUNDERBIRD_REQUIRED" ; then
+ AC_SUBST(THUNDERBIRD)
+ have_tracker_miner_thunderbird=yes
+ fi
+fi
+
# Check requirements for tracker-miner-rss
TRACKER_MINER_RSS_REQUIRED="glib-2.0 >= $GLIB_REQUIRED
libgrss-0 >= $LIBGRSS_REQUIRED"
@@ -1179,6 +1194,51 @@ AC_SUBST(TRACKER_MINER_EVOLUTION_INSTALL_DIR)
AM_CONDITIONAL(HAVE_TRACKER_MINER_EVOLUTION, test "x$have_tracker_miner_evolution" = "xyes")
####################################################################
+# Check for tracker-miner-thunderbird
+####################################################################
+
+tracker_miner_thunderbird_install_dir="/dev/null"
+
+AC_ARG_ENABLE([miner_thunderbird],
+ AS_HELP_STRING([--enable-miner-thunderbird],
+ [enable Thunderbird email data miner [[default=auto]]]),,
+ [enable_miner_thunderbird=auto])
+
+enable_tracker_miner_thunderbird=$enable_miner_thunderbird
+
+if test "x$enable_tracker_miner_thunderbird" = "xyes"; then
+ if test "x$have_tracker_miner_thunderbird" != "xyes"; then
+ AC_MSG_ERROR([Couldn't find Thunderbird ($TRACKER_MINER_THUNDERBIRD_REQUIRED).])
+ fi
+else
+ if test "x$enable_tracker_miner_thunderbird" = "xno"; then
+ have_tracker_miner_thunderbird="no (disabled)"
+ fi
+fi
+
+if test "x$have_tracker_miner_thunderbird" = "xyes"; then
+
+ AC_ARG_WITH([thunderbird_plugin_dir],
+ AS_HELP_STRING([--with-thunderbird-plugin-dir],
+ [path to Thunderbird plugin directory]))
+ if test "x$with_thunderbird_plugin_dir" = "x" ; then
+ # This is a symlinked to $prefix/share/xul-ext
+ tracker_miner_thunderbird_install_dir="${prefix}/lib/thunderbird/extensions"
+ else
+ tracker_miner_thunderbird_install_dir="$with_tracker_miner_thunderbird_install_dir"
+ fi
+
+ if test -z $tracker_miner_thunderbird_install_dir; then
+ AC_MSG_ERROR([Couldn't find thunderbird plugin dir, consider using --with-thunderbird-plugin-dir.])
+ fi
+fi
+
+TRACKER_MINER_THUNDERBIRD_INSTALL_DIR=$tracker_miner_thunderbird_install_dir
+AC_SUBST(TRACKER_MINER_THUNDERBIRD_INSTALL_DIR)
+
+AM_CONDITIONAL(HAVE_TRACKER_MINER_THUNDERBIRD, test "x$have_tracker_miner_thunderbird" = "xyes")
+
+####################################################################
# Check for nautilus extension
####################################################################
@@ -2072,6 +2132,8 @@ AC_CONFIG_FILES([
src/tracker-writeback/Makefile
src/plugins/Makefile
src/plugins/evolution/Makefile
+ src/plugins/thunderbird/Makefile
+ src/plugins/thunderbird/install.rdf
src/plugins/nautilus/Makefile
src/vapi/Makefile
tests/common/Makefile
@@ -2208,6 +2270,7 @@ Data Miners:
Applications: yes (MeeGo support: $have_meegotouch)
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)
Flickr: $have_tracker_miner_flickr
Plugins:
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index cc63262..37406a4 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -6,6 +6,10 @@ if HAVE_TRACKER_MINER_EVOLUTION
SUBDIRS += evolution
endif
+if HAVE_TRACKER_MINER_THUNDERBIRD
+SUBDIRS += thunderbird
+endif
+
if HAVE_TRACKER_NAUTILUS_EXTENSION
SUBDIRS += nautilus
endif
diff --git a/src/plugins/thunderbird/Makefile.am b/src/plugins/thunderbird/Makefile.am
new file mode 100644
index 0000000..e2d78a0
--- /dev/null
+++ b/src/plugins/thunderbird/Makefile.am
@@ -0,0 +1,35 @@
+include $(top_srcdir)/Makefile.decl
+
+# $(TRACKER_MINER_THUNDERBIRD_INSTALL_DIR)
+extensiondir = $(datadir)/xul-ext/trackerbird
+extension_DATA = \
+ chrome.manifest \
+ chrome \
+ chrome/skin \
+ chrome/skin/overlay.css \
+ chrome/locale \
+ chrome/locale/en-US \
+ chrome/locale/en-US/options.dtd \
+ chrome/locale/en-US/about.dtd \
+ chrome/locale/en-US/overlay.dtd \
+ chrome/locale/en-US/overlay.properties \
+ chrome/content \
+ chrome/content/mailstore.js \
+ chrome/content/options.xul \
+ chrome/content/queue.js \
+ chrome/content/namespace.js \
+ chrome/content/about.xul \
+ chrome/content/tb-overlay.xul \
+ chrome/content/plugin.js \
+ chrome/content/bindings.js \
+ chrome/content/email-address-parser.js \
+ chrome/content/persistent-store.js \
+ chrome/content/ui.js \
+ chrome/content/trackerstore.js \
+ README \
+ defaults \
+ defaults/preferences \
+ defaults/preferences/prefs.js
+
+install-data-hook:
+ $(LN_S) $(extensiondir) "$(TRACKER_MINER_THUNDERBIRD_INSTALL_DIR)/{1234}"
\ No newline at end of file
diff --git a/src/plugins/thunderbird/install.rdf b/src/plugins/thunderbird/install.rdf.in
similarity index 95%
rename from src/plugins/thunderbird/install.rdf
rename to src/plugins/thunderbird/install.rdf.in
index 4b5a7a3..5fda4df 100644
--- a/src/plugins/thunderbird/install.rdf
+++ b/src/plugins/thunderbird/install.rdf.in
@@ -4,7 +4,7 @@
<em:id>trackerbird bustany org</em:id>
<em:type>2</em:type>
<em:name>TrackerBird</em:name>
- <em:version>0.1</em:version>
+ <em:version>@VERSION@</em:version>
<em:creator>Adrien Bustany</em:creator>
<em:contributor></em:contributor>
<em:description>Index your Thunderbird emails with Tracker</em:description>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]