#!/usr/bin/make -f

export PYBUILD_NAME = depthcharge-tools
export PYBUILD_DESTDIR = debian/depthcharge-tools

%:
	dh $@ --with python3,bash-completion --buildsystem pybuild

override_dh_auto_build:
	dh_auto_build
	rst2man mkdepthcharge.rst mkdepthcharge.1
	rst2man depthchargectl.rst depthchargectl.1

override_dh_installinit:
	dh_installinit
	sed -i debian/depthcharge-tools/etc/init.d/depthcharge-tools \
	    -e '/^# Provides:/ s/depthchargectl-bless/depthcharge-tools/'
