#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export QT_SELECT=qt5

%:
	dh $@ --with=sphinxdoc

override_dh_auto_build:
	dh_auto_build
	/usr/share/sphinx/scripts/python3/sphinx-build -b html docs build/sphinx/html

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	xvfb-run -a ./tests/tests
endif

override_dh_installdocs:
	dh_installdocs -ppyotherside-doc --doc-main-package=qml-module-io-thp-pyotherside
	dh_installdocs --remaining-packages
