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

export DH_VERBOSE=1

export PYBUILD_NAME=stats_collector
export PYBUILD_DISABLE=test
export PYBUILD_DESTDIR_python3=debian/stats-collector

%:
	dh "$@" --with=python3 --buildsystem=pybuild

#override_dh_auto_clean:
#	# avoid unsupported option "-a"
#	python setup.py clean
#
#override_dh_auto_install:
#	python setup.py install \
#		--no-check-deps \
#		--no-record \
#		--root=$(ROOT) \
#		--prefix=/usr \
#		--install-sysconf=/etc \
#		--install-localstate=/var
#
##		--install-purelib=/usr/share/ginger/ginger/apps
#
#	#ln -s collect_stats $(ROOT)/usr/bin/collect_stats.py
#	rm -rf $(ROOT)/usr/share/doc/stats_collector

override_dh_install:
	dh_install
	mkdir -p debian/stats-collector/usr/lib/python3/dist-packages/stats_collector/etc/
	cp stats_collector_cfg.py \
	    debian/stats-collector/usr/lib/python3/dist-packages/stats_collector/etc/stats_collector_cfg.py
	mv debian/stats-collector/usr/bin/collect_stats.py \
	    debian/stats-collector/usr/bin/collect_stats

