#! /usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@ --parallel --with autoreconf --fail-missing -O--dbgsym-migration="libidn2-0-dbg (<< 2.0.2-1~)" -X.la

override_dh_autoreconf:
	dh_autoreconf debian/autogen.sh

override_dh_auto_configure:
	dh_auto_configure -- \
		--enable-ld-version-script \
		--disable-rpath \
		--enable-gtk-doc --enable-gtk-doc-pdf \
		--with-packager=Debian \
		--with-packager-bug-reports=https://bugs.debian.org/ \
		--with-packager-version="$(DEB_VERSION)"

# Texinfo PDF manual is not built by 'make' but removed by 'make clean'.
override_dh_auto_build:
	dh_auto_build

override_dh_auto_build-indep:
	dh_auto_build -Ddoc pdf html info

override_dh_auto_install-indep:
	dh_auto_install -Ddoc install-pdf install-html install-info

override_dh_auto_clean:
	test ! -f Makefile || dh_auto_clean

override_dh_compress:
	dh_compress -Xlibidn2.pdf
