#!/usr/bin/make -f

PKG = $(shell dh_listpackages)

%:
	dh $@ --with python2

override_dh_auto_build:
	cd registration && /usr/bin/django-admin compilemessages
	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 {} \;

override_dh_installdocs:
	dh_installdocs
	# Generate documentation
	rst2html <docs/overview.txt >debian/$(PKG)/usr/share/doc/$(PKG)/overview.html
	rst2html <docs/views.txt >debian/$(PKG)/usr/share/doc/$(PKG)/views.html
	rst2html <docs/models.txt >debian/$(PKG)/usr/share/doc/$(PKG)/models.html
	rst2html <docs/forms.txt >debian/$(PKG)/usr/share/doc/$(PKG)/forms.html
