#!/usr/bin/make -f
# -*- makefile -*-

REV=$(shell dpkg-parsechangelog | sed -rne 's,^Version: .*[+~]bzr([0-9]+).*,\1,p')
VER=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')

%:
	dh $@ --with autoreconf --with python2

override_dh_python2:
	dh_python2 /usr/share/juju-jitsu/sub-commands/aiki

override_dh_installman:: debian/manpages/jitsu.1
	dh_installman

override_dh_clean:
	rm -rf debian/manpages
	dh_clean

debian/manpages/jitsu.1:
	mkdir debian/manpages
	help2man -o $@ -N \
        --version-string $(VER) \
        --name "External tools for working with juju" \
        bin/jitsu
