#!/usr/bin/make -f

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

export PYBUILD_NAME=pygtail

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

override_dh_auto_install:
	dh_auto_install
	# Move the python 3 script to the pygtail package
	mkdir -p debian/pygtail/usr/bin
	mv debian/python3-pygtail/usr/bin/pygtail debian/pygtail/usr/bin/

override_dh_installman:
	PYTHONPATH="." help2man --no-info --version-string="$(DEB_VERSION_UPSTREAM)" \
		--name="read log file lines that have not been read" \
		--output=debian/pygtail.1 \
		./debian/pygtail/usr/bin/pygtail
	dh_installman
