From a5f6076aa69802c0a4f4a14988af3cbf122e498c Mon Sep 17 00:00:00 2001 From: Ian Beckwith Date: Mon, 7 Sep 2009 01:58:21 +0100 Subject: [PATCH] debian/rules upstream: + use short git hash in package version. + use --depth 1 to clone. --- debian/changelog | 5 ++++- debian/rules | 23 +++++++++++++++-------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index 35095fc57..bca357aa4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,11 @@ gnulib (20090907+1e2ae3a-1) unstable; urgency=low * New Maintainer (closes: #543842). * New upstream snapshot 20090907+1e2ae3a. + * debian/rules upstream: + + use short git hash in package version. + + use --depth 1 to clone. - -- Ian Beckwith Mon, 07 Sep 2009 01:57:04 +0100 + -- Ian Beckwith Mon, 07 Sep 2009 02:00:10 +0100 gnulib (20090801-2) unstable; urgency=low diff --git a/debian/rules b/debian/rules index a5cedfc3b..591ed7033 100755 --- a/debian/rules +++ b/debian/rules @@ -9,14 +9,21 @@ upstream: # Needs: git-core cd .. && \ - git clone git://git.savannah.gnu.org/gnulib.git && \ - mv gnulib gnulib-$(DATE) - - rm -rf ../gnulib-$(DATE)/.git ../gnulib-$(DATE)/.gitattributes - find ../gnulib-$(DATE) -name .cvsignore | xargs rm -f - find ../gnulib-$(DATE) -name .gitignore | xargs rm -f - - tar cfz ../gnulib_$(DATE).orig.tar.gz ../gnulib-$(DATE) + git clone --depth 1 git://git.savannah.gnu.org/gnulib.git gnulib-$(DATE) + ( \ + BUILDDIR="`pwd`" && \ + cd ../gnulib-$(DATE) && \ + VER=`git log -1 --pretty=%h` && \ + cd .. && \ + mv gnulib-$(DATE) gnulib-$(DATE)+$$VER && \ + cd "$$BUILDDIR" && \ + dch -p -v "$(DATE)+$$VER-1" "New upstream snapshot $(DATE)+$$VER." && \ + rm -rf ../gnulib-$(DATE)+$$VER/.git ../gnulib-$(DATE)+$$VER/.gitattributes && \ + find ../gnulib-$(DATE)+$$VER -name .cvsignore | xargs rm -f && \ + find ../gnulib-$(DATE)+$$VER -name .gitignore | xargs rm -f && \ + cd .. && \ + tar cfz gnulib_$(DATE)+$$VER.orig.tar.gz gnulib-$(DATE)+$$VER \ + ) override_dh_auto_clean: $(MAKE) -C doc clean -- 2.11.0