r17978 - in /desktop/experimental/pygobject/debian: changelog rules
lool at users.alioth.debian.org
lool at users.alioth.debian.org
Thu Dec 25 16:06:16 UTC 2008
Author: lool
Date: Thu Dec 25 16:06:16 2008
New Revision: 17978
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=17978
Log:
Rework patch and config.sub/.guess handling: backup config.guess and .sub,
call quilt instead of relying on cdbs' quilt patchsys, restore
config.guess and .sub after unpatching. This avoids config.guess and .sub
in the diff, and allows control over fully working and fully patched
trees.
Modified:
desktop/experimental/pygobject/debian/changelog
desktop/experimental/pygobject/debian/rules
Modified: desktop/experimental/pygobject/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/pygobject/debian/changelog?rev=17978&op=diff
==============================================================================
--- desktop/experimental/pygobject/debian/changelog (original)
+++ desktop/experimental/pygobject/debian/changelog Thu Dec 25 16:06:16 2008
@@ -3,6 +3,11 @@
* Pass PYTHON to $(MAKE) runs for robustness in case of timestamp skews;
thanks Colin Watson; closes: #509192.
* Pass --disable-maintainer-mode to configure.
+ * Rework patch and config.sub/.guess handling: backup config.guess and .sub,
+ call quilt instead of relying on cdbs' quilt patchsys, restore
+ config.guess and .sub after unpatching. This avoids config.guess and .sub
+ in the diff, and allows control over fully working and fully patched
+ trees.
-- Loic Minier <lool at dooz.org> Fri, 19 Dec 2008 15:02:47 +0100
Modified: desktop/experimental/pygobject/debian/rules
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/pygobject/debian/rules?rev=17978&op=diff
==============================================================================
--- desktop/experimental/pygobject/debian/rules (original)
+++ desktop/experimental/pygobject/debian/rules Thu Dec 25 16:06:16 2008
@@ -1,6 +1,5 @@
#!/usr/bin/make -f
-include /usr/share/cdbs/1/rules/patchsys-quilt.mk
include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
-include /usr/share/gnome-pkg-tools/1/rules/gnome-get-source.mk
@@ -21,19 +20,44 @@
PYVERS := $(shell pyversions -vr)
-build-%/configure-stamp: apply-patches
+# how to call quilt
+QUILT := QUILT_PATCHES=$(PATCH_DIR) quilt --quiltrc /dev/null
+
+patch-stamp:
+ dh_testdir
+ # apply patches
+ $(QUILT) push -a || test $$? = 2
+ # backup the original files to restore them in the clean target
+ [ ! -r config.sub ] || \
+ (cp config.sub config.sub.orig && \
+ cp /usr/share/misc/config.sub config.sub)
+ [ ! -r config.guess ] || \
+ (cp config.guess config.guess.orig && \
+ cp /usr/share/misc/config.guess config.guess)
+ touch $@
+
+patch: patch-stamp
+
+unpatch:
+ rm -f patch-stamp
+ # restore files from backup (before unpatching)
+ [ ! -r config.sub.orig ] || \
+ cp config.sub.orig config.sub
+ [ ! -r config.guess.orig ] || \
+ cp config.guess.orig config.guess
+ # unapply patches, if any
+ $(QUILT) pop -a || test $$? = 2
+ rm -rf .pc
+
+build-%/configure-stamp: patch-stamp
dh_testdir
mkdir -p build-$*
- cp config.sub config.sub.back
- cp config.sub config.sub.back
- cp -f /usr/share/misc/config.sub config.sub
- cp -f /usr/share/misc/config.guess config.guess
cd build-$* && \
PYTHON=/usr/bin/python$* CFLAGS="$(CFLAGS)" \
$(CURDIR)/configure $(configure_flags)
touch $@
-dbg-build-%/configure-stamp: apply-patches
+dbg-build-%/configure-stamp: patch-stamp
dh_testdir
mkdir -p dbg-build-$*
cd dbg-build-$* && \
@@ -84,12 +108,11 @@
mv $$i $$(dirname $$i)/$${b}_d.so; \
done
-clean:: reverse-patches
+clean::
dh_testdir
dh_testroot
- rm -Rf build-* dbg-build-*
- -mv config.sub.back config.sub
- -mv config.guess.back config.guess
+ rm -rf build-* dbg-build-*
+ $(MAKE) -f debian/rules unpatch
dh_clean *.pyc */*.pyc
binary-indep: build install
@@ -131,4 +154,4 @@
dh_builddeb -a
binary: binary-arch binary-indep
-.PHONY: build clean binary-indep binary-arch binary build install
+.PHONY: patch unpatch build clean binary-indep binary-arch binary build install
More information about the pkg-gnome-commits
mailing list