#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

export QTDIR=/usr/share/qt5
export QT_SELECT=qt5

# Parallel builds are disabled because the generation of translations/i18n_ru.qm
# in the qmake file is incorrectly ordered.

%:
	dh $@ --buildsystem=qmake --no-parallel

override_dh_auto_clean:
	rm -f .qmake.stash
	rm -f Makefile_QT
	rm -f Resources/translations/i18n_*.qm
	rm -f *.o moc_* qrc_* ui_* FaustWorks Makefile

override_dh_fixperms:
	dh_fixperms
	cd debian/faustworks && \
	chmod 0644 usr/share/FaustWorks/Resources/*
