#!/usr/bin/make -f
#export DH_VERBOSE=1
export PYBUILD_NAME=wand

%:
	dh $@ --buildsystem=pybuild --with python2,python3,pypy,sphinxdoc

.PHONY: build_doc clean_doc

override_dh_auto_build: build_doc
	dh_auto_build

override_dh_install:
	dh_install
	rm -f $(CURDIR)/debian/*/usr/README.rst
	rm -f $(CURDIR)/debian/*/usr/lib/*/README.rst

override_dh_installchangelogs:
	dh_installchangelogs $(CURDIR)/docs/changes.rst

override_dh_auto_clean: clean_doc
	dh_auto_clean

# The testsuite is disabled for now; it fails on the ImageMagick 6.8.* or
# later
override_dh_auto_test:
	#dh_auto_test

build_doc:
	$(MAKE) -C $(CURDIR)/docs html

clean_doc:
	$(MAKE) -C $(CURDIR)/docs clean
