#!/usr/bin/make -f

# See debhelper(7) (uncomment to enable).
# Output every command that modifies files on the build system.

export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

#export DH_VERBOSE = 1


# See FEATURE AREAS in dpkg-buildflags(1).
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# See ENVIRONMENT in dpkg-buildflags(1).
# Package maintainers to append CFLAGS.
#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
# Package maintainers to append LDFLAGS.
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed


%:
	dh $@ -Scmake+ninja


# dh_make generated override targets.
# This is an example for Cmake (see <https://bugs.debian.org/641051>).
#override_dh_auto_configure:
#	dh_auto_configure -- \
#	-DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)

override_dh_auto_configure:
	dh_auto_configure -- \
	-D USE_UPDATES=OFF \
	-D CMAKE_BUILD_TYPE=RelWithDebInfo \
	-D BUILD_WITH_QT6=OFF \
	-D USE_PORTAUDIO=ON \
	-D SOLID_ACTIONS_INSTALL_PATH="/usr/share/solid/actions" \
	-D USE_VULKAN=ON \
	-D CMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
	-D USE_LINK_TIME_OPTIMIZATION=ON \
	-D USE_PCH=ON \
	-D USE_UBSAN=ON \
	-D USE_VULKAN=ON \
	-D CMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
	-D USE_LINK_TIME_OPTIMIZATION=ON \
	-D USE_PCH=ON \
	-D USE_UBSAN=ON
#	exit 1

override_dh_auto_test:

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