#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

export PYBUILD_NAME=cif2cell

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

override_dh_auto_test:
	PYTHONPATH=. pytest-3

override_dh_install:
	dh_install
	rm -rf debian/python3-$(PYBUILD_NAME)/usr/lib/cif2cell

override_dh_installman:
	mkdir --parents debian/tmp
	PYTHONPATH=. help2man --no-info \
		--name 'prepare CIF files for electronic structure calculations' \
		--version-string $(DEB_VERSION_UPSTREAM) binaries/cif2cell > debian/tmp/cif2cell.1
	PYTHONPATH=. help2man --no-info \
		--name 'tool to make CIF format files out of VASP POSCAR+POTCAR/OUTCAR files' \
		--version-string $(DEB_VERSION_UPSTREAM) binaries/vasp2cif > debian/tmp/vasp2cif.1
	dh_installman

override_dh_clean:
	dh_clean
	rm -rf .pytest_cache
