#!/usr/bin/make -f
# -*- makefile -*-

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Skip tests on s390x. The QML unittests crash with floating point exception.
# Pretty sure that is not a problem of lomiri-media-player app. For all other
# architectures in Debian, lomiri-mediaplayer-app builds successfully.
testskip_architectures := s390x

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- -DADD_MPRIS=ON             \
	                     $(NULL)

execute_after_dh_install:
	rm debian/lomiri-mediaplayer-app/usr/share/lomiri-mediaplayer-app/qml/CMakeLists.txt

override_dh_auto_test:
ifneq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(testskip_architectures)))
	dh_auto_test
else
	-dh_auto_test
endif

get-orig-source:
	uscan --noconf --force-download --rename --download-current-version --destdir=..
