#!/usr/bin/make -f

export PYBUILD_NAME=gtkspellcheck
export PYBUILD_SYSTEM=pyproject

%:
	dh $@ --with sphinxdoc --buildsystem pybuild

override_dh_auto_build:
	dh_auto_build
	LC_ALL=C PYTHONPATH=. http_proxy='http://127.0.0.1:9/' sphinx-build -N -bhtml docs/source build/sphinx/html

override_dh_install:
	dh_install
	# Upstream does not provide setup.py with the option install_locale any more thus we install this manually
	for lang in `find locale -mindepth 1 -maxdepth 1 -type d` ; do \
	    dh_install -p python3-$(PYBUILD_NAME) $${lang}/*.mo usr/share/$${lang}/LC_MESSAGES ; \
	done
