#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# Get __DATE__ and __TIME__ in sources to refer to debian/changelog ultimate timestamp
include /usr/share/dpkg/pkg-info.mk

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- -D ENABLE_CPPUNIT=ON

override_dh_auto_build:
	dh_auto_build -- translations all

execute_after_dh_auto_install:
	@echo "Upstream installs unnecessary file."
	-rm debian/xournalpp/usr/share/xournalpp/ui/README.md

override_dh_dwz:
	dh_dwz --no-dwz-multifile

override_dh_auto_configure:
	dh_auto_configure -- -DCMAKE_BUILD_TYPE=RelWithDebInfo

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