#!/usr/bin/make -f

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

override_dh_clean:
	rm -rf build/sphinx
	dh_clean

override_dh_auto_install:
	dh_auto_install -- --install-html=$(CURDIR)/debian/python-sardana-doc/usr/share/doc/python-sardana-doc/html
	# on squeeze python-sphinx is to old so create a fake documentation for now
	if [ ! -d build/sphinx ]; then mkdir -p build/sphinx/html; fi

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