#!/usr/bin/make -f

PKG = $(shell dh_listpackages)

%:
	dh $@ --with python2,sphinxdoc

override_dh_auto_clean:
	rm -rf docs/_build/
	dh_auto_clean

override_dh_auto_build:
	cd registration && /usr/bin/django-admin compilemessages
	cd docs && $(MAKE) html
	dh_auto_build

override_dh_auto_install:
	dh_auto_install
	# Drop .po files and keep only .mo files (compiled)
	find debian/$(PKG)/ -name '*.po' -exec rm {} \;

# See docs/faq.rst
override_dh_auto_test:
	PYTHONPATH=. python ./registration/runtests.py
