#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
export HELP2MAN=true
endif

%:
	dh $@ --builddirectory=build

override_dh_autoreconf:
	GTKDOCIZE=true dh_autoreconf

override_dh_auto_configure:
	dh_auto_configure -- --with-packager=Debian \
		--with-packager-version=$(DEB_VERSION) \
		--with-packager-bug-reports=https://bugs.debian.org/ \
		--disable-silent-rules \
		--disable-java

override_dh_install:
	dh_install
ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
	mkdir -p debian/tmp/usr/share/man/man1/
	cp -fv doc/idn.1 debian/tmp/usr/share/man/man1/idn.1
endif
