#!/usr/bin/make -f

export DH_VERBOSE=1
export DH_OPTIONS=-v

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --buildsystem=cmake

override_dh_auto_configure:
	# ENABLE_LSP=ON so that a missing libjson-glib-dev fails the build
	# instead of quietly dropping the language server client.
	# ENABLE_TERMINAL=ON so that a missing libvte-2.91-dev fails the build
	# instead of quietly dropping the terminal pane from the package.
	# ENABLE_STRICT=ON because the package build is the only one that
	# compiles with the distribution's own hardening flags, and a warning
	# they turn up is worth the same as any other: an error.
	dh_auto_configure -- -DENABLE_TERMINAL=ON -DENABLE_LSP=ON -DENABLE_STRICT=ON

override_dh_auto_install:
	dh_auto_install --destdir=debian/medit-gtk3
	find $(CURDIR)/debian/medit-gtk3/ -type d -empty -delete

override_dh_auto_clean:
	./clean.sh

override_dh_auto_test:
