[tracker/f19] Enable FLAC and Vorbis extractors

David King amigadave at fedoraproject.org
Fri Nov 28 11:12:12 UTC 2014


commit b3b8b16be4f8a5988ab088ccd0653e5a97a1ca25
Author: David King <amigadave at amigadave.com>
Date:   Thu Sep 25 08:26:54 2014 +0100

    Enable FLAC and Vorbis extractors
    
    Preserve timestamps during install. Build against newer versions of
    Thunderbird and Firefox.

 ...ugins-thunderbird-Add-more-debug-messages.patch |  216 +++++++++++++
 ...s-thunderbird-Fix-formatting-in-plugin.js.patch |   27 ++
 ...lugins-thunderbird-Port-to-Thunderbird-24.patch |  334 ++++++++++++++++++++
 ...s-thunderbird-Escape-folder-names-in-URIs.patch |   34 ++
 0005-Trackerbird-added-UI-localization.patch       |  183 +++++++++++
 0006-Trackerbird-Add-fr-FR-and-es-ES-locales.patch |  127 ++++++++
 ...-update-firefox-and-thunderbird-detection.patch |   34 ++
 tracker.spec                                       |   27 ++-
 8 files changed, 980 insertions(+), 2 deletions(-)
---
diff --git a/0001-plugins-thunderbird-Add-more-debug-messages.patch b/0001-plugins-thunderbird-Add-more-debug-messages.patch
new file mode 100644
index 0000000..31b7840
--- /dev/null
+++ b/0001-plugins-thunderbird-Add-more-debug-messages.patch
@@ -0,0 +1,216 @@
+From 43ae13fdbe43ab6b131d6d4abb133e3db8714a9c Mon Sep 17 00:00:00 2001
+From: Michael Lipp <mnl at mnl.de>
+Date: Mon, 10 Feb 2014 09:12:37 +0100
+Subject: [PATCH 1/7] plugins/thunderbird: Add more debug messages
+
+---
+ src/plugins/thunderbird/chrome/content/bindings.js         |  4 ++++
+ src/plugins/thunderbird/chrome/content/mailstore.js        | 13 +++++--------
+ src/plugins/thunderbird/chrome/content/persistent-store.js |  9 ++++++++-
+ src/plugins/thunderbird/chrome/content/plugin.js           |  3 +++
+ src/plugins/thunderbird/chrome/content/queue.js            |  1 +
+ src/plugins/thunderbird/chrome/content/trackerstore.js     |  6 +++---
+ 6 files changed, 24 insertions(+), 12 deletions(-)
+
+diff --git a/src/plugins/thunderbird/chrome/content/bindings.js b/src/plugins/thunderbird/chrome/content/bindings.js
+index 4d56747..abc432b 100644
+--- a/src/plugins/thunderbird/chrome/content/bindings.js
++++ b/src/plugins/thunderbird/chrome/content/bindings.js
+@@ -139,6 +139,7 @@ org.bustany.TrackerBird.TrackerSparql = {
+ 			ctypes.char.ptr
+ 		);
+ 
++		dump ("TrackerSparql initialized successfully\n")
+ 		return true;
+ 	},
+ 
+@@ -146,11 +147,14 @@ org.bustany.TrackerBird.TrackerSparql = {
+ 		var tracker = org.bustany.TrackerBird.TrackerSparql;
+ 
+ 		if (this._connection) {
++			dump ("TrackerSparql closing connection\n")
+ 			tracker.object_unref(this._connection);
+ 		}
+ 
+ 		if (this._lib) {
++			dump ("TrackerSparql closing library\n")
+ 			this._lib.close ();
+ 		}
++		dump ("TrackerSparql shut down successfully\n")
+ 	}
+ }
+diff --git a/src/plugins/thunderbird/chrome/content/mailstore.js b/src/plugins/thunderbird/chrome/content/mailstore.js
+index 819c576..e0959fe 100644
+--- a/src/plugins/thunderbird/chrome/content/mailstore.js
++++ b/src/plugins/thunderbird/chrome/content/mailstore.js
+@@ -9,7 +9,7 @@ org.bustany.TrackerBird.MailStore = {
+ 
+ 	_folderListener: {
+ 		OnItemAdded: function(parentItem, item) {
+-			dump("Item added\n");
++			dump("Trackerbird: new item to be tracked\n");
+ 			var store = org.bustany.TrackerBird.MailStore;
+ 			var hdr = item.QueryInterface(Components.interfaces.nsIMsgDBHdr);
+ 
+@@ -20,7 +20,7 @@ org.bustany.TrackerBird.MailStore = {
+ 		},
+ 
+ 		OnItemRemoved: function(parentItem, item) {
+-			dump("Item removed\n");
++			dump("Trackerbird: item to be untracked\n");
+ 			var store = org.bustany.TrackerBird.MailStore;
+ 			var hdr = item.QueryInterface(Components.interfaces.nsIMsgDBHdr);
+ 
+@@ -31,27 +31,21 @@ org.bustany.TrackerBird.MailStore = {
+ 		},
+ 
+ 		OnItemPropertyChanged: function(item, property, oldValue, newValue) {
+-			dump("Item property changed\n");
+ 		},
+ 
+ 		OnItemIntPropertyChanged: function(item, property, oldValue, newValue) {
+-			dump("Item property changed\n");
+ 		},
+ 
+ 		OnItemBoolPropertyChanged: function(item, property, oldValue, newValue) {
+-			dump("Item property changed\n");
+ 		},
+ 
+ 		OnItemUnicharPropertyChanged: function(item, property, oldValue, newValue) {
+-			dump("Item property changed\n");
+ 		},
+ 
+ 		OnItemPropertyFlagChanged: function(header, property, oldValue, newValue) {
+-			dump("Item flag changed\n");
+ 		},
+ 
+ 		OnItemEvent: function(folder, event) {
+-			dump("Item event " + event + " " + folder + "\n");
+ 		}
+ 	},
+ 
+@@ -63,6 +57,7 @@ org.bustany.TrackerBird.MailStore = {
+ 	_prefs: null,
+ 
+ 	init: function() {
++		dump ("Trackerbird initializing mailstore...\n")
+ 		// To get notifications
+ 		var mailSession = Components.classes["@mozilla.org/messenger/services/session;1"].
+ 		                  getService(Components.interfaces.nsIMsgMailSession);
+@@ -190,9 +185,11 @@ org.bustany.TrackerBird.MailStore = {
+ 	},
+ 
+ 	shutdown: function() {
++		dump ("Trackerbird mailstore store shutting down...\n")
+ 		var mailSession = Components.classes["@mozilla.org/messenger/services/session;1"].
+ 		                  getService(Components.interfaces.nsIMsgMailSession);
+ 
+ 		mailSession.Remove(this._folderListener);
++		dump ("Trackerbird mailstore store shut down\n")
+ 	}
+ }
+diff --git a/src/plugins/thunderbird/chrome/content/persistent-store.js b/src/plugins/thunderbird/chrome/content/persistent-store.js
+index a0c31f6..77313ae 100644
+--- a/src/plugins/thunderbird/chrome/content/persistent-store.js
++++ b/src/plugins/thunderbird/chrome/content/persistent-store.js
+@@ -2,6 +2,10 @@ if (!org.bustany.TrackerBird.PersistentStore || !org.bustany.TrackerBird.Persist
+ org.bustany.TrackerBird.PersistentStore = {
+ 	// Init barrier
+ 	__initialized: true,
++	__console: Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService),
++	_log: function(msg) {
++	   this.__console.logStringMessage(msg);
++	},
+ 
+ 	_schemaVersion: 1,
+ 
+@@ -51,11 +55,13 @@ org.bustany.TrackerBird.PersistentStore = {
+ 			this.insertSetting("version", this._schemaVersion, true);
+ 		}
+ 
+-
++		dump ("Trackerbird persistent store initialized\n")
++		this._log("trackerbird: persistent store initialized")
+ 		return true;
+ 	},
+ 
+ 	shutdown: function() {
++		dump ("Trackerbird persistent store shutting down...\n")
+ 		this.endTransaction();
+ 		this._rememberMessageStatement.finalize();
+ 		this._forgetMessageStatement.finalize();
+@@ -64,6 +70,7 @@ org.bustany.TrackerBird.PersistentStore = {
+ 		this._updateMetaStatement.finalize();
+ 		this._selectMetaStatement.finalize();
+ 		this._db.close();
++		dump ("Trackerbird persistent store shut down\n")
+ 	},
+ 
+ 	rememberMessage: function(msg) {
+diff --git a/src/plugins/thunderbird/chrome/content/plugin.js b/src/plugins/thunderbird/chrome/content/plugin.js
+index 64f51f9..02a76e1 100644
+--- a/src/plugins/thunderbird/chrome/content/plugin.js
++++ b/src/plugins/thunderbird/chrome/content/plugin.js
+@@ -35,6 +35,7 @@ org.bustany.TrackerBird.Plugin = {
+ 		if (this._mailstore) {
+ 			this._mailstore.shutdown();
+ 		}
++		dump("TrackerBird shut down\n");
+ 	},
+ 
+ 	initTracker: function() {
+@@ -53,10 +54,12 @@ org.bustany.TrackerBird.Plugin = {
+ 	        tracker.readyCallback = tracker.AsyncReadyCallback.ptr(callback_closure)
+ 	        tracker.connection_open_async(null, tracker.readyCallback, null);
+ 
++		dump ("Tracker Plugin initialized successfully\n")
+ 		return true;
+ 	},
+ 
+ 	onTrackerReady: function(source_object, result, user_data) {
++		dump ("Tracker connection opened\n")
+ 		var tracker = org.bustany.TrackerBird.TrackerSparql;
+ 
+         var error = new tracker.Error.ptr;
+diff --git a/src/plugins/thunderbird/chrome/content/queue.js b/src/plugins/thunderbird/chrome/content/queue.js
+index fb49d34..720b09f 100644
+--- a/src/plugins/thunderbird/chrome/content/queue.js
++++ b/src/plugins/thunderbird/chrome/content/queue.js
+@@ -6,6 +6,7 @@ org.bustany.TrackerBird.Queue = function(delay) {
+ 	var queue = this;
+ 	this._timerEvent = { notify: function(timer) { queue._active = false; queue.process(); } };
+ 	this._queueTimer = null;
++	dump("Trackerbird created queue with delay " + delay + "\n");
+ }
+ 
+ org.bustany.TrackerBird.Queue.prototype.add = function(item) {
+diff --git a/src/plugins/thunderbird/chrome/content/trackerstore.js b/src/plugins/thunderbird/chrome/content/trackerstore.js
+index ee60371..2e6c686 100644
+--- a/src/plugins/thunderbird/chrome/content/trackerstore.js
++++ b/src/plugins/thunderbird/chrome/content/trackerstore.js
+@@ -60,7 +60,7 @@ org.bustany.TrackerBird.TrackerStore = {
+ 			return false;
+ 		}
+ 
+-		dump("Inserted message " + uri + "\n");
++		dump("Trackerbird inserted message " + uri + "\n");
+ 		return true;
+ 	},
+ 
+@@ -72,11 +72,11 @@ org.bustany.TrackerBird.TrackerStore = {
+ 
+ 		if (!this.runTrackerUpdate(query,
+ 		                           100 /* batch */,
+-		                           "Cannot delete message from Tracker")) {
++		                           "Trackerbird cannot delete message from Tracker")) {
+ 			return false;
+ 		}
+ 
+-		dump("Deleted message " + uri + "\n");
++		dump("Trackerbird deleted message " + uri + "\n");
+ 		return true;
+ 	},
+ 
+-- 
+2.1.0
+
diff --git a/0002-plugins-thunderbird-Fix-formatting-in-plugin.js.patch b/0002-plugins-thunderbird-Fix-formatting-in-plugin.js.patch
new file mode 100644
index 0000000..f31f5c3
--- /dev/null
+++ b/0002-plugins-thunderbird-Fix-formatting-in-plugin.js.patch
@@ -0,0 +1,27 @@
+From 5ea3960bfbe824db0c8342a4f8ef245f9891b1b5 Mon Sep 17 00:00:00 2001
+From: Michael Lipp <mnl at mnl.de>
+Date: Mon, 10 Feb 2014 09:21:06 +0100
+Subject: [PATCH 2/7] plugins/thunderbird: Fix formatting in plugin.js
+
+---
+ src/plugins/thunderbird/chrome/content/plugin.js | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/plugins/thunderbird/chrome/content/plugin.js b/src/plugins/thunderbird/chrome/content/plugin.js
+index 02a76e1..704b72f 100644
+--- a/src/plugins/thunderbird/chrome/content/plugin.js
++++ b/src/plugins/thunderbird/chrome/content/plugin.js
+@@ -51,8 +51,8 @@ org.bustany.TrackerBird.Plugin = {
+ 			plugin.onTrackerReady(source_object, result, user_data);
+ 		}
+ 
+-	        tracker.readyCallback = tracker.AsyncReadyCallback.ptr(callback_closure)
+-	        tracker.connection_open_async(null, tracker.readyCallback, null);
++		tracker.readyCallback = tracker.AsyncReadyCallback.ptr(callback_closure);
++		tracker.connection_open_async(null, tracker.readyCallback, null);
+ 
+ 		dump ("Tracker Plugin initialized successfully\n")
+ 		return true;
+-- 
+2.1.0
+
diff --git a/0003-plugins-thunderbird-Port-to-Thunderbird-24.patch b/0003-plugins-thunderbird-Port-to-Thunderbird-24.patch
new file mode 100644
index 0000000..92c92d6
--- /dev/null
+++ b/0003-plugins-thunderbird-Port-to-Thunderbird-24.patch
@@ -0,0 +1,334 @@
+From c8e5b5566fdb92b32cb80c093d4ea6aa471cbf9c Mon Sep 17 00:00:00 2001
+From: Michael Lipp <mnl at mnl.de>
+Date: Mon, 10 Feb 2014 09:22:04 +0100
+Subject: [PATCH 3/7] plugins/thunderbird: Port to Thunderbird 24
+
+---
+ .../thunderbird/chrome/content/mailstore.js        | 157 +++++++++++++--------
+ src/plugins/thunderbird/chrome/content/plugin.js   |   2 +
+ src/plugins/thunderbird/chrome/content/queue.js    |  25 +++-
+ src/plugins/thunderbird/install.rdf.in             |   4 +-
+ 4 files changed, 124 insertions(+), 64 deletions(-)
+
+diff --git a/src/plugins/thunderbird/chrome/content/mailstore.js b/src/plugins/thunderbird/chrome/content/mailstore.js
+index e0959fe..26c8bc4 100644
+--- a/src/plugins/thunderbird/chrome/content/mailstore.js
++++ b/src/plugins/thunderbird/chrome/content/mailstore.js
+@@ -1,11 +1,51 @@
+-if (!org.bustany.TrackerBird.MailStore || !org.bustany.TrackerBird.MailStore.__initialized)
++if (!org.bustany.TrackerBird.MailStore || !org.bustany.TrackerBird.MailStore.__initialized) {
++
++Components.utils.import("resource:///modules/MailUtils.js");
++
++org.bustany.TrackerBird.ContentRetriever = function(header, callback) {
++	this._header = header;
++	this._callback = callback;
++	this._contents = "";
++}
++
++org.bustany.TrackerBird.ContentRetriever.prototype = {
++	onStartRequest: function(request, ctx) {
++	},
++
++	onDataAvailable: function(request, context, inputStream, offset, count) {
++	    var scriptableInputStream =
++			Components.classes["@mozilla.org/scriptableinputstream;1"].
++				createInstance(Components.interfaces.nsIScriptableInputStream);
++	    scriptableInputStream.init(inputStream);
++	    var data = scriptableInputStream.read(count);
++	    this._contents += data;
++	},
++
++	onStopRequest: function(request, ctx, status) {
++		// Basic html removing
++		this._contents = this._contents.replace(/<[^>]+?>/g, "");
++		this._callback(this._header, this._contents);
++	},
++
++	QueryInterface: function (aIID) {
++		if (aIID.equals(Components.interfaces.nsIStreamListener) ||
++			aIID.equals(Components.interfaces.nsISupports)) {
++			return this;
++		}
++		throw Components.results.NS_NOINTERFACE;
++	}
++}
++
+ org.bustany.TrackerBird.MailStore = {
+ 	// Init barrier
+ 	__initialized: true,
++	__console: Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService),
++	_log: function(msg) {
++	   this.__console.logStringMessage(msg);
++	},
+ 
+ 	_trackerStore: org.bustany.TrackerBird.TrackerStore,
+ 	_persistentStore: org.bustany.TrackerBird.PersistentStore,
+-	_ui: org.bustany.TrackerBird.Ui,
+ 
+ 	_folderListener: {
+ 		OnItemAdded: function(parentItem, item) {
+@@ -52,6 +92,7 @@ org.bustany.TrackerBird.MailStore = {
+ 	_queue: null,
+ 	_walkFolderCallback: null,
+ 	_indexMessageCallback: null,
++	_indexMessageContentsCallback: null,
+ 	_removeMessageCallback: null,
+ 
+ 	_prefs: null,
+@@ -72,35 +113,45 @@ org.bustany.TrackerBird.MailStore = {
+ 		this._queue = new org.bustany.TrackerBird.Queue(this._prefs.getIntPref("indexDelay")),
+ 		this._walkFolderCallback = function(item) { store.walkFolder(item); }
+ 		this._indexMessageCallback = function(msg) { store.indexMessage(msg); }
++		this._indexMessageContentsCallback = function(msg, contents) {
++			store.indexMessageContents(msg, contents);
++		}
+ 		this._removeMessageCallback = function(msg) { store.removeMessage(msg); }
+ 
++		MailUtils.discoverFolders();
++		dump ("Trackerbird mailstore initialized...\n")
++		this._log("trackerbird: mailstore initialized");
+ 		return true;
+ 	},
+ 
+ 	listAllFolders: function() {
+-		var accountManager = Components.classes["@mozilla.org/messenger/account-manager;1"].
+-		                     getService(Components.interfaces.nsIMsgAccountManager);
+-
+-		var servers = accountManager.allServers;
+-
+-		for (var i = 0; i < servers.Count(); i++) {
+-			var s = servers.QueryElementAt(i, Components.interfaces.nsIMsgIncomingServer);
++		var store = this;
++		var servers = MailServices.accounts.allServers;
+ 
+-			var folders = Components.classes["@mozilla.org/supports-array;1"].
+-			              createInstance(Components.interfaces.nsISupportsArray);
++		for (var i = 0; i < servers.length; i++) {
++			var s = servers.queryElementAt(i, Components.interfaces.nsIMsgIncomingServer);
+ 
+-			s.rootFolder.ListDescendents(folders);
++			var folders = Components.classes["@mozilla.org/array;1"].
++			              createInstance(Components.interfaces.nsIMutableArray);
++			s.rootFolder.ListDescendants(folders);
+ 
+-			for (var j = 0; j < folders.Count(); j++) {
+-				var folder = folders.GetElementAt(j).QueryInterface(Components.interfaces.nsIMsgFolder);
++			for (var j = 0; j < folders.length; j++) {
++				var folder = folders.queryElementAt(j, Components.interfaces.nsIMsgFolder);
+ 
+-				var store = this;
+ 				this._queue.add({
+-				                 callback: this._walkFolderCallback,
+-				                 data: folder
+-				                });
++					callback: store._walkFolderCallback,
++					data: folder
++				});
+ 			}
+ 		}
++
++		this._queue.add({
++			callback: function() {
++				dump("Trackerbird walked all folders\n");
++				store._log("trackerbird: walked all folders");
++			},
++			data: null
++		})
+ 	},
+ 
+ 	walkFolder: function(folder) {
+@@ -119,15 +170,15 @@ org.bustany.TrackerBird.MailStore = {
+ 		knownUris = null;
+ 
+ 		while (enumerator.hasMoreElements()) {
+-			var msg = enumerator.getNext().QueryInterface(Components.interfaces.nsIMsgDBHdr);
++			var hdr = enumerator.getNext().QueryInterface(Components.interfaces.nsIMsgDBHdr);
+ 
+-			if (uriCache[folder.getUriForMsg(msg)]) {
++			if (uriCache[folder.getUriForMsg(hdr)]) {
+ 				continue;
+ 			}
+ 
+ 			this._queue.add({
+ 			                 callback: this._indexMessageCallback,
+-			                 data: msg
++			                 data: hdr
+ 			                });
+ 		}
+ 
+@@ -135,53 +186,48 @@ org.bustany.TrackerBird.MailStore = {
+ 		db = null;
+ 	},
+ 
+-	indexMessage: function(msg) {
+-		var msgContents = this.getMessageContents(msg);
+-		if (this._trackerStore.storeMessage(msg, msgContents)) {
+-			this._persistentStore.rememberMessage(msg);
+-		}
+-
+-		this._ui.showMessage(this._queue.size() + " items remaining");
+-	},
+-
+-	removeMessage: function(msg) {
+-		this._trackerStore.deleteMessage(msg);
+-		this._persistentStore.forgetMessage(msg);
+-	},
+-
+-	getMessageContents: function(header) {
++	/**
++	 * This method indexes a new message. In order to do this, it has to retrieve its contents
++	 * first. The contents is only available as a stream that has to be read first.
++	 * When the contents has been read, indexMessageContents is called and the actual
++	 * indexing happens.
++	 */
++	indexMessage: function(header) {
+ 		var folder = header.folder;
+-		var contents = "";
+ 
+ 		var messenger = Components.classes["@mozilla.org/messenger;1"].
+ 		                createInstance(Components.interfaces.nsIMessenger);
+ 		var uri = folder.getUriForMsg(header);
+ 		var msgService = messenger.messageServiceFromURI(uri);
+-		var msgStream = Components.classes["@mozilla.org/network/sync-stream-listener;1"].
+-		                createInstance();
+-		var consumer = msgStream.QueryInterface(Components.interfaces.nsIInputStream);
+-		var scriptInput = Components.classes["@mozilla.org/scriptableinputstream;1"].
+-		                  createInstance();
+-		var scriptInputStream = scriptInput.
+-		                        QueryInterface(Components.interfaces.nsIScriptableInputStream);
+-		scriptInputStream.init(msgStream);
+ 
++		// Streaming data into a nsScriptableInputStream and then reading from it here
++		// makes thunderbird hang sometimes, so continue asynchronously.
+ 		try {
++			var msgStream = new org.bustany.TrackerBird.ContentRetriever(header, this._indexMessageContentsCallback);
+ 			msgService.streamMessage(uri, msgStream, null, null, true, null);
+-		} catch (e) {
+-			dump("Could not get contents of message " + uri + "\n");
+-			return null;
++		} catch (ex) {
++			dump("Trackerbird could not get contents of message " + ex + "\n");
+ 		}
++	},
+ 
+-		scriptInputStream.available();
+-		while (scriptInputStream.available()) {
+-			contents += scriptInputStream.read(1024);
++	/**
++	 * Index the message by inserting it into our local store of indexed messages and
++	 * into the tracker store.
++	 */
++	indexMessageContents: function(msg, contents) {
++		try {
++			if (this._trackerStore.storeMessage(msg, contents)) {
++				this._persistentStore.rememberMessage(msg);
++			}
++		} catch (ex) {
++			dump("Trackerbird failed to index message: " + ex + "\n");
++			this._log("Trackerbird failed to index message: " + ex);
+ 		}
++	},
+ 
+-		// Basic html removing
+-		contents = contents.replace(/<[^>]+?>/g, "");
+-
+-		return contents;
++	removeMessage: function(msg) {
++		this._trackerStore.deleteMessage(msg);
++		this._persistentStore.forgetMessage(msg);
+ 	},
+ 
+ 	shutdown: function() {
+@@ -193,3 +239,4 @@ org.bustany.TrackerBird.MailStore = {
+ 		dump ("Trackerbird mailstore store shut down\n")
+ 	}
+ }
++}
+diff --git a/src/plugins/thunderbird/chrome/content/plugin.js b/src/plugins/thunderbird/chrome/content/plugin.js
+index 704b72f..a4e42ca 100644
+--- a/src/plugins/thunderbird/chrome/content/plugin.js
++++ b/src/plugins/thunderbird/chrome/content/plugin.js
+@@ -96,6 +96,8 @@ org.bustany.TrackerBird.Plugin = {
+ 			return;
+ 		}
+ 
++		this._ui.showMessage("Starting...");
++
+ 		this._mailstore.listAllFolders();
+ 	}
+ }
+diff --git a/src/plugins/thunderbird/chrome/content/queue.js b/src/plugins/thunderbird/chrome/content/queue.js
+index 720b09f..c3f0b81 100644
+--- a/src/plugins/thunderbird/chrome/content/queue.js
++++ b/src/plugins/thunderbird/chrome/content/queue.js
+@@ -1,11 +1,17 @@
+ org.bustany.TrackerBird.Queue = function(delay) {
+-	this._delay = 100;
++	this._ui = org.bustany.TrackerBird.Ui;
++	this.__console = Components.classes["@mozilla.org/consoleservice;1"].getService(Components.interfaces.nsIConsoleService);
++	this._log = function(msg) {
++	   this.__console.logStringMessage(msg);
++	}
++
++	this._delay = delay;
+ 	this._items = [];
+ 	this._active = false;
+ 
+ 	var queue = this;
+ 	this._timerEvent = { notify: function(timer) { queue._active = false; queue.process(); } };
+-	this._queueTimer = null;
++	this._queueTimer = Components.classes["@mozilla.org/timer;1"].createInstance(Components.interfaces.nsITimer);
+ 	dump("Trackerbird created queue with delay " + delay + "\n");
+ }
+ 
+@@ -20,21 +26,26 @@ org.bustany.TrackerBird.Queue.prototype.addImmediate = function(item) {
+ }
+ 
+ org.bustany.TrackerBird.Queue.prototype.process = function() {
+-	if (this._active) {
++	if (this._items.length == 0) {
++		this._ui.showMessage("Indexer idle");
+ 		return;
+ 	}
++	this._ui.showMessage(this._items.length + " actions remaining");
+ 
+-	if (this._items.length == 0) {
++	if (this._active) {
+ 		return;
+ 	}
+-
+ 	this._active = true;
+ 
+ 	var item = this._items.shift();
+ 
+-	item.callback(item.data);
++	try {
++		item.callback(item.data);
++	} catch (ex) {
++		dump ("Trackbird could not execute: " + ex + "\n");
++		this._log("Trackerbird could not execute: " + ex);
++	}
+ 
+-	this._queueTimer = Components.classes["@mozilla.org/timer;1"].createInstance(Components.interfaces.nsITimer);
+ 	this._queueTimer.initWithCallback(this._timerEvent, this._delay, Components.interfaces.nsITimer.TYPE_ONE_SHOT);
+ }
+ 
+diff --git a/src/plugins/thunderbird/install.rdf.in b/src/plugins/thunderbird/install.rdf.in
+index fd09996..ee315b6 100644
+--- a/src/plugins/thunderbird/install.rdf.in
++++ b/src/plugins/thunderbird/install.rdf.in
+@@ -13,8 +13,8 @@
+ 	<em:targetApplication>
+ 	  <Description>
+ 		<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id> <!-- Thunderbird -->
+-		<em:minVersion>5.0b1</em:minVersion>
+-		<em:maxVersion>20.0.*</em:maxVersion>
++		<em:minVersion>24.0</em:minVersion>
++		<em:maxVersion>24.*</em:maxVersion>
+ 	  </Description>
+ 	</em:targetApplication>
+   </Description>
+-- 
+2.1.0
+
diff --git a/0004-plugins-thunderbird-Escape-folder-names-in-URIs.patch b/0004-plugins-thunderbird-Escape-folder-names-in-URIs.patch
new file mode 100644
index 0000000..3380e6e
--- /dev/null
+++ b/0004-plugins-thunderbird-Escape-folder-names-in-URIs.patch
@@ -0,0 +1,34 @@
+From 8f887820738ba351bac97ef89c088469dd1569cc Mon Sep 17 00:00:00 2001
+From: Michael Lipp <mnl at mnl.de>
+Date: Mon, 10 Feb 2014 09:22:25 +0100
+Subject: [PATCH 4/7] plugins/thunderbird: Escape folder names in URIs
+
+---
+ src/plugins/thunderbird/chrome/content/trackerstore.js | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/plugins/thunderbird/chrome/content/trackerstore.js b/src/plugins/thunderbird/chrome/content/trackerstore.js
+index 2e6c686..505a0c4 100644
+--- a/src/plugins/thunderbird/chrome/content/trackerstore.js
++++ b/src/plugins/thunderbird/chrome/content/trackerstore.js
+@@ -19,7 +19,7 @@ org.bustany.TrackerBird.TrackerStore = {
+ 
+ 	storeMessage: function(header, contents) {
+ 		var folder = header.folder
+-		var uri = folder.getUriForMsg(header);
++		var uri = encodeURI(folder.getUriForMsg(header));
+ 		var fromEmailAddress;
+ 		var toEmailAddresses = [];
+ 
+@@ -66,7 +66,7 @@ org.bustany.TrackerBird.TrackerStore = {
+ 
+ 	deleteMessage: function(header) {
+ 		var folder = header.folder
+-		var uri = folder.getUriForMsg(header);
++		var uri = encodeURI(folder.getUriForMsg(header));
+ 
+ 		var query = "DELETE {<" + uri +"> a rdfs:Resource}";
+ 
+-- 
+2.1.0
+
diff --git a/0005-Trackerbird-added-UI-localization.patch b/0005-Trackerbird-added-UI-localization.patch
new file mode 100644
index 0000000..e55f0e5
--- /dev/null
+++ b/0005-Trackerbird-added-UI-localization.patch
@@ -0,0 +1,183 @@
+From 2932d856dfa1c01a03553ad48d1af4e6756130e2 Mon Sep 17 00:00:00 2001
+From: Michael Lipp <mnl at mnl.de>
+Date: Mon, 10 Feb 2014 11:12:24 +0100
+Subject: [PATCH 5/7] Trackerbird: added UI localization.
+
+---
+ src/plugins/thunderbird/chrome.manifest                      |  1 +
+ src/plugins/thunderbird/chrome/content/plugin.js             | 12 ++++++------
+ src/plugins/thunderbird/chrome/content/queue.js              |  4 ++--
+ src/plugins/thunderbird/chrome/content/ui.js                 |  7 ++++++-
+ src/plugins/thunderbird/chrome/locale/de-DE/about.dtd        |  4 ++++
+ src/plugins/thunderbird/chrome/locale/de-DE/options.dtd      |  4 ++++
+ src/plugins/thunderbird/chrome/locale/de-DE/overlay.dtd      |  2 ++
+ .../thunderbird/chrome/locale/de-DE/overlay.properties       |  9 +++++++++
+ .../thunderbird/chrome/locale/en-US/overlay.properties       | 10 +++++++++-
+ 9 files changed, 43 insertions(+), 10 deletions(-)
+ create mode 100644 src/plugins/thunderbird/chrome/locale/de-DE/about.dtd
+ create mode 100644 src/plugins/thunderbird/chrome/locale/de-DE/options.dtd
+ create mode 100644 src/plugins/thunderbird/chrome/locale/de-DE/overlay.dtd
+ create mode 100644 src/plugins/thunderbird/chrome/locale/de-DE/overlay.properties
+
+diff --git a/src/plugins/thunderbird/chrome.manifest b/src/plugins/thunderbird/chrome.manifest
+index 6d353fe..03763c2 100644
+--- a/src/plugins/thunderbird/chrome.manifest
++++ b/src/plugins/thunderbird/chrome.manifest
+@@ -1,6 +1,7 @@
+ content   trackerbird                 chrome/content/
+ skin      trackerbird   classic/1.0   chrome/skin/
+ locale    trackerbird   en-US         chrome/locale/en-US/
++locale    trackerbird   de-DE         chrome/locale/de-DE/
+ 
+ overlay   chrome://messenger/content/messenger.xul   chrome://trackerbird/content/tb-overlay.xul
+ 
+diff --git a/src/plugins/thunderbird/chrome/content/plugin.js b/src/plugins/thunderbird/chrome/content/plugin.js
+index a4e42ca..f2b3378 100644
+--- a/src/plugins/thunderbird/chrome/content/plugin.js
++++ b/src/plugins/thunderbird/chrome/content/plugin.js
+@@ -18,7 +18,7 @@ org.bustany.TrackerBird.Plugin = {
+ 		}
+ 
+ 		if (!this.initTracker()) {
+-			this._ui.showMessage("Cannot initialize Tracker");
++			this._ui.showMessage("cannotInit");
+ 			return;
+ 		}
+ 
+@@ -67,17 +67,17 @@ org.bustany.TrackerBird.Plugin = {
+ 
+         if (!error.isNull ()) {
+             dump ("Could not initialize Tracker: " + error.contents.message.readString() + "\n");
+-			this._ui.showMessage("Cannot connect to Tracker");
++			this._ui.showMessage("cannotConnect");
+             tracker.error_free(error);
+ 			return;
+         }
+ 
+ 		// Tracker is ready, proceed with the rest of the init
+ 
+-		this._ui.showMessage("Initializing...");
++		this._ui.showMessage("initializing");
+ 
+ 		if (!this._persistentstore.init()) {
+-			this._ui.showMessage("Cannot initialize persistent storage");
++			this._ui.showMessage("cannotInitPersistent");
+ 			dump("Could not initialize Persistent store\n");
+ 			_persistentstore = null;
+ 			return;
+@@ -90,13 +90,13 @@ org.bustany.TrackerBird.Plugin = {
+ 		}
+ 
+ 		if (!this._mailstore.init()) {
+-			this._ui.showMessage("Cannot initialize mail store");
++			this._ui.showMessage("cannotInitMail");
+ 			dump("Could not initialize mail store\n");
+ 			_mailstore = null;
+ 			return;
+ 		}
+ 
+-		this._ui.showMessage("Starting...");
++		this._ui.showMessage("starting");
+ 
+ 		this._mailstore.listAllFolders();
+ 	}
+diff --git a/src/plugins/thunderbird/chrome/content/queue.js b/src/plugins/thunderbird/chrome/content/queue.js
+index c3f0b81..52ec377 100644
+--- a/src/plugins/thunderbird/chrome/content/queue.js
++++ b/src/plugins/thunderbird/chrome/content/queue.js
+@@ -27,10 +27,10 @@ org.bustany.TrackerBird.Queue.prototype.addImmediate = function(item) {
+ 
+ org.bustany.TrackerBird.Queue.prototype.process = function() {
+ 	if (this._items.length == 0) {
+-		this._ui.showMessage("Indexer idle");
++		this._ui.showMessage("indexerIdle");
+ 		return;
+ 	}
+-	this._ui.showMessage(this._items.length + " actions remaining");
++	this._ui.showFormattedMessage("actionsRemaining", [this._items.length]);
+ 
+ 	if (this._active) {
+ 		return;
+diff --git a/src/plugins/thunderbird/chrome/content/ui.js b/src/plugins/thunderbird/chrome/content/ui.js
+index 6d2f027..878d436 100644
+--- a/src/plugins/thunderbird/chrome/content/ui.js
++++ b/src/plugins/thunderbird/chrome/content/ui.js
+@@ -7,11 +7,16 @@ org.bustany.TrackerBird.Ui = {
+ 
+ 	init: function() {
+ 		this._statusPanel = document.getElementById("trackerbird-status-panel");
++		this._strbundle = document.getElementById("trackerbird-strings");
+ 
+ 		return true;
+ 	},
+ 
+ 	showMessage: function(str) {
+-		this._statusPanel.label = str;
++		this._statusPanel.label = this._strbundle.getString(str);
++	},
++
++	showFormattedMessage: function(str, repls) {
++		this._statusPanel.label = this._strbundle.getFormattedString(str, repls);
+ 	}
+ }
+diff --git a/src/plugins/thunderbird/chrome/locale/de-DE/about.dtd b/src/plugins/thunderbird/chrome/locale/de-DE/about.dtd
+new file mode 100644
+index 0000000..c2368a2
+--- /dev/null
++++ b/src/plugins/thunderbird/chrome/locale/de-DE/about.dtd
+@@ -0,0 +1,4 @@
++<!ENTITY about "Über TrackerBird">
++<!ENTITY version "Version:">
++<!ENTITY createdBy "Autor:">
++<!ENTITY homepage "Home Page:">
+diff --git a/src/plugins/thunderbird/chrome/locale/de-DE/options.dtd b/src/plugins/thunderbird/chrome/locale/de-DE/options.dtd
+new file mode 100644
+index 0000000..21a49eb
+--- /dev/null
++++ b/src/plugins/thunderbird/chrome/locale/de-DE/options.dtd
+@@ -0,0 +1,4 @@
++<!ENTITY prefwindow.title "TrackerBird Einstellungen">
++<!ENTITY pane1.title "TrackerBird Einstellungen">
++<!ENTITY indexDelay.label "Drossel (ms Pause zwischen Aktivitäten)">
++<!ENTITY indexDelay.accesskey "T">
+diff --git a/src/plugins/thunderbird/chrome/locale/de-DE/overlay.dtd b/src/plugins/thunderbird/chrome/locale/de-DE/overlay.dtd
+new file mode 100644
+index 0000000..2340655
+--- /dev/null
++++ b/src/plugins/thunderbird/chrome/locale/de-DE/overlay.dtd
+@@ -0,0 +1,2 @@
++<!ENTITY idle "Leerlauf">
++<!ENTITY indexing "Indiziere...">
+diff --git a/src/plugins/thunderbird/chrome/locale/de-DE/overlay.properties b/src/plugins/thunderbird/chrome/locale/de-DE/overlay.properties
+new file mode 100644
+index 0000000..89219a2
+--- /dev/null
++++ b/src/plugins/thunderbird/chrome/locale/de-DE/overlay.properties
+@@ -0,0 +1,9 @@
++actionsRemaining = %S verbleibende Aktivitäten
++cannotConnect = Verbindung mit Tracker nicht möglich
++cannotInit = Tracker-Initialisierung fehlgeschlagen
++cannotInitMail = Mail-Speicher-Initialisierung fehlgeschlagen
++cannotInitPersistent = DB-Initialisierung fehlgeschlagen
++indexerIdle = Indexer im Leerlauf
++indexing = Indiziere ...
++initializing = Initialisiere ...
++starting = Starte ...
+diff --git a/src/plugins/thunderbird/chrome/locale/en-US/overlay.properties b/src/plugins/thunderbird/chrome/locale/en-US/overlay.properties
+index 4de173a..163b38d 100644
+--- a/src/plugins/thunderbird/chrome/locale/en-US/overlay.properties
++++ b/src/plugins/thunderbird/chrome/locale/en-US/overlay.properties
+@@ -1 +1,9 @@
+-extensions.trackerbird at bustany.org.indexing = "Indexing"
++actionsRemaining = %S actions remaining
++cannotConnect = Cannot connect to Tracker
++cannotInit = Cannot initialize Tracker
++cannotInitMail = Cannot initialize mail store
++cannotInitPersistent = Cannot initialize persistent storage
++indexerIdle = Indexer idle
++indexing = Indexing...
++initializing = Initializing...
++starting = Starting...
+-- 
+2.1.0
+
diff --git a/0006-Trackerbird-Add-fr-FR-and-es-ES-locales.patch b/0006-Trackerbird-Add-fr-FR-and-es-ES-locales.patch
new file mode 100644
index 0000000..d83c02e
--- /dev/null
+++ b/0006-Trackerbird-Add-fr-FR-and-es-ES-locales.patch
@@ -0,0 +1,127 @@
+From f17162dd1a31be207ebbd48ad7fe8c8bc5082a8b Mon Sep 17 00:00:00 2001
+From: Adrien Bustany <adrien at bustany.org>
+Date: Mon, 10 Feb 2014 12:02:20 +0100
+Subject: [PATCH 6/7] Trackerbird: Add fr-FR and es-ES locales
+
+---
+ src/plugins/thunderbird/chrome.manifest                        | 2 ++
+ src/plugins/thunderbird/chrome/locale/es-ES/about.dtd          | 4 ++++
+ src/plugins/thunderbird/chrome/locale/es-ES/options.dtd        | 4 ++++
+ src/plugins/thunderbird/chrome/locale/es-ES/overlay.dtd        | 2 ++
+ src/plugins/thunderbird/chrome/locale/es-ES/overlay.properties | 9 +++++++++
+ src/plugins/thunderbird/chrome/locale/fr-FR/about.dtd          | 4 ++++
+ src/plugins/thunderbird/chrome/locale/fr-FR/options.dtd        | 4 ++++
+ src/plugins/thunderbird/chrome/locale/fr-FR/overlay.dtd        | 2 ++
+ src/plugins/thunderbird/chrome/locale/fr-FR/overlay.properties | 9 +++++++++
+ 9 files changed, 40 insertions(+)
+ create mode 100644 src/plugins/thunderbird/chrome/locale/es-ES/about.dtd
+ create mode 100644 src/plugins/thunderbird/chrome/locale/es-ES/options.dtd
+ create mode 100644 src/plugins/thunderbird/chrome/locale/es-ES/overlay.dtd
+ create mode 100644 src/plugins/thunderbird/chrome/locale/es-ES/overlay.properties
+ create mode 100644 src/plugins/thunderbird/chrome/locale/fr-FR/about.dtd
+ create mode 100644 src/plugins/thunderbird/chrome/locale/fr-FR/options.dtd
+ create mode 100644 src/plugins/thunderbird/chrome/locale/fr-FR/overlay.dtd
+ create mode 100644 src/plugins/thunderbird/chrome/locale/fr-FR/overlay.properties
+
+diff --git a/src/plugins/thunderbird/chrome.manifest b/src/plugins/thunderbird/chrome.manifest
+index 03763c2..0f13e8c 100644
+--- a/src/plugins/thunderbird/chrome.manifest
++++ b/src/plugins/thunderbird/chrome.manifest
+@@ -2,6 +2,8 @@ content   trackerbird                 chrome/content/
+ skin      trackerbird   classic/1.0   chrome/skin/
+ locale    trackerbird   en-US         chrome/locale/en-US/
+ locale    trackerbird   de-DE         chrome/locale/de-DE/
++locale    trackerbird   fr-FR         chrome/locale/fr-FR/
++locale    trackerbird   es-ES         chrome/locale/es-ES/
+ 
+ overlay   chrome://messenger/content/messenger.xul   chrome://trackerbird/content/tb-overlay.xul
+ 
+diff --git a/src/plugins/thunderbird/chrome/locale/es-ES/about.dtd b/src/plugins/thunderbird/chrome/locale/es-ES/about.dtd
+new file mode 100644
+index 0000000..9b3d8e7
+--- /dev/null
++++ b/src/plugins/thunderbird/chrome/locale/es-ES/about.dtd
+@@ -0,0 +1,4 @@
++<!ENTITY about "Acerca de TrackerBird">
++<!ENTITY version "Versión:">
++<!ENTITY createdBy "Autor:">
++<!ENTITY homepage "Página web:">
+diff --git a/src/plugins/thunderbird/chrome/locale/es-ES/options.dtd b/src/plugins/thunderbird/chrome/locale/es-ES/options.dtd
+new file mode 100644
+index 0000000..f7047d0
+--- /dev/null
++++ b/src/plugins/thunderbird/chrome/locale/es-ES/options.dtd
+@@ -0,0 +1,4 @@
++<!ENTITY prefwindow.title "Preferencias de TrackerBird">
++<!ENTITY pane1.title "Preferencias de TrackerBird">
++<!ENTITY indexDelay.label "Plazo (entre cada actividad, en ms)">
++<!ENTITY indexDelay.accesskey "T">
+diff --git a/src/plugins/thunderbird/chrome/locale/es-ES/overlay.dtd b/src/plugins/thunderbird/chrome/locale/es-ES/overlay.dtd
+new file mode 100644
+index 0000000..1f2cf9e
+--- /dev/null
++++ b/src/plugins/thunderbird/chrome/locale/es-ES/overlay.dtd
+@@ -0,0 +1,2 @@
++<!ENTITY idle "Ocio">
++<!ENTITY indexing "Indexando...">
+diff --git a/src/plugins/thunderbird/chrome/locale/es-ES/overlay.properties b/src/plugins/thunderbird/chrome/locale/es-ES/overlay.properties
+new file mode 100644
+index 0000000..37b8b36
+--- /dev/null
++++ b/src/plugins/thunderbird/chrome/locale/es-ES/overlay.properties
+@@ -0,0 +1,9 @@
++actionsRemaining = %S tareas pendiente
++cannotConnect = Imposible de conectarse a Tracker
++cannotInit = Imposible de inicializar Tracker
++cannotInitMail = Imposible de inicializar el almacenamiento de los mensajes
++cannotInitPersistent = Imposible de inicializar la base de datos de los mensajes indexados
++indexerIdle = Ocio
++indexing = Indexando...
++initializing = Inicializando...
++starting = Arrancando...
+diff --git a/src/plugins/thunderbird/chrome/locale/fr-FR/about.dtd b/src/plugins/thunderbird/chrome/locale/fr-FR/about.dtd
+new file mode 100644
+index 0000000..0928e76
+--- /dev/null
++++ b/src/plugins/thunderbird/chrome/locale/fr-FR/about.dtd
+@@ -0,0 +1,4 @@
++<!ENTITY about "À propos de TrackerBird">
++<!ENTITY version "Version:">
++<!ENTITY createdBy "Auteur:">
++<!ENTITY homepage "Page d'accueil:">
+diff --git a/src/plugins/thunderbird/chrome/locale/fr-FR/options.dtd b/src/plugins/thunderbird/chrome/locale/fr-FR/options.dtd
+new file mode 100644
+index 0000000..41088f4
+--- /dev/null
++++ b/src/plugins/thunderbird/chrome/locale/fr-FR/options.dtd
+@@ -0,0 +1,4 @@
++<!ENTITY prefwindow.title "Préférences de TrackerBird">
++<!ENTITY pane1.title "Préférences de TrackerBird">
++<!ENTITY indexDelay.label "Délai (attente entre chaque activité, en ms)">
++<!ENTITY indexDelay.accesskey "T">
+diff --git a/src/plugins/thunderbird/chrome/locale/fr-FR/overlay.dtd b/src/plugins/thunderbird/chrome/locale/fr-FR/overlay.dtd
+new file mode 100644
+index 0000000..5762088
+--- /dev/null
++++ b/src/plugins/thunderbird/chrome/locale/fr-FR/overlay.dtd
+@@ -0,0 +1,2 @@
++<!ENTITY idle "Au repos">
++<!ENTITY indexing "Indexation en cours...">
+diff --git a/src/plugins/thunderbird/chrome/locale/fr-FR/overlay.properties b/src/plugins/thunderbird/chrome/locale/fr-FR/overlay.properties
+new file mode 100644
+index 0000000..d2d7d75
+--- /dev/null
++++ b/src/plugins/thunderbird/chrome/locale/fr-FR/overlay.properties
+@@ -0,0 +1,9 @@
++actionsRemaining = %S tâches restante(s)
++cannotConnect = Impossible de se connecter à Tracker
++cannotInit = Impossible d'initialiser Tracker
++cannotInitMail = Impossible d'initialiser le stockage des messages
++cannotInitPersistent = Impossible d'initialiser la base des message indexés
++indexerIdle = Indexation au repos
++indexing = Indexation en cours...
++initializing = Initialisation en cours...
++starting = Démarrage...
+-- 
+2.1.0
+
diff --git a/0007-build-update-firefox-and-thunderbird-detection.patch b/0007-build-update-firefox-and-thunderbird-detection.patch
new file mode 100644
index 0000000..3359962
--- /dev/null
+++ b/0007-build-update-firefox-and-thunderbird-detection.patch
@@ -0,0 +1,34 @@
+From 8456a502111078eda33fe149efab2835019ca911 Mon Sep 17 00:00:00 2001
+From: Dominique Leuenberger <dimstar at opensuse.org>
+Date: Wed, 6 Aug 2014 13:54:20 +0200
+Subject: [PATCH 7/7] build: update firefox and thunderbird detection
+
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 5393852..1c6f9d6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -411,7 +411,7 @@ have_tracker_miner_thunderbird="no "
+ 
+ AC_PATH_PROG(THUNDERBIRD, thunderbird, thunderbird)
+ if test -n $THUNDERBIRD; then
+-   thunderbird_version=`$THUNDERBIRD --version | cut -d" " -f3`
++   thunderbird_version=`$THUNDERBIRD --version 2>/dev/null | awk '{print $NF}'`
+ 
+    AX_COMPARE_VERSION([$thunderbird_version], ge, [$TRACKER_MINER_THUNDERBIRD_REQUIRED],
+                       have_tracker_miner_thunderbird="yes",
+@@ -425,7 +425,7 @@ have_tracker_miner_firefox="no "
+ 
+ AC_PATH_PROG(FIREFOX, firefox, firefox)
+ if test -n $FIREFOX; then
+-   firefox_version=`$FIREFOX --version | cut -d" " -f3`
++   firefox_version=`$FIREFOX --version 2>/dev/null | awk '{print $NF}'`
+ 
+    AX_COMPARE_VERSION([$firefox_version], ge, [$TRACKER_MINER_FIREFOX_REQUIRED],
+                       have_tracker_miner_firefox="yes",
+-- 
+2.1.0
+
diff --git a/tracker.spec b/tracker.spec
index 767de44..f6f722a 100644
--- a/tracker.spec
+++ b/tracker.spec
@@ -15,7 +15,7 @@
 Summary:	Desktop-neutral search tool and indexer
 Name:		tracker
 Version:	0.16.4
-Release:	1%{?dist}
+Release:	2%{?dist}
 License:	GPLv2+
 Group:		Applications/System
 URL:		http://projects.gnome.org/tracker/
@@ -31,6 +31,15 @@ Patch2:		0001-fts-Strengthen-against-sqlite-failures-in-FTS-functi.patch
 # https://bugzilla.gnome.org/show_bug.cgi?id=712142
 Patch3:         0001-Bump-the-minimum-memory-requirement-to-768M.patch
 
+# Build against newer versions of Thunderbird and Firefox.
+Patch4:		0001-plugins-thunderbird-Add-more-debug-messages.patch
+Patch5:		0002-plugins-thunderbird-Fix-formatting-in-plugin.js.patch
+Patch6:		0003-plugins-thunderbird-Port-to-Thunderbird-24.patch
+Patch7:		0004-plugins-thunderbird-Escape-folder-names-in-URIs.patch
+Patch8:		0005-Trackerbird-added-UI-localization.patch
+Patch9:		0006-Trackerbird-Add-fr-FR-and-es-ES-locales.patch
+Patch10:	0007-build-update-firefox-and-thunderbird-detection.patch
+
 BuildRequires:	poppler-glib-devel libxml2-devel libgsf-devel libgxps-devel
 BuildRequires:	libuuid-devel
 BuildRequires:	nautilus-devel
@@ -137,6 +146,13 @@ This package contains the documentation for tracker
 %patch1 -p1 -b .onlyshowin
 %patch2 -p1 -b .fts
 %patch3 -p1 -b .memory
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
 
 ## nuke unwanted rpaths, see also
 ## https://fedoraproject.org/wiki/Packaging/Guidelines#Beware_of_Rpath
@@ -145,6 +161,8 @@ sed -i -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure
 %build
 %configure --disable-static		\
 	--enable-gtk-doc		\
+	--enable-libflac		\
+	--enable-libvorbis		\
 	--enable-miner-evolution=no	\
 	--with-firefox-plugin-dir=%{_libdir}/firefox/extensions		\
 %if 0%{?with_thunderbird}
@@ -158,7 +176,7 @@ sed -i -e 's|"/lib /usr/lib|"/%{_lib} %{_libdir}|' configure
 make V=1 %{?_smp_mflags}
 
 %install
-make DESTDIR=%{buildroot} install
+make DESTDIR=%{buildroot} INSTALL="install -p" install
 
 mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
 echo "%{_libdir}/tracker-0.16"	\
@@ -264,6 +282,11 @@ fi
 %{_datadir}/gtk-doc/html/ontology/
 
 %changelog
+* Wed Sep 24 2014 David King <amigadave at amigadave.com> - 0.16.4-2
+- Enable FLAC and Vorbis extractors
+- Build against newer versions of Thunderbird and Firefox
+- Preserve timestamps during install
+
 * Sun Nov 24 2013 Kalev Lember <kalevlember at gmail.com> - 0.16.4-1
 - Update to 0.16.4
 


More information about the scm-commits mailing list