#!/usr/bin/make -f

include /usr/share/dpkg/default.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --buildsystem=qmake6

override_dh_auto_configure:
	dh_auto_configure -- VERSION=$(DEB_VERSION_UPSTREAM) PREFIX=/usr

# The .qm files are compiled by lrelease from a system() call in
# screen_shot_recorder.pro; make sure that step did not fail silently.
execute_after_dh_auto_build:
	test -n "$$(ls translations/*.qm 2>/dev/null)"

execute_after_dh_auto_clean:
	rm -f translations/*.qm

# The deepin-manual application is not packaged in Debian; do not ship
# its assets (about 14 MB).
execute_after_dh_auto_install:
	rm -rf debian/deepin-screen-recorder/usr/share/deepin-manual
