[Pkg-cli-apps-commits] r4126 - in /packages/gnome-do-plugins/trunk/debian: changelog patches/00_dfsg_autofoo.dpatch patches/00list patches/01_firefox_iceweasel_rename.dpatch rules watch

raof-guest at users.alioth.debian.org raof-guest at users.alioth.debian.org
Thu Aug 28 00:35:35 UTC 2008


Author: raof-guest
Date: Thu Aug 28 00:35:35 2008
New Revision: 4126

URL: http://svn.debian.org/wsvn/pkg-cli-apps/?sc=1&rev=4126
Log:
* Repack the upstream tarball to strip shipped binaries:
 + Modify get-orig-source to do this
 + Patch the buildsystem
 + Add versionmangle to watchfile
* Export temporary XDG_CONFIG_HOME to make mdtool happy
* Update iceweasel patch for new version

Added:
    packages/gnome-do-plugins/trunk/debian/patches/00_dfsg_autofoo.dpatch   (with props)
Modified:
    packages/gnome-do-plugins/trunk/debian/changelog
    packages/gnome-do-plugins/trunk/debian/patches/00list
    packages/gnome-do-plugins/trunk/debian/patches/01_firefox_iceweasel_rename.dpatch
    packages/gnome-do-plugins/trunk/debian/rules
    packages/gnome-do-plugins/trunk/debian/watch

Modified: packages/gnome-do-plugins/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-cli-apps/packages/gnome-do-plugins/trunk/debian/changelog?rev=4126&op=diff
==============================================================================
--- packages/gnome-do-plugins/trunk/debian/changelog (original)
+++ packages/gnome-do-plugins/trunk/debian/changelog Thu Aug 28 00:35:35 2008
@@ -1,13 +1,27 @@
-gnome-do-plugins (0.6.0.0-1) UNRELEASED; urgency=low
+gnome-do-plugins (0.6.0.0+dfsg-1) UNRELEASED; urgency=low
 
   * New upstream version
   * debian/control
     + Refresh build-depends
     + Don't Suggest amarok, the plugin is no longer built
+  * debian/rules
+    + Remove --disable-banshee and --disable-amarok from the configure flags.
+      These plugins are no longer built upstream.
+    + Expand get-orig-source to strip the binary DLLs from the source tarball
+    + Run autoreconf after patching to not build plugins dependent on the
+      shipped binary libs.
+    + Make a copy the original Makefile.in & configure before patching and 
+      copy back on clean.
+    + Export a temporary XDG_CONFIG_HOME.  The build uses mdtool, which wants 
+      to write to $XDG_CONFIG_HOME.
+  * debian/patches/00_dfsg_autofoo
+    + Remove the plugins that depend on the shipped binaries from the build
+  * debian/patches/01_firefox_iceweasel_rename
+    + Refresh for new version
   * debian/watch
-    + Update for new upstream location
+    + Update for new upstream location, add version mangle for dfsg
 
- -- Christopher James Halse Rogers <raof at ubuntu.com>  Mon, 25 Aug 2008 08:31:29 +1000
+ -- Christopher James Halse Rogers <raof at ubuntu.com>  Thu, 28 Aug 2008 10:15:00 +1000
 
 gnome-do-plugins (0.4.0-1) unstable; urgency=low
 

Added: packages/gnome-do-plugins/trunk/debian/patches/00_dfsg_autofoo.dpatch
URL: http://svn.debian.org/wsvn/pkg-cli-apps/packages/gnome-do-plugins/trunk/debian/patches/00_dfsg_autofoo.dpatch?rev=4126&op=file
==============================================================================
--- packages/gnome-do-plugins/trunk/debian/patches/00_dfsg_autofoo.dpatch (added)
+++ packages/gnome-do-plugins/trunk/debian/patches/00_dfsg_autofoo.dpatch Thu Aug 28 00:35:35 2008
@@ -1,0 +1,65 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 00_dfsg_autofoo.dpatch by Christopher James Halse Rogers <raof at ubuntu.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Don't build plugins that depend on the binary DLLs that we strip from
+## DP: the tarball.
+
+ at DPATCH@
+diff -urNad gnome-do-plugins-0.6.0.0+dfsg~/Makefile.am gnome-do-plugins-0.6.0.0+dfsg/Makefile.am
+--- gnome-do-plugins-0.6.0.0+dfsg~/Makefile.am	2008-08-11 14:33:41.000000000 +1000
++++ gnome-do-plugins-0.6.0.0+dfsg/Makefile.am	2008-08-28 07:34:11.000000000 +1000
+@@ -1,7 +1,7 @@
+ ACLOCAL_AMFLAGS = -I m4 -I m4/shamrock
+ EXTRA_DIST = COPYING COPYRIGHT AUTHORS
+ 
+-SUBDIRS = po BundledLibraries \
++SUBDIRS = po \
+ 	Archive \
+ 	del.icio.us \
+ 	DiskMounter \
+@@ -10,8 +10,6 @@
+ 	File \
+ 	Firefox \
+ 	Flickr \
+-	GCalendar \
+-	GMailContacts \
+ 	GNOME-Dictionary \
+ 	GNOME-Screenshot \
+ 	GNOME-Session \
+@@ -25,7 +23,6 @@
+ 	Pastebin \
+ 	Pidgin \
+ 	Rhythmbox \
+-	Riptide \
+ 	RSS \
+ 	Shelf \
+ 	SSH \
+diff -urNad gnome-do-plugins-0.6.0.0+dfsg~/configure.ac gnome-do-plugins-0.6.0.0+dfsg/configure.ac
+--- gnome-do-plugins-0.6.0.0+dfsg~/configure.ac	2008-08-23 21:06:45.000000000 +1000
++++ gnome-do-plugins-0.6.0.0+dfsg/configure.ac	2008-08-28 07:34:35.000000000 +1000
+@@ -110,8 +110,6 @@
+ File/Makefile
+ Firefox/Makefile
+ Flickr/Makefile
+-GCalendar/Makefile
+-GMailContacts/Makefile
+ GNOME-Dictionary/Makefile
+ GNOME-Screenshot/Makefile
+ GNOME-Session/Makefile
+@@ -125,7 +123,6 @@
+ Pastebin/Makefile
+ Pidgin/Makefile
+ Rhythmbox/Makefile
+-Riptide/Makefile
+ RSS/Makefile
+ Shelf/Makefile
+ SSH/Makefile
+@@ -138,7 +135,6 @@
+ WindowManager/Makefile
+ Makefile
+ po/Makefile.in
+-BundledLibraries/Makefile
+ ])
+ 
+ AC_OUTPUT

Propchange: packages/gnome-do-plugins/trunk/debian/patches/00_dfsg_autofoo.dpatch
------------------------------------------------------------------------------
    svn:executable = *

Modified: packages/gnome-do-plugins/trunk/debian/patches/00list
URL: http://svn.debian.org/wsvn/pkg-cli-apps/packages/gnome-do-plugins/trunk/debian/patches/00list?rev=4126&op=diff
==============================================================================
--- packages/gnome-do-plugins/trunk/debian/patches/00list (original)
+++ packages/gnome-do-plugins/trunk/debian/patches/00list Thu Aug 28 00:35:35 2008
@@ -1,1 +1,2 @@
-01_firefox_iceweasel_rename
+00_dfsg_autofoo
+01_firefox_iceweasel_rename

Modified: packages/gnome-do-plugins/trunk/debian/patches/01_firefox_iceweasel_rename.dpatch
URL: http://svn.debian.org/wsvn/pkg-cli-apps/packages/gnome-do-plugins/trunk/debian/patches/01_firefox_iceweasel_rename.dpatch?rev=4126&op=diff
==============================================================================
--- packages/gnome-do-plugins/trunk/debian/patches/01_firefox_iceweasel_rename.dpatch (original)
+++ packages/gnome-do-plugins/trunk/debian/patches/01_firefox_iceweasel_rename.dpatch Thu Aug 28 00:35:35 2008
@@ -9,15 +9,73 @@
 ## DP: either path.
 
 @DPATCH@
-diff -urNad trunk~/OpenSearch/src/FirefoxOpenSearchFileProvider.cs trunk/OpenSearch/src/FirefoxOpenSearchFileProvider.cs
---- trunk~/OpenSearch/src/FirefoxOpenSearchFileProvider.cs	2008-03-14 09:01:34.000000000 +0000
-+++ trunk/OpenSearch/src/FirefoxOpenSearchFileProvider.cs	2008-05-25 23:10:15.000000000 +0100
-@@ -31,7 +31,7 @@
- 		{		
- 			System.Diagnostics.Process locate = new System.Diagnostics.Process ();
- 			locate.StartInfo.FileName = "locate";
--			locate.StartInfo.Arguments = @"-r ^.*firefox.*/searchplugins/.*\.xml$";
-+			locate.StartInfo.Arguments = @"-r ^.*{firefox|iceweasel}.*/searchplugins/.*\.xml$";
- 			locate.StartInfo.RedirectStandardOutput = true;
- 			locate.StartInfo.UseShellExecute = false;
- 			try {
+diff -urNad gnome-do-plugins-0.6.0.0+dfsg~/OpenSearch/src/FirefoxOpenSearchDirectoryProvider.cs gnome-do-plugins-0.6.0.0+dfsg/OpenSearch/src/FirefoxOpenSearchDirectoryProvider.cs
+--- gnome-do-plugins-0.6.0.0+dfsg~/OpenSearch/src/FirefoxOpenSearchDirectoryProvider.cs	2008-08-01 08:29:50.000000000 +1000
++++ gnome-do-plugins-0.6.0.0+dfsg/OpenSearch/src/FirefoxOpenSearchDirectoryProvider.cs	2008-08-28 08:23:03.000000000 +1000
+@@ -35,6 +35,9 @@
+ 	/// </summary>
+ 	public class FirefoxOpenSearchDirectoryProvider
+ 	{
++		private static string firefoxPath = "/usr/bin/firefox";
++		private static string iceweaselPath = "/usr/bin/iceweasel";
++		
+ 		private List<string> openSearchPluginDirectories;
+ 		
+ 		/// <summary>
+@@ -78,11 +81,17 @@
+ 				// for installing in different directories. We could certainly shell
+ 				// out and call which or something...
+ 				string beginLibDir = "LIBDIR=";
+-				string binFile = "/usr/bin/firefox";
++				string binFile = "";
+ 				string line, libDir;		
+ 				
+ 				libDir = null;
+ 				
++				if (File.Exists (firefoxPath)) {
++					binFile = firefoxPath;
++				} else if (File.Exists (iceweaselPath)) {
++					binFile = iceweaselPath;
++				}
++				
+ 				using (StreamReader r = File.OpenText (binFile)) {
+ 					while (null != (line = r.ReadLine ())) {
+ 						if (line.StartsWith (beginLibDir)) {
+@@ -105,6 +114,18 @@
+ 			return null;
+ 		}
+ 		
++		private string UserBrowserPath {
++			get {
++				string mozillaPath = Path.Combine (Paths.UserHome, ".mozilla");
++				if (Directory.Exists (Path.Combine (mozillaPath, "firefox"))) {
++				    mozillaPath = Path.Combine (mozillaPath, "firefox");
++				} else if (Directory.Exists (Path.Combine (mozillaPath, "iceweasel"))) {
++					mozillaPath = Path.Combine (mozillaPath, "iceweasel");
++				}
++				return mozillaPath;
++			}
++		}
++			
+ 		/// <summary>
+ 		/// Retrieves the profile plugin directory, which is where the 
+ 		/// user installed OpenSearch plugins are located.
+@@ -122,7 +143,7 @@
+ 				
+ 				profile = null;				
+ 				
+-				profilePath = Path.Combine (Paths.UserHome, ".mozilla/firefox/profiles.ini");
++				profilePath = Path.Combine (UserBrowserPath, "profiles.ini");
+ 				using (StreamReader r = File.OpenText (profilePath)) {
+ 					while (null != (line = r.ReadLine ())) {
+ 						if (line.StartsWith (beginDefaultProfile)) break;
+@@ -135,8 +156,7 @@
+ 				}
+ 							
+ 				if(profile != null) {
+-					string path = Path.Combine (Paths.UserHome, ".mozilla/firefox");
+-					path = Path.Combine (path, profile);
++					string path = Path.Combine (UserBrowserPath, profile);
+ 					path = Path.Combine (path, "searchplugins");
+ 				
+ 					return path;

Modified: packages/gnome-do-plugins/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-cli-apps/packages/gnome-do-plugins/trunk/debian/rules?rev=4126&op=diff
==============================================================================
--- packages/gnome-do-plugins/trunk/debian/rules (original)
+++ packages/gnome-do-plugins/trunk/debian/rules Thu Aug 28 00:35:35 2008
@@ -8,17 +8,30 @@
 include /usr/share/cli-common/cli.make
 include /usr/share/dpatch/dpatch.make
 
-build: build-stamp
+# mdtool for some reason wants to write to $XDG_CONFIG_HOME
+# Set this to something we can write to during the build
+TEMP_CONFIG = $(CURDIR)/build-temp-config
+export XDG_CONFIG_HOME=$(TEMP_CONFIG)
 
-build-stamp:
-	dh build --before configure
-	# disable some plugins as requested by upstream
-	dh_auto_configure -- --disable-banshee-plugin --disable-amarok-plugin
-	dh build --after configure
+configure: configure-stamp
+
+configure-stamp: configure.upstream Makefile.in.upstream patch-stamp
+	autoreconf -I m4/shamrock
 	touch $@
 
-clean: unpatch
+%.upstream:
+	mv $(basename $@) $@
+
+build: configure
 	dh $@
+
+clean: realclean unpatch
+	[ -f configure.upstream ] && mv configure.upstream configure || true
+	[ -f Makefile.in.upstream ] && mv Makefile.in.upstream Makefile.in || true
+
+realclean:
+	dh clean
+	rm -rf $(TEMP_CONFIG)
 
 install: build
 	dh $@
@@ -28,7 +41,7 @@
 
 binary-indep: install
 	dh $@
-	
+
 # provide a target,  it does nothing but depend upon build as per policy
 binary-arch: build
 
@@ -38,10 +51,26 @@
 # how portable/version independent it is.
 # This magic care of Emmet Hickory:
 # (http://lists.debian.org/debian-devel-games/2008/02/msg00135.html)
-get-orig-source:
-	uscan --download --package gnome-do-plugins --destdir=$(CURDIR) \
+
+TEMP_DIR := $(shell mktemp -d)
+SOURCE_DIR = $(word 1, $(shell ls -d --group-directories-first $(TEMP_DIR)/*))
+SOURCE_VER = $(shell echo $(notdir $(SOURCE_DIR)) | sed s/gnome-do-plugins-//)
+
+download-tarball:
+	uscan --download --package gnome-do-plugins --destdir=$(TEMP_DIR) \
 	      --no-symlink --upstream-version 0 --watchfile=$(dir $(_))/watch
+	cd $(TEMP_DIR) && tar xzvf *.tar.gz
 
-%:
-	dh $@
-	
+strip-shipped-binaries: download-tarball
+	rm -r $(SOURCE_DIR)/BundledLibraries
+
+repack-source: strip-shipped-binaries
+	cd $(TEMP_DIR) && \
+		tar czvf gnome-do-plugins_$(SOURCE_VER)+dfsg.orig.tar.gz \
+			$(notdir $(SOURCE_DIR))
+
+get-orig-source: repack-source
+	mv $(TEMP_DIR)/gnome-do-plugins_$(SOURCE_VER)+dfsg.orig.tar.gz $(CURDIR)
+	rm -r $(TEMP_DIR)
+
+.PHONY: configure build clean install binary binary-indep binary-arch download-tarball strip-shipped-binaries repack-source get-orig-source patch

Modified: packages/gnome-do-plugins/trunk/debian/watch
URL: http://svn.debian.org/wsvn/pkg-cli-apps/packages/gnome-do-plugins/trunk/debian/watch?rev=4126&op=diff
==============================================================================
--- packages/gnome-do-plugins/trunk/debian/watch (original)
+++ packages/gnome-do-plugins/trunk/debian/watch Thu Aug 28 00:35:35 2008
@@ -1,3 +1,4 @@
 version=3
 
+opts=dversionmangle=s/\+dfsg$// \
 https://launchpad.net/do-plugins/+download http://launchpad.net/do-plugins/.*/.*/\+download/gnome-do-plugins-(.*).tar.gz




More information about the Pkg-cli-apps-commits mailing list