#!/usr/bin/make -f

export PYBUILD_NAME=sardana

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

override_dh_installman:
	dh_installman -p python-sardana doc/man/*.1

override_dh_sphinxdoc: export http_proxy=127.0.0.1:9
override_dh_sphinxdoc: export https_proxy=127.0.0.1:9
override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. sphinx-build -N -bhtml doc/source build/html # HTML generator
	dh_installdocs "build/html" -p python-sardana-doc
	dh_sphinxdoc -O--buildsystem=pybuild

	rdfind -outputname /dev/null -makesymlinks true debian/python-sardana-doc/
	# Fix those symlinks to make them relative
	symlinks -r -s -c debian/python-sardana-doc/
endif

# avoid unit test for now
override_dh_auto_test:
