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

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- -DCLICK_MODE=OFF

# Skip tests on the archs they are known to be flaky with current configuration
testskip_architectures := arm64 powerpc

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

override_dh_install:
	dh_install

	# drop autopilot test files
	rm debian/lomiri-terminal-app/usr/lib/python3 -Rfv

	# drop migration tests
	rm debian/lomiri-terminal-app/usr/share/lomiri-terminal-app/lomiri-terminal-app-migrate.py

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