#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/architecture.mk

# python3.X, see pybuild for their meaning.
export _PYTHON_HOST_PLATFORM:=${DEB_HOST_ARCH_OS}-${DEB_HOST_ARCH}
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
	export _PYTHON_SYSCONFIGDATA_NAME:=_sysconfigdata__${DEB_HOST_ARCH_OS}_${DEB_HOST_MULTIARCH}
endif

%:
	dh $@ --with python3
	
execute_after_dh_auto_clean:
	rm -rf build-qt6
	rm -rf build-qt5

override_dh_auto_configure:
	dh_auto_configure --builddirectory=build-qt6 -- --enable-static --enable-languages="python cpp qt6" --infodir=/usr/share/info
	dh_auto_configure --builddirectory=build-qt5 -- --enable-static --infodir=/usr/share/info

override_dh_auto_build:
	dh_auto_build --builddirectory=build-qt6
	dh_auto_build --builddirectory=build-qt5

override_dh_auto_install:
	dh_auto_install --builddirectory=build-qt6
	dh_auto_install --builddirectory=build-qt5

override_dh_missing:
	dh_missing -X.la -Xinfo/dir -X.pyc -Xinstall_files.txt -X__pycache__ -Xgpgme-json
	dh_missing -X.la -Xinfo/dir -X.pyc -Xinstall_files.txt -X__pycache__ -Xgpgme-json

override_dh_makeshlibs:
	dh_makeshlibs -V
	dh_makeshlibs -V

override_dh_installdocs:
	dh_installdocs -X.md5
	dh_installdocs -X.md5









override_dh_auto_test:
	dh_auto_test --no-parallel
	dh_auto_test --no-parallel --builddirectory=build-Qt6
