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

include /usr/share/dpkg/pkg-info.mk

export PYBUILD_NAME=rstcheck
export PYBUILD_DESTDIR = debian/rstcheck
export PYBUILD_INSTALL_ARGS = --install-lib=/usr/share/rstcheck

%:
	dh $@ --buildsystem=pybuild

execute_after_dh_auto_install:
	mv debian/rstcheck/usr/bin/rstcheck debian/rstcheck/usr/share/rstcheck/run

override_dh_auto_test:
	./test.bash

execute_before_dh_installman: debian/rstcheck.1
	true

%.1: %.1.in
	sed -e 's/@VERSION@/$(DEB_VERSION_UPSTREAM)/g' $< > $@
