#!/usr/bin/make -f

%:
	dh $@ --with python2

PYPI_DESC = downloads Python package from PyPI, creates Debian package and then installs it
DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
help2man = PYTHONPATH=${CURDIR} help2man -N --version-string=${DEB_UPSTREAM_VERSION} \
		-o $1 -n '$2' $(CURDIR)/debian/python-stdeb/usr/bin/$(subst .1,,$1)

py2dsc.1:
	$(call help2man,$@,creates Debian source package from Python package)

pypi-install.1:
	$(call help2man,$@,${PYPI_DESC})

override_dh_installman: py2dsc.1 pypi-install.1
	dh_installman py2dsc.1 pypi-install.1

clean:
	rm -f py2dsc.1 pypi-install.1
	dh $@

