#!/usr/bin/make -f
include /usr/share/dpkg/pkg-info.mk
PKGDIR=debian/clickable

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

override_dh_install:
	dh_install

	# Install the manpage
	mkdir -p $(PKGDIR)/usr/share/man/man1/

	PYTHONPATH=$(PKGDIR)/usr/lib/$(shell ls $(PKGDIR)/usr/lib/)/dist-packages/ \
		help2man $(PKGDIR)/usr/bin/clickable \
		--no-info \
		--help-option="--help" \
		--version-string=$(DEB_VERSION_UPSTREAM) \
		-o $(PKGDIR)/usr/share/man/man1/clickable.1

override_dh_auto_test:
	# TODO Temporarily ignore test failures
	dh_auto_test || true
