#!/usr/bin/make -f

#export DH_VERBOSE=1

include /usr/share/openstack-pkg-tools/pkgos.make

export OSLO_PACKAGE_VERSION=$(VERSION)

%:
	dh $@  --with python2

override_dh_auto_configure:
	echo $(VERSION) > heatclient/versioninfo
	dh_auto_configure

override_dh_auto_clean:
	dh_auto_clean
	rm -f heatclient/versioninfo
	rm -rf setuptools_git-*-py*.egg/

override_dh_install:
	dh_install
	rm -rf $(CURDIR)/debian/python-heatclient/usr/heatclient

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	python setup.py testr --slowest
endif

override_dh_gencontrol:
	if [ `lsb_release -a | grep Release | awk '{print $$2}'` = "7.0" ] ; then \
		dh_gencontrol -- -T$(CURDIR)/debian/wheezy_deps ; \
	else \
		dh_gencontrol ; \
	fi
