diff --git a/debian/control b/debian/control index 45c736e9..1b45bf6d 100644 --- a/debian/control +++ b/debian/control @@ -5,8 +5,11 @@ Maintainer: Cedric Hombourger Build-Depends: debhelper (>=10) | dh-systemd, dh-python, libpython3-all-dev, - python3-all-dev, - python3-setuptools + python3-all-dev:any, + python3-setuptools, + python3-sphinx:native , + python3-sphinx-rtd-theme:native +Rules-Requires-Root: no Standards-Version: 4.5.0 Homepage: https://github.com/siemens/mtda X-Python3-Version: >= 3.7 @@ -27,7 +30,9 @@ Depends: mtda-common, python3-zmq, python3-zstandard, usbrelay, - ${misc:Depends} + ${misc:Depends}, + ${sphinxdoc:Depends} +Built-Using: ${sphinxdoc:Built-Using} Replaces: mtda-usb-functions Suggests: nbd-server Description: Multi-Tenant Device Access service diff --git a/debian/docs b/debian/docs new file mode 100644 index 00000000..35f5730d --- /dev/null +++ b/debian/docs @@ -0,0 +1,2 @@ +README.md +build/html diff --git a/debian/rules b/debian/rules index 49c41224..cb7ced58 100755 --- a/debian/rules +++ b/debian/rules @@ -5,10 +5,20 @@ PY_TARGET=$(shell python3 -c "import sysconfig; print(sysconfig.get_path('stdlib MTDA_DIST=$(PY_TARGET)/dist-packages/mtda %: - dh $@ --with python3 --buildsystem=pybuild + dh $@ --with python3,sphinxdoc --buildsystem=pybuild override_dh_auto_test: +override_dh_auto_build: export http_proxy=127.0.0.1:9 +override_dh_auto_build: export https_proxy=127.0.0.1:9 +override_dh_auto_build: + dh_auto_build +ifneq ($(filter nodoc,$(DEB_BUILD_PROFILES)),) + echo -e "\nnodoc build profile enabled, therefor not building docs.\n" +else + PYTHONPATH=. python3 -m sphinx -N -bhtml docs/ build/html +endif + override_dh_auto_install: dh_auto_install :