#!/usr/bin/make -f

# Print all logging info to stdout so it
# shows up in build logs.
export MESON_PRINT_TEST_OUTPUT=1

export QT_SELECT=qt5

%:
	dh $@

override_dh_auto_configure:
	echo "Meson does not need to be configured."

override_dh_auto_build:
	echo "Meson does not need a compile step."

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	./run_tests.py
endif

override_dh_clean:
	dh_clean
	rm -f *.pyc
	rm -rf __pycache__
	rm -rf work\ area
	rm -rf install\ dir/*
	rm -f meson-test-run.txt

override_dh_install:
	./install_meson.py --prefix=/usr --destdir $$(pwd)/debian/tmp
	dh_python3 -V 3.3- -i /usr/share/meson
	dh_install --fail-missing
