#!/usr/bin/make -f

export DEB_CXXFLAGS_MAINT_APPEND = -DQT_NO_DEBUG_OUTPUT -DQT_NO_WARNING_OUTPUT
export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')

%:
	dh $@ --buildsystem=cmake

override_dh_auto_configure:
	dh_auto_configure -- \
	-DHAVE_VISUALISATIONS=OFF \
	-DBUNDLE_PROJECTM_PRESETS=OFF \
	-DUSE_SYSTEM_PROJECTM=ON \
	-DENABLE_VK=OFF \
	-DFORCE_GIT_REVISION=$(DEB_VERSION)

override_dh_auto_clean:
	rm -f dist/Info.plist
	rm -f dist/clementine.spec
	rm -f dist/maketarball.sh
	rm -f dist/windows/clementine.nsi
	rm -f dist/windows/clementine-portable.nsi
	rm -f src/translations/translations.pot
	dh_auto_clean

override_dh_installchangelogs:
	dh_installchangelogs Changelog

override_dh_auto_test:
