From d5e24c67d494e20944894e5a0c923eeb81c2d92a Mon Sep 17 00:00:00 2001
From: Thomas Goirand <thomas@goirand.fr>
Date: Fri, 16 Nov 2012 14:58:53 +0000
Subject: [PATCH] Move some stuff to pkgos.make

Rewritten-From: 8163782ab99099a7316759defb0f53eb06787ba4
---
 xenial/debian/control |  1 +
 xenial/debian/rules   | 39 +--------------------------------------
 2 files changed, 2 insertions(+), 38 deletions(-)

diff --git a/xenial/debian/control b/xenial/debian/control
index 412651b5a..4692005a5 100644
--- a/xenial/debian/control
+++ b/xenial/debian/control
@@ -10,6 +10,7 @@ Uploaders: Loic Dachary (OuoU) <loic@debian.org>,
 Build-Depends: debhelper (>= 8.0.0),
  po-debconf,
  python-all (>= 2.6.6-3~),
+ openstack-pkg-tools
 Build-Depends-Indep:
  openstack-pkg-tools,
  pep8,
diff --git a/xenial/debian/rules b/xenial/debian/rules
index 372f47103..6c639c7a4 100755
--- a/xenial/debian/rules
+++ b/xenial/debian/rules
@@ -1,10 +1,6 @@
 #!/usr/bin/make -f
 
-# Find upstream version (to be used later in this file)
-DEBVERS := $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p')
-VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/^[[:digit:]]*://' -e 's/[~-].*//')
-DEBFLAVOR :=$(shell dpkg-parsechangelog | grep -E ^Distribution: | cut -d" " -f2)
-DEBPKGNAME :=$(shell dpkg-parsechangelog | grep -E ^Source: | cut -d" " -f2)
+include /usr/share/openstack-pkg-tools/pkgos.make
 
 %:
 	dh $@  --with python2
@@ -38,39 +34,6 @@ override_dh_fixperms:
 	dh_fixperms
 	chmod 0440 $(CURDIR)/debian/cinder-common/etc/sudoers.d/cinder-common
 
-# Checkout master repo and create the orig.tar.xz
-get-vcs-source:
-	git remote add upstream git://github.com/openstack/$(DEBPKGNAME).git || true
-	git fetch upstream
-	git archive --prefix=$(DEBPKGNAME)-$(VERSION)/ $(VERSION) | xz >../$(DEBPKGNAME)_$(VERSION).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 \
-		echo -n $$i": " ; \
-		msgfmt -o /dev/null --statistic $$i ; \
-	done
-
-call-for-po-trans:
-	podebconf-report-po --call --withtranslators --languageteam
-
-
-regen-manifest-patch:
-	quilt pop -a || true
-	quilt push install-missing-files.patch
-	git checkout MANIFEST.in
-	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
-
 override_dh_auto_build:
 	dh_auto_build
 
-- 
2.45.2