#! /usr/bin/make -f
## -*- makefile -*-

export DH_OPTIONS += -O-Bdebian/build-tree

override_dh_auto_configure:
	dh_auto_configure -- --disable-silent-rules --enable-tls

override_dh_installdocs:
	dh_installdocs --link-doc=libriemann-client0

override_dh_installchangelogs:
	dh_installchangelogs NEWS.md

override_dh_auto_test:
	dh_auto_test -- VERBOSE=1

ifeq ($(shell pkg-config --modversion libprotobuf-c --silence-errors),,)
LPB_C=libprotobuf-c0-dev
else
LPB_C=libprotobuf-c-dev
endif

override_dh_gencontrol:
	dh_gencontrol -- -Vprotobuf:Depends=${LPB_C}

%:
	dh $@ --with autoreconf
