#!/usr/bin/make -f

#DH_VERBOSE = 1
include /usr/share/dpkg/default.mk

export LC_ALL=C.UTF-8

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

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	PYTHONPATH=$(CURDIR) nosetests3 -v --where=circlator/tests
endif

override_dh_installexamples:
	dh_installexamples
	cd debian/$(DEB_SOURCE)/usr/share/doc/$(DEB_SOURCE)/examples && tar caf data.tar.xz data --owner=0 --group=0 --numeric-owner --sort=name --mode=a+rX,og-w && rm -rf data
