#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

export PYBUILD_NAME=libevdev

WITH := python3
ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES)))
	WITH := $(WITH),sphinxdoc
endif

%:
	dh $@ --with $(WITH) --buildsystem=pybuild

execute_after_dh_auto_build:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. http_proxy='127.0.0.1:9' python3 -m sphinx -N -bhtml doc/source/ build/html
	PYTHONPATH=. http_proxy='127.0.0.1:9' python3 -m sphinx -N -bman doc/source/ build/man
endif
