#! /usr/bin/make -f

export PYBUILD_NAME=asncounter
export SETUPTOOLS_SCM_PRETEND_VERSION=$(shell dpkg-parsechangelog -SVersion | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~git.*//' -e 's/~bpo.*//' -e 's/~/.0/' -e 's/+dfsg1//' -e 's/+ds1//' | head -n 1)
%:
	dh $@ --with python3 --buildsystem=pybuild

execute_after_dh_install:
	install asncounter.service asncounter-refresh.service asncounter-refresh.timer -m 644 -D -t debian/asncounter/usr/lib/systemd/system

override_dh_installsystemd:
	dh_installsystemd --no-enable --no-start

execute_before_dh_auto_build:
	pandoc --standalone --to man asncounter.1.md > asncounter.1
