From fef3ee57424f08db416cf1f8e6e99588013d6e74 Mon Sep 17 00:00:00 2001 From: Andreas Metzler Date: Mon, 16 Aug 2010 16:29:39 +0200 Subject: [PATCH] patch management with dpkg-source v3 Simplify debian/rules by using dpkg-source v3 (quilt) instead of the home-grown patch system in debian/rules. Change debian/nightly_build.sh to build a non-native package. --- debian/changelog | 1 + debian/nightly_build.sh | 8 ++++- debian/patches/50_def_config_paths.diff | 10 +++--- debian/patches/series | 1 + debian/rules | 48 ++----------------------- debian/source/format | 1 + 6 files changed, 16 insertions(+), 53 deletions(-) create mode 100644 debian/patches/series create mode 100644 debian/source/format diff --git a/debian/changelog b/debian/changelog index 76adb525..8df3eca2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,7 @@ wmaker (0.92.0-9) unstable; urgency=low /usr/share/doc/autotools-dev/README.Debian.gz. * Remove ./libtool on clean, otherwise it is not possible build twice from the same unpacked sourcetree. + * Use dpkg-source v3 instead of home-grown patch system. -- Andreas Metzler Sat, 07 Aug 2010 10:56:00 +0200 diff --git a/debian/nightly_build.sh b/debian/nightly_build.sh index 73316d03..795c3654 100755 --- a/debian/nightly_build.sh +++ b/debian/nightly_build.sh @@ -65,7 +65,12 @@ doEnv() { doChlog() { cp debian/changelog ${CHLOGBKP} - debchange -v ${BASEVERSION}-${REPOVERSION} "${CHANGELOG}" || return 1 + debchange -v ${BASEVERSION}-${REPOVERSION}-1 "${CHANGELOG}" || return 1 +} + +doTarball() { + echo tar -czf ../wmaker_${BASEVERSION}-${REPOVERSION}.orig.tar.gz . + tar -czf ../wmaker_${BASEVERSION}-${REPOVERSION}.orig.tar.gz . } doBuild() { @@ -90,6 +95,7 @@ RC=0 if doPull ; then doEnv doChlog || errorExit "Error adding new changelog entry." + doTarball || errorExit "Error building source tarball." doBuild || errorExit "Error during build of .deb package." else RC=1 diff --git a/debian/patches/50_def_config_paths.diff b/debian/patches/50_def_config_paths.diff index f22603a9..7085485d 100644 --- a/debian/patches/50_def_config_paths.diff +++ b/debian/patches/50_def_config_paths.diff @@ -1,10 +1,8 @@ -Index: src/wconfig.h.in -=================================================================== diff --git a/src/wconfig.h.in b/src/wconfig.h.in -index cab2bd0..e0dc434 100644 ---- src/wconfig.h.in -+++ src/wconfig.h.in -@@ -146,7 +146,7 @@ +index c8bb947..cf06113 100644 +--- a/src/wconfig.h.in ++++ b/src/wconfig.h.in +@@ -132,7 +132,7 @@ */ /* list of paths to look for the config files, searched in order of appearance */ diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 00000000..8d59c97c --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +50_def_config_paths.diff diff --git a/debian/rules b/debian/rules index 695e27c1..b7c5842c 100755 --- a/debian/rules +++ b/debian/rules @@ -111,9 +111,6 @@ COMMON_OPTIONS := --prefix=$(BASEDIR) \ --with-gnustepdir=$(GNUSTEPDIR) \ --with-xft -LIST_PATCHES := find debian/patches -mindepth 1 -maxdepth 1 -name \*.diff -type f | sort -RLIST_PATCHES := find debian/patches -mindepth 1 -maxdepth 1 -name \*.diff -type f | sort -r - install_file := install -p -o root -g root -m 0644 install_prog := install -p -o root -g root -m 0755 install_dir := install -p -d -o root -g root -m 0755 @@ -128,7 +125,7 @@ build-wmaker-stamp: config-wmaker-stamp $(MAKE) -C $(WMAKER_BD) touch $@ -config-wmaker-stamp: patch-wmaker-stamp configure +config-wmaker-stamp: configure dh_testdir test -x config.guess || chmod +x config.guess test -x config.sub || chmod +x config.sub @@ -139,46 +136,6 @@ config-wmaker-stamp: patch-wmaker-stamp configure $(WMAKER_OPTIONS) CFLAGS="$(CFLAGS)" touch $@ -patch-wmaker-stamp: - @$(LIST_PATCHES) | \ - while read patch ; do \ - echo $$patch ; \ - if head -1 $$patch | grep -q ^Index: ; then \ - patch -p0 < $$patch ; \ - else \ - patch -p1 < $$patch ; \ - fi ; \ - echo ; \ - done - touch $@ - -test-patch-wmaker: - @$(LIST_PATCHES) | \ - while read patch ; do \ - echo $$patch ; \ - if head -1 $$patch | grep -q ^Index: ; then \ - patch --dry-run -p0 < $$patch ; \ - else \ - patch --dry-run -p1 < $$patch ; \ - fi ; \ - echo ; \ - done - -unpatch-wmaker: - @if [ -e patch-wmaker-stamp ] ; then \ - $(RLIST_PATCHES) | \ - while read patch ; do \ - echo $$patch ; \ - if head -1 $$patch | grep -q ^Index: ; then \ - patch -p0 -R < $$patch ; \ - else \ - patch -p1 -R < $$patch ; \ - fi ; \ - echo ; \ - done ; \ - rm patch-wmaker-stamp ; \ - fi - clean: dh_testdir dh_testroot @@ -187,7 +144,6 @@ clean: debian/*.files \ debian/shlibs.local \ debian/conffiles - debian/rules unpatch-wmaker dh_clean libtool binary-indep: build @@ -375,4 +331,4 @@ debian/shlibs.local: configure: configure.ac $(TOPSRCDIR)/autogen.sh -.PHONY: binary binary-arch binary-indep binary-custom clean build unpatch-wmaker +.PHONY: binary binary-arch binary-indep binary-custom clean build diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt)