#!/usr/bin/make -f

# DH_VERBOSE := 1
export LC_ALL=C.UTF-8

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@

override_dh_auto_configure:
	# Preserve the original manual page shipped with the source.
	cp man/mptp.1 man/mptp.1.orig
	dh_auto_configure -- --with-bash-completions=`pkg-config --variable=completionsdir bash-completion`

override_dh_auto_build:
	dh_auto_build $@ --no-parallel

override_dh_auto_install:
	sed -i 's/Supress/Suppress/' man/mptp.1
	sed -i 's/conjuction/conjunction/' man/mptp.1
	dh_auto_install

execute_after_dh_auto_clean:
	# Restore preserved manual page, if any.
	test ! -r man/mptp.1.orig || mv man/mptp.1.orig man/mptp.1
