#!/usr/bin/make -f

export LC_ALL=C.UTF-8

%:
	dh $@ --buildsystem=pybuild

execute_after_dh_auto_build:
	PYTHONPATH="$(CURDIR)/Lib" help2man \
		   -n "compile fonts from UFO or Glyphs to OTF/TTF" \
		   --no-info \
		   "python3 $(CURDIR)/Lib/fontmake" \
		   > debian/fontmake.1

execute_after_dh_auto_clean:
	rm -fv Lib/fontmake/_version.py

execute_after_dh_auto_test:
	rm -rfv $(CURDIR)/.pybuild/cpython3_*/build/instance_ttf
	rm -rfv $(CURDIR)/.pybuild/cpython3_*/build/master_ttf
