#!/usr/bin/make -f

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

# On arm64 the queue-dialog QML test suite (qmltestrunner under Xvfb, driven by
# ctest in dh_auto_test) dies with a segmentation fault in the Qt/Lomiri
# QtQuick stack, while the very same source builds and passes the whole test
# suite on amd64 and loong64 and all binaries of this package build fine.
# Therefore skip the test suite on arm64 only.
ifeq ($(DEB_HOST_ARCH),arm64)
export DEB_BUILD_OPTIONS := $(DEB_BUILD_OPTIONS) nocheck
endif

%:
	dh $@

override_dh_install:
	dh_install
	dh_apparmor -plomiri-printing-app --profile-name=usr.bin.lomiri-printing-app

override_dh_missing:
	dh_missing --fail-missing

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