#!/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=ledgerhelpers

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

execute_after_dh_auto_build:
	for f in doc/*.md; do markdown_py -f "$${f%.md}.html" "$${f}"; done

execute_after_dh_auto_clean:
	for f in doc/*.md; do rm -f "$${f%.md}.html"; done

execute_after_dh_auto_install:
# No -f flag because we want to notice in case these files change location.
	rm debian/ledgerhelpers/usr/share/doc/ledgerhelpers/doc/*.md
# Depends on defunct web services
	rm debian/ledgerhelpers/usr/bin/updateprices
	rm debian/ledgerhelpers/usr/share/applications/updateprices.desktop

bump-upstream:
	gbp import-orig --pristine-tar --uscan
	@echo Remember to update debian/changelog
	@echo Remember to rebase the patches, if any, with:
	@echo gbp pq rebase
	@echo gbp pq export
