#!/usr/bin/make -f

# Enable additional hardening options.
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export QT_SELECT=5

%:
	dh $@ --with=kf5

QTBUILD=buildqt

override_dh_auto_clean:
	# Clean up the KDE build (cmake)
	dh_auto_clean -Skf5
	# Clean up the Qt build (qmake)
	dh_auto_clean -B$(QTBUILD) -Sqmake

override_dh_auto_configure:
	# configure the KDE version (cmake)
	dh_auto_configure -Skf5 -- -DCMAKE_POLICY_VERSION_MINIMUM=3.5
	# configure the Qt version (qmake)
	dh_auto_configure -B$(QTBUILD) -Sqmake -- ../qtikz.pro

override_dh_auto_build:
	# build the KDE version (cmake)
	dh_auto_build -Skf5
	# build the Qt version (qmake)
	dh_auto_build -B$(QTBUILD) -Sqmake

override_dh_auto_install:
	# install the KDE version (cmake)
	dh_auto_install -Skf5 --destdir=debian/ktikz
	# install the Qt version (qmake)
	dh_auto_install -B$(QTBUILD) -Sqmake --destdir=debian/qtikz
	rm $(CURDIR)/debian/qtikz/usr/share/qtikz/LICENSE.GPL2

.PHONY: override_dh_auto_clean override_dh_auto_configure override_dh_auto_build override_dh_auto_install
