#!/usr/bin/make -f

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
BUILDDIR = $(CURDIR)/debian/build

%:
	dh $@ --with python3 --builddirectory=$(BUILDDIR)

override_dh_auto_configure:
	dh_auto_configure -- \
		-DUSE_SYSTEM_JSONCPP=ON

override_dh_auto_build-indep:
ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES)))
	dh_auto_build -- doc
endif

override_dh_auto_test-indep:

override_dh_auto_install-indep:

override_dh_installdocs-indep:
ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES)))
	dh_installdocs --indep
	dh_doxygen --indep
endif

# No dbgsym packages:
override_dh_strip:
	@echo "not building dbgsym packages for MX Linux"
	dh_strip --no-automatic-dbgsym
