| author | Gregory Colpart <reg@debian.org> | |
| Sun, 15 Mar 2009 11:15:40 +0000 (12:15 +0100) | ||
| committer | Gregory Colpart <reg@debian.org> | |
| Sun, 15 Mar 2009 15:35:28 +0000 (16:35 +0100) |
| debian/changelog | patch | blob | history | |
| debian/rules | patch | blob | history |
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
horde3 (3.3.3+debian0-1) unstable; urgency=low
* New upstream release.
+ * Add "Git patches" stuff in debian/rules.
- -- Gregory Colpart <reg@debian.org> Sun, 15 Mar 2009 06:24:14 +0100
+ -- Gregory Colpart <reg@debian.org> Sun, 15 Mar 2009 16:33:02 +0100
horde3 (3.2.2+debian0-2) unstable; urgency=high
diff --git a/debian/rules b/debian/rules
--- a/debian/rules
+++ b/debian/rules
# /usr/share/horde3
COPY_EXCLUDE=^(\{arch\}|COPYING|README|po|scripts|config|debian|docs|build-stamp|configure-stamp)$
-configure: configure-stamp
+srcpkg = $(shell dpkg-parsechangelog | sed -ne 's/Source: *//p')
+srcver = $(shell dpkg-parsechangelog | sed -ne 's/Version: *\(.*:\)\?\(.*\)-.*$$/\2/p')
+
+#{{{ generic rules
+
+../$(srcpkg)_$(srcver).orig.tar.gz:
+ @if git rev-parse --git-dir >/dev/null 2>&1; then \
+ pristine-tar checkout $@; \
+ fi
+
+check-tarball: ../$(srcpkg)_$(srcver).orig.tar.gz
+
+.PHONY: check-tarball
+
+#}}}
+#{{{ maintainer stuff
+
+refresh-patches: check-tarball
+ @dh_testdir
+ @echo 'refreshing debian/patches:'
+ @rm -rf '$(CURDIR)'/debian/patches
+ @mkdir -p '$(CURDIR)'/debian/patches
+ @cd '$(CURDIR)'/debian/patches && git format-patch horde-upstream..horde-upstream+patches
+ @echo .
+
+#}}}
+
+patch: patch-stamp check-tarball
+patch-stamp:
+ dh_testdir
+ set -e; test -e patch-stamp || \
+ for i in `ls -1 debian/patches/*.patch || :`; do patch -p1 <$$i > /dev/null; done
+ touch $@
+
+unpatch:
+ dh_testdir
+ set -e; ! test -e patch-stamp || \
+ for i in `ls -1r debian/patches/*.patch || :`; do patch -p1 -R <$$i > /dev/null; done
+ rm -f patch-stamp
+
+configure: configure-stamp patch
configure-stamp:
dh_testdir
# Add here commands to configure the package.
dh_testdir
touch build-stamp
-clean:
+clean: unpatch
dh_testdir
dh_testroot
dh_clean build-stamp configure-stamp
fi
binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+.PHONY: patch unpatch build clean binary-indep binary-arch binary install configure
