#!/usr/bin/make -f

export DH_VERBOSE=1

VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p')

# for backport on stable without bpo
WITH_SPHINXDOC = $(shell if [ -x /usr/bin/dh_sphinxdoc ]; then echo "--with sphinxdoc"; fi)

get-orig-source:
	uscan --force-download --upstream-version $(VERSION)

override_dh_auto_build:
	dh_auto_build -- --no-doc
	python setup.py build_doc --use-inkscape

override_dh_auto_install:
	dh_auto_install -- --skip-build --no-doc
	dh_numpy

%:
	dh $@ --with python2 $(WITH_SPHINXDOC)

.PHONY: get-orig-source