From 7656dc39ad5d480d22b48b29cd612d086411e934 Mon Sep 17 00:00:00 2001 From: Thomas Goirand Date: Tue, 9 Oct 2012 09:07:29 +0000 Subject: [PATCH] Added a get-vcs-source target and sets compression to use XZ level 9. Rewritten-From: cb536593b3118549957150c8aa1d204d36941f27 --- xenial/debian/rules | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/xenial/debian/rules b/xenial/debian/rules index 01f07a3b5..2076c6de0 100755 --- a/xenial/debian/rules +++ b/xenial/debian/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +# Find upstream version (to be used later in this file) +export UPSTR_VER=$(shell dpkg-parsechangelog | grep Version: | cut -d" " -f2 | cut -d"-" -f1) %: dh $@ --with python2 @@ -14,6 +14,16 @@ override_dh_auto_test: ./run_tests.sh -N -P || true endif +# Checkout master repo and create the orig.tar.xz +get-vcs-source: + git remote add upstream git://github.com/openstack/cinder.git || true + git fetch upstream + git archive --prefix=cinder-$(UPSTR_VER)/ $(UPSTR_VER) | xz >../cinder_$(UPSTR_VER).orig.tar.xz + if ! git checkout master ; then \ + echo "No upstream branch: checking out" ; \ + git checkout -b master upstream/master ; \ + fi + git checkout debian/experimental display-po-stats: cd $(CURDIR)/debian/po ; for i in *.po ; do \ @@ -32,3 +42,7 @@ regen-manifest-patch: git ls-files --no-empty-directory --exclude-standard cinder | grep -v '.py$$' | sed -n 's/.*/include &/gp' >> MANIFEST.in quilt refresh quilt pop -a + +# Enable XZ compression in the .debs +override_dh_builddeb: + dh_builddeb -- -Zxz -z9 -- 2.45.2