From fb743301296d57d7ac3a41df6729a6edaa155666 Mon Sep 17 00:00:00 2001
From: Thomas Goirand <thomas@goirand.fr>
Date: Fri, 16 Nov 2012 17:19:14 +0000
Subject: [PATCH] The package had only Build-Depends:, now setting lots of them
 in Build-Depends-Indep: as it should be.

Rewritten-From: ae01f18fd552140ed8d84ee4a4ec6a7194cb30dd
---
 xenial/debian/changelog |  2 ++
 xenial/debian/compat    |  2 +-
 xenial/debian/control   |  5 ++++-
 xenial/debian/rules     | 21 +--------------------
 4 files changed, 8 insertions(+), 22 deletions(-)

diff --git a/xenial/debian/changelog b/xenial/debian/changelog
index fc8007a..2533086 100644
--- a/xenial/debian/changelog
+++ b/xenial/debian/changelog
@@ -12,6 +12,8 @@ horizon (2012.2-1) experimental; urgency=low
   * Now asking using debconf if we should disable the default apache vhost,
   and activate the Dasboard, and if we should use SSL or not.
   * Added missing dependency on node-less.
+  * The package had only Build-Depends:, now setting lots of them in
+  Build-Depends-Indep: as it should be.
 
  -- Mehdi Abaakouk <sileht@sileht.net>  Sat, 29 Sep 2012 09:38:19 +0200
 
diff --git a/xenial/debian/compat b/xenial/debian/compat
index 45a4fb7..ec63514 100644
--- a/xenial/debian/compat
+++ b/xenial/debian/compat
@@ -1 +1 @@
-8
+9
diff --git a/xenial/debian/control b/xenial/debian/control
index fccff70..746e3fa 100644
--- a/xenial/debian/control
+++ b/xenial/debian/control
@@ -7,7 +7,10 @@ Uploaders: Loic Dachary (OuoU) <loic@debian.org>,
            Thomas Goirand <zigo@debian.org>,
            Ghe Rivero <ghe.rivero@stackops.com>,
            Mehdi Abaakouk <sileht@sileht.net>
-Build-Depends: debhelper (>= 8), python-all (>= 2.6.6-3~), python-setuptools,
+Build-Depends: debhelper (>= 9),
+ python-all (>= 2.6.6-3~),
+ python-setuptools
+Build-Depends-Indep: openstack-pkg-tools,
  pep8,
  python-cloudfiles,
  python-coverage,
diff --git a/xenial/debian/rules b/xenial/debian/rules
index 099ecc1..a31d66a 100755
--- a/xenial/debian/rules
+++ b/xenial/debian/rules
@@ -1,12 +1,8 @@
 #!/usr/bin/make -f
 
-# Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-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
@@ -48,24 +44,9 @@ override_dh_install:
 	ln -s /var/lib/openstack-dashboard/static/js $(CURDIR)/debian/openstack-dashboard/usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/js
 	ln -s /var/lib/openstack-dashboard/static/css $(CURDIR)/debian/openstack-dashboard/usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/css
 
-override_dh_builddeb:
-	dh_builddeb -- -Zxz -z9
-
 override_dh_auto_clean:
 	dh_auto_clean
 	rm -rf $(CURDIR)/static
 	rm -rf $(CURDIR)/horizon/build
 	rm -rf $(CURDIR)/horizon.egg-info
 	rm -rf $(CURDIR)/openstack_dashboard/openstack_dashboard.egg-info
-
-get-vcs-source:
-	git remote add upstream git://github.com/openstack/$(DEBPKGNAME).git || true
-	git fetch upstream
-	if [ ! -f ../$(DEBPKGNAME)_$(VERSION).orig.tar.xz ] ; then \
-		git archive --prefix=$(DEBPKGNAME)-$(VERSION)/ $(VERSION) | xz >../$(DEBPKGNAME)_$(VERSION).orig.tar.xz ; \
-	fi
-	if ! git checkout master ; then \
-		echo "No upstream branch: checking out" ; \
-		git checkout -b master upstream/master ; \
-	fi
-	git checkout debian/experimental
-- 
2.45.2