#!/usr/bin/make -f
#export DH_VERBOSE = 1

include /usr/share/dpkg/architecture.mk

# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
# package maintainers to append LDFLAGS
export DEB_LDFLAGS_MAINT_APPEND = -W

export QTDIR=/usr/share/qt5
export QT_SELECT=qt5
export DATA_PATH=\"/usr/share/qwinff/\"

%:
	dh $@

override_dh_auto_configure:
	$(DEB_HOST_GNU_TYPE)-qmake -makefile PREFIX=$(shell pwd)/qwinff/usr src/qwinff.pro
	sed -i "s,-DQT_NO_DEBUG,,g" Makefile
	sed -i 's/^CXXFLAGS.*/& -g/g' Makefile

override_dh_auto_build:
	dh_auto_build -- QMAKE=$(DEB_HOST_GNU_TYPE)-qmake

override_dh_auto_install:
	@echo skip install target
