#!/usr/bin/make -f
# -*- makefile -*-
export DH_VERBOSE=1
export PYBUILD_NAME=isso

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

override_dh_auto_build:
	$(MAKE) RJS="node /usr/lib/nodejs/requirejs/r.js" LC_ALL=C.UTF-8
	dh_auto_build
	PYTHONPATH=. http_proxy='http://127.0.0.1:9/' sphinx-build -N -q -E -bhtml docs build/html

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
	dh_sphinxdoc -p isso
endif

override_dh_installchangelogs:
	dh_installchangelogs CHANGES.rst

override_dh_auto_install:
	dh_auto_install
	pybuild --install -i python{version} -p 2.7 --dir . --verbose --test-nose

override_dh_auto_clean:
	dh_auto_clean
	rm -f ./isso/js/count.min.js ./isso/js/count.dev.js
	rm -f ./isso/js/embed.min.js ./isso/js/embed.dev.js
