#!/usr/bin/make -f

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

override_dh_auto_build:
	# Pipe output to sed to avoid http://lintian.debian.org/tags/hyphen-used-as-minus-sign.html
	# Fixed in http://johnmacfarlane.net/pandoc/releases.html#pandoc-1.10-2013-01-19
	pandoc -s -w man docs/man/onionprobe.1.md -o docs/man/onionprobe.1
	sed -i -e 's/--/\\-\\-/g' docs/man/onionprobe.1
	dh_auto_build

override_dh_auto_install:
	dh_auto_install
	# Remove duplicate configs created by the Python packaging procedure
	rm -rf debian/onionprobe/usr/etc

override_dh_installinit:
	dh_installinit --no-enable --no-start

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