#!/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_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	bash run_tests.sh -N || true
endif

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

override_dh_clean:
	echo $(VERSION) > keystoneclient/versioninfo
	dh_clean
	rm -f keystoneclient/versioninfo

override_dh_auto_clean:
	rm -rf python_keystoneclient.egg-info build

override_dh_auto_install:
	dh_auto_install
	install -D -m 0644 tools/keystone.bash_completion $(CURDIR)/debian/python-keystoneclient/etc/bash_completion.d/keystone.bash_completion
	rm -rf $(CURDIR)/debian/python-keystoneclient/usr/keystoneclient
