#!/usr/bin/make -f

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

CONFIGURE_EXTRA_FLAGS += --with-libgcrypt --without-openssl
CONFIGURE_EXTRA_FLAGS += --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
CONFIGURE_EXTRA_FLAGS += --disable-rpath

%:
	dh $@ --parallel --with autoreconf

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIGURE_EXTRA_FLAGS)

override_dh_installexamples:
	dh_installexamples -a -X .deps -X Makefile -X .gitignore

override_dh_installchangelogs:
	dh_installchangelogs NEWS

#
# mansyntax.sh test duplicates functionality of debhelper and requires presence
# of en_US.utf8 locale. Ensure it is not run by providing fake man(1) tool.
#
override_dh_auto_test:
	PATH=$(CURDIR)/debian:$$PATH dh_auto_test -a

override_dh_strip:
	dh_strip -a --dbg-package=libssh2-1-dbg
