#!/usr/bin/make -f

# rocm-doc B-D on python3-sphinxcontrib.datatemplates, which is currently
# pending review by the DFSG team. The rocm-doc binary package cannot yet be
# built, but will be enabled once the required B-D are available.
#
# For the moment, this source package only provides test and dev metapackages.
#!/usr/bin/make -f

%:
	dh $@

override_dh_auto_configure-arch:
	:

override_dh_auto_test-arch:
	:

execute_before_dh_install-arch:
	:

override_dh_auto_configure-indep:
	:

override_dh_auto_test-indep:
	:

override_dh_auto_install-indep:
	:

# Once the necessary B-D are available, the rules below can be enabled
# to build rocm-doc

# See debhelper(7) (uncomment to enable).
# Output every command that modifies files on the build system.
#export DH_VERBOSE = 1

export PYBUILD_NAME=rocm

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

execute_after_dh_auto_build-indep: export http_proxy=127.0.0.1:9
execute_after_dh_auto_build-indep: export https_proxy=127.0.0.1:9
execute_after_dh_auto_build-indep:
	export patchconfigpy="True" ; \
	rocm-docs-build
	# Remove fonts that will be symlinks
	rm -rf build/html/_static/fonts
	rm -rf build/html/_static/vendor

override_dh_clean:
	dh_clean
	rm -rf build
	rm -f  \
	_readthedocs/html/downloads/compatibility-matrix-historical-6.0.csv \
	docs/about/release-notes.md \
	docs/release/changelog.md \
	docs/sphinx/_toc.yml
