#!/usr/bin/make -f

#export DH_VERBOSE=1
export V=1

## Enable compiler hardening flags.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Check if the Qt variant should be build
build_qt = $(shell dh_listpackages | grep "\-qt$$")

%:
	dh $@

override_dh_auto_clean:
	dh_auto_clean
ifneq ($(build_qt),)
	dh_auto_clean --builddirectory=build-qt
endif

override_dh_auto_configure:
	dh_auto_configure -- -DINTERFACE_TYPE=gtk -DENABLE_VERSIONCHECK=0
ifneq ($(build_qt),)
	dh_auto_configure --builddirectory=build-qt -- -DINTERFACE_TYPE=qt6 -DENABLE_VERSIONCHECK=0
endif

override_dh_auto_build:
	dh_auto_build
ifneq ($(build_qt),)
	dh_auto_build --builddirectory=build-qt
endif

override_dh_auto_install:
	dh_auto_install
ifneq ($(build_qt),)
	dh_auto_install --builddirectory=build-qt
endif

