#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE = 1

# 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

export QT_SELECT := 5

include /usr/share/dpkg/default.mk

%:
	dh $@

override_dh_installchangelogs:
	dh_installchangelogs -k CHANGELOG.md

execute_before_dh_clean:
	rm -f platformthemeplugin/.qmake.cache
	rm -f platformthemeplugin/.qmake.stash
	rm -f platformthemeplugin/config.log

execute_after_dh_auto_install:
	# https://github.com/archlinux/svntogit-community/blob/packages/deepin-qt5integration/trunk/PKGBUILD
	find $(CURDIR)/debian/dde-qt5integration/usr/lib/$(DEB_HOST_MULTIARCH)/qt5/plugins/ -type f ! -name '*5.5.so' -delete -print
