#!/usr/bin/make -f

export LC_ALL=C.UTF-8
export PYBUILD_NAME = libarchive-c
export PYBUILD_BEFORE_TEST = cp -av README.rst {build_dir}
export PYBUILD_TEST_ARGS = -vv -s
export PYBUILD_AFTER_TEST = rm -v {build_dir}/README.rst

%:
	dh $@ --with python3 --buildsystem=pybuild

override_dh_gencontrol:
	dh_gencontrol -- \
	  -Vlib:Depends=$(shell dpkg-query -W -f '$${Depends}' libarchive-dev \
			| sed -E 's/.*(libarchive[[:alnum:].-]+).*/\1/')
