#!/usr/bin/make -f

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

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

override_dh_auto_test:
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
	$(MAKE) check PYTHON=python3
endif

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build*
	rm -f dulwich/*.so dulwich/*.o

override_dh_installdocs:
	dh_installdocs -ppython3-dulwich docs/tutorial -X.gitignore -XMakefile

override_dh_strip:
	dh_strip -p python3-dulwich --dbgsym-migration='python3-dulwich-dbg (<< 0.16.4-1)'

override_dh_installchangelogs:
	dh_installchangelogs NEWS
