#!/usr/bin/make -f
#export DH_VERBOSE = 1
export PYBUILD_NAME=pyfunceble
PACKAGE = python3-pyfunceble

# Tests disabled due to trying to connect to an external network
export PYBUILD_DISABLE=test

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

# sphinx documentation
execute_before_dh_sphinxdoc:
	http_proxy='http://127.0.0.1:9/' python3 -m sphinx  -d debian/doctrees  \
	-N -bhtml  docs/ debian/python-pyfunceble-doc/usr/share/doc/pyfunceble-doc/html

# fixed lintian extra-license-file warning
execute_after_dh_sphinxdoc:
	find debian/python-pyfunceble-doc/ -name 'license.rst.txt' -delete

# Upstream informs that such tools are intended for developers only. Unnecessary for user use.
# https://github.com/funilrys/PyFunceble/commit/3a61b8424bafa17b1879e94e90ae3e0ad972be41
execute_after_dh_auto_install:
	rm -f debian/$(PACKAGE)/usr/bin/PyFunceble
	rm -f debian/$(PACKAGE)/usr/bin/clean-pyfunceble

override_dh_installexamples:
	dh_installexamples examples/api_usage examples/lists
