#!/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
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
export QT_SELECT := 5
export LANG=C.UTF-8

%:
	dh $@ --buildsystem=qmake

override_dh_auto_configure:
	mkdir -p $(CURDIR)/data/icons/scalable/apps
	mkdir -p $(CURDIR)/data/icons/48x48/apps
	cp $(CURDIR)/../SOURCES/hearts.svg $(CURDIR)/data/icons/scalable/apps/
	rsvg-convert -a -w 48 $(CURDIR)/../SOURCES/hearts.svg -o $(CURDIR)/data/icons/48x48/apps/hearts.png
	cp $(CURDIR)/../SOURCES/hearts.desktop $(CURDIR)/data/
	cp -f $(CURDIR)/../SOURCES/leaves.jpg $(CURDIR)/backgrounds/
	rm -fv $(CURDIR)/languages/translation_*.qm
	dh_auto_configure -- \
		Hearts.pro

override_dh_install:
	dh_install --

override_dh_missing:
	dh_missing --fail-missing
