#!/usr/bin/make -f

# DH_VERBOSE := 1

export PYBUILD_AFTER_INSTALL=\
	ln -s /usr/share/javascript/bootstrap/js/bootstrap.min.js \
	    {destdir}/{install_dir}/q2templates/templates/assets/js/bootstrap.min.js; \
	ln -s /usr/share/javascript/jquery/jquery.min.js \
	    {destdir}/{install_dir}/q2templates/templates/assets/js/jquery.min.js; \
	ln -s /usr/share/javascript/bootstrap/css/bootstrap.min.css \
	    {destdir}/{install_dir}/q2templates/templates/assets/css/bootstrap.min.css; \
	ln -s /usr/share/javascript/normalize.css/normalize.css \
	    {destdir}/{install_dir}/q2templates/templates/assets/css/normalize.css; \
	ln -s /usr/share/javascript/bootstrap/fonts \
	    {destdir}/{install_dir}/q2templates/templates/assets/fonts

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

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_test -- -s custom --test-args="cd {build_dir}; py.test-3"
endif

override_dh_auto_clean:
	dh_auto_clean
	rm -rf .pybuild
	rm -f q2templates.egg-info/PKG-INFO q2templates.egg-info/SOURCES.txt q2templates.egg-info/dependency_links.txt q2templates.egg-info/not-zip-safe q2templates.egg-info/top_level.txt
