#!/usr/bin/make -f
# -*- makefile -*-

#export DH_VERBOSE=1

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

export OSLO_PACKAGE_VERSION=$(VERSION)

override_dh_auto_clean:
	echo $(VERSION) > cinderclient/versioninfo
	dh_auto_clean
	rm -f cinderclient/versioninfo
	rm -rf setuptools_git-*.egg
	rm -rf build

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

override_dh_install:
	dh_install
	install -D -m 0644 tools/cinder.bash_completion $(CURDIR)/debian/python-cinderclient/etc/bash_completion.d/cinder.bash_completion

%:
	dh $@  --with python2

ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	./run_tests.sh -P -N || true
	#python setup.py testr --slowest --testr-args='--subunit  '
endif

# Commands not to run
override_dh_installcatalogs:
override_dh_installemacsen override_dh_installifupdown:
override_dh_installinfo override_dh_installmenu override_dh_installmime:
override_dh_installmodules override_dh_installlogcheck:
override_dh_installpam override_dh_installppp override_dh_installudev override_dh_installwm:
override_dh_installxfonts override_dh_gconf override_dh_icons override_dh_perl override_dh_usrlocal:
