#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1

include /usr/share/dpkg/default.mk

%:
	dh $@

override_dh_auto_configure:
	# we already defines the flags through dpkg-buildflags, we don't need
	# thus to use relwithdebinfo, which is defining -DNDEBUG which are
	# breaking the tests
	dh_auto_configure --builddirectory=build-qt5 -- -DCMAKE_BUILD_TYPE='' -DENABLE_QT6:BOOL=OFF -DENABLE_UBUNTU_COMPAT=ON
	dh_auto_configure --builddirectory=build-qt6 -- -DCMAKE_BUILD_TYPE='' -DENABLE_QT6:BOOL=ON -DENABLE_UBUNTU_COMPAT=OFF

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

override_dh_auto_test:
	dh_auto_test --no-parallel --builddirectory=build-qt5
	dh_auto_test --no-parallel --builddirectory=build-qt6

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

get-orig-source:
	uscan --noconf --force-download --rename --download-current-version --destdir=..
