#!/usr/bin/make -f
#export DH_VERBOSE=1
#export DEB_BUILD_OPTIONS=nocheck

export PYBUILD_NAME=requirements-detector

VERSION := $(shell dpkg-parsechangelog -Sversion | cut -d- -f1)
DEBDATE := $(shell dpkg-parsechangelog -Sdate | date -u +"%F" -f -)

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_test:
	LC_ALL=C.UTF-8 dh_auto_test

override_dh_installdocs:
	dh_installdocs -A README.md

override_dh_installman:
	txt2man -s 1 -v "python3-requirements-detector" -t "detect-requirements" \
	-r "$(VERSION)" -d "$(DEBDATE)" debian/detect-requirements.txt > .pybuild/detect-requirements.1
	dh_installman -ppython3-requirements-detector .pybuild/detect-requirements.1
