#!/usr/bin/make -f
# SPDX-License-Identifier: LGPL-2.0-or-later
# # SPDX-FileCopyrightText: 2023 Jonathan Riddell <jr@jriddell.org>

#!/usr/bin/make -f
BUILDDIR = $(CURDIR)/debian/build
%:
	dh $@ --with kf6 --buildsystem kf6 --builddirectory=$(BUILDDIR)

override_dh_auto_configure:
	dh_auto_configure -- -DHEAPTRACK_BUILD_PRINT=ON -DHEAPTRACK_BUILD_GUI=ON -DHEAPTRACK_USE_QT6=ON

# Unittests are disabled on mips due to build failures
# It looks like the crash is happening in libunwind,
# needs to be investigated
#
# https://sources.debian.net/src/libunwind/1.1-4.1/debian/rules/#L34
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
ifneq (mips, $(DEB_BUILD_ARCH))
override_dh_auto_install:
	dh_auto_install
	cd $(BUILDDIR) ; $(MAKE) test ARGS=-VV
endif # amd64
endif # nocheck

override_dh_auto_test:
