diff -u rubber-1.1/debian/rules rubber-1.1/debian/rules --- rubber-1.1/debian/rules +++ rubber-1.1/debian/rules @@ -3,19 +3,47 @@ # original file: GNU copyright 1997 to 1999 by Joey Hess. # adaptation: (c) 2002--2006 by Emmanuel Beffara. +# Apply patches to the package +patch: patch-stamp +patch-stamp: + dh_testdir + @patches=debian/patches/*.patch; for patch in $$patches; do \ + test -f $$patch || continue; \ + echo "Applying $$patch"; \ + patch -stuN -p1 < $$patch || exit 1; \ + done + touch $@ + +# Remove patches from the package +unpatch: + dh_testdir + @if test -f patch-stamp; then \ + patches=debian/patches/*.patch; \ + for patch in $$patches; do \ + reversepatches="$$patch $$reversepatches"; \ + done; \ + for patch in $$reversepatches; do \ + test -f $$patch || continue; \ + echo "Reversing $$patch"; \ + patch -suRf -p1 < $$patch || exit 1; \ + done; \ + rm -f patch-stamp; \ + fi + settings.py: configure dh_testdir ./configure --python=python --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info -build: build-stamp +build: patch-stamp build-stamp build-stamp: settings.py dh_testdir $(MAKE) touch build-stamp -clean: +clean: clean-source unpatch +clean-source: dh_testdir dh_testroot rm -f build-stamp @@ -53 +81,2 @@ -.PHONY: build clean binary-indep binary install +.PHONY: patch unpatch build clean binary-indep binary install + diff -u rubber-1.1/debian/changelog rubber-1.1/debian/changelog --- rubber-1.1/debian/changelog +++ rubber-1.1/debian/changelog @@ -1,3 +1,10 @@ +rubber (1.1-2.1ubuntu2) hardy; urgency=low + + * added patching system to debian/rules + * added patch 01_spaces_in_path.patch (LP: #122489) + + -- Koen Beek Tue, 15 Jan 2008 23:44:53 +0100 + rubber (1.1-2.1ubuntu1) gutsy; urgency=low * Remove the .pyc files (LP: #36733) only in patch2: unchanged: --- rubber-1.1.orig/debian/patches/01_spaces_in_path.patch +++ rubber-1.1/debian/patches/01_spaces_in_path.patch @@ -0,0 +1,13 @@ +patch from Wouter Bolsterlee -- https://bugs.launchpad.net/ubuntu/+source/rubber/+bug/122489/comments/1 +--- rubber/src/rules/latex/__init__.py.old 2007-03-12 00:01:34.000000000 +0100 ++++ rubber/src/rules/latex/__init__.py 2007-03-12 00:00:52.000000000 +0100 +@@ -1107,7 +1107,8 @@ + + file = self.source() + cmd = [self.vars["program"]] +- cmd += map(lambda x: x.replace("%s",file), self.cmdline) ++ quoted_file = '"%s"' % file ++ cmd += map(lambda x: x.replace("%s", quoted_file), self.cmdline) + inputs = string.join(self.env.path, ":") + if inputs == "": + env = {}