Generate documentation package
#Package: nim-unicodedb-doc
#Architecture: all
#Depends: ${misc:Depends}
#Description: documentation to the nim unicodedb library
# This package provides the in-code documentation as generated
# via "nimble doc".

override_dh_auto_build:
	echo "generating HTML docs"
ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
	rm htmldocs -rf
	nim doc -o:./htmldocs --project --index:on ./src/unicodedb/scripts.nim
	nim doc -o:./htmldocs --project --index:on ./src/unicodedb/widths.nim
	nim doc -o:./htmldocs --project --index:on ./src/unicodedb.nim
	nim buildIndex -o:htmldocs/theindex.html htmldocs
	find htmldocs -name '*.idx' -delete
endif

