Package: mkdocs Version: 1.5.3+dfsg-1 Severity: normal I tried using dh_mkdocs with python-jellyfish, but dpkg-buildpackage (using sbuild with unshare) just hung:
make[1]: Entering directory '/<<PKGBUILDDIR>>' dh_installdocs -ppython-jellyfish-doc --doc-main-package=python3-jellyfish dh_installdocs --remaining-packages dh_installdocs: warning: No packages to build. Possible architecture mismatch: amd64, want: all any mv debian/python-jellyfish-doc/usr/share/doc/python3-jellyfish/site debian/python-jellyfish-doc/usr/share/doc/python3-jellyfish/html make[1]: Leaving directory '/<<PKGBUILDDIR>>' dh_installdocs -O--buildsystem=pybuild -Npython-jellyfish-doc debian/rules override_dh_mkdocs-indep make[1]: Entering directory '/<<PKGBUILDDIR>>' dh_mkdocs --theme-package mkdocs-material (and I eventually killed the process). Attached is a patch against 1.1.0-1 implementing the switch to dh_mkdocs, which is what I used to try this. Best wishes, Julian
>From dfda8e32e4444d56bbfe517611bea55b53d4a2c9 Mon Sep 17 00:00:00 2001 From: Julian Gilbey <j...@debian.org> Date: Mon, 9 Sep 2024 20:53:09 +0100 Subject: [PATCH] Use dh_mkdocs to clean up the documentation package --- debian/changelog | 6 ++++++ debian/control | 3 ++- debian/rules | 9 ++++----- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index cc5605e..40f64c8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +python-jellyfish (1.1.0-2) unstable; urgency=medium + + * Use dh_mkdocs to clean up the documentation package + + -- Julian Gilbey <j...@debian.org> Mon, 09 Sep 2024 20:29:25 +0100 + python-jellyfish (1.1.0-1) unstable; urgency=medium * Team upload. diff --git a/debian/control b/debian/control index d406354..4870ab0 100644 --- a/debian/control +++ b/debian/control @@ -13,6 +13,7 @@ Build-Depends: cargo, librust-unicode-normalization-dev, librust-unicode-segmentation-dev, mkdocs-material, + node-jquery, pybuild-plugin-pyproject, python3-all-dev, python3-maturin, @@ -44,7 +45,7 @@ Description: Library for approximate and phonetic matching of strings (Python 3) Package: python-jellyfish-doc Architecture: all Section: doc -Depends: ${misc:Depends} +Depends: ${mkdocs:Depends}, ${misc:Depends} Multi-Arch: foreign Description: Library for approximate and phonetic matching of strings (documentation) Jellyfish is a Python library for doing approximate and phonetic diff --git a/debian/rules b/debian/rules index f3fa6cd..6151870 100755 --- a/debian/rules +++ b/debian/rules @@ -21,7 +21,7 @@ export DEB_CARGO_CRATE=$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM) %: - dh $@ --buildsystem=pybuild + dh $@ --with mkdocs --buildsystem=pybuild execute_before_dh_auto_configure: mv Cargo.lock Cargo.lock.saved @@ -32,10 +32,6 @@ execute_before_dh_auto_configure: ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES))) execute_after_dh_auto_build-indep: mkdocs build - # Clean generated HTML files to avoid some privacy breaches - # We cannot currently remove the Google fonts reference as - # Roboto Mono is not suitably packaged in Debian. - perl -i -ne '/<img .*src="http/ || print' site/index.html override_dh_installdocs-indep: dh_installdocs -ppython-jellyfish-doc --doc-main-package=python3-jellyfish @@ -43,6 +39,9 @@ override_dh_installdocs-indep: mv debian/python-jellyfish-doc/usr/share/doc/python3-jellyfish/site debian/python-jellyfish-doc/usr/share/doc/python3-jellyfish/html endif +override_dh_mkdocs-indep: + dh_mkdocs --theme-package mkdocs-material + override_dh_installchangelogs: dh_installchangelogs docs/changelog.md -- 2.45.2