#!/usr/bin/make -f

# See debhelper(7) (uncomment to enable).
# Output every command that modifies files on the build system.
#export DH_VERBOSE = 1

export PYBUILD_NAME=mutt-ical

%:
	dh $@ --buildsystem=pybuild

execute_before_dh_installman:
	install -d -m0755 debian/$${PYBUILD_NAME}/usr/share/man/man1/
	pandoc -st man -i debian/viewical.1.md | gzip -c > debian/$${PYBUILD_NAME}/usr/share/man/man1/viewical.1.gz

execute_after_dh_fixperms:
	# prevent lintian 'executable-in-usr-lib' pedantic
	chmod -x debian/$${PYBUILD_NAME}/usr/lib/python3/dist-packages/mutt_ical/viewical.py
