@@ -75,12 +75,6 @@ override_dh_auto_install-arch:
7575
7676 desktop-file-validate $(shell find debian/extras/ share/applications/ -name *.desktop);
7777
78- # Install G-code quick reference docs in DESTDIR.
79- # NOTE: This is arguably documentation, but it lives in the
80- # architecture-dependent binary package for historical reasons.
81- mkdir -p $(DESTDIR)/usr/share/doc/linuxcnc
82- cp docs/html/gcode*.html $(DESTDIR)/usr/share/doc/linuxcnc/
83-
8478 # Move static libraries to the -dev package.
8579 mkdir -p debian/$(DEV_PACKAGE_NAME)/usr/lib
8680 cp lib/*.a debian/$(DEV_PACKAGE_NAME)/usr/lib
@@ -110,19 +104,29 @@ override_dh_auto_install-indep:
110104 DESTDIR=$(DESTDIR ) $(MAKE ) -C src install-docs install-doc
111105
112106override_dh_installdocs-indep :
107+ # The G-code quick reference html docs are built as
108+ # `docs/html/${LANG}/gcode.html`. We install them
109+ # into `/usr/share/doc/@MAIN_PACKAGE_NAME@/` in each
110+ # linuxcnc-doc-${LANG} package, then rename them there (except
111+ # for the English one) to include the language in the filename,
112+ # so they don't collide when we install all the doc debs.
113+ #
113114 # Rename the "main" doc directories from
114115 # `usr/share/doc/@MAIN_PACKAGE_NAME@` to `usr/share/doc/linuxcnc`,
115116 # because that's where the `.desktop` files look for the docs.
116117 dh_installdocs --doc-main-package=@MAIN_PACKAGE_NAME@ --package=linuxcnc-doc-en
117118 mv debian/linuxcnc-doc-en/usr/share/doc/@MAIN_PACKAGE_NAME@ debian/linuxcnc-doc-en/usr/share/doc/linuxcnc
118119
119120 dh_installdocs --doc-main-package=@MAIN_PACKAGE_NAME@ --package=linuxcnc-doc-es
121+ mv debian/linuxcnc-doc-es/usr/share/doc/@MAIN_PACKAGE_NAME@/gcode.html debian/linuxcnc-doc-es/usr/share/doc/@MAIN_PACKAGE_NAME@/gcode_es.html
120122 mv debian/linuxcnc-doc-es/usr/share/doc/@MAIN_PACKAGE_NAME@ debian/linuxcnc-doc-es/usr/share/doc/linuxcnc
121123
122124 dh_installdocs --doc-main-package=@MAIN_PACKAGE_NAME@ --package=linuxcnc-doc-fr
125+ mv debian/linuxcnc-doc-fr/usr/share/doc/@MAIN_PACKAGE_NAME@/gcode.html debian/linuxcnc-doc-fr/usr/share/doc/@MAIN_PACKAGE_NAME@/gcode_fr.html
123126 mv debian/linuxcnc-doc-fr/usr/share/doc/@MAIN_PACKAGE_NAME@ debian/linuxcnc-doc-fr/usr/share/doc/linuxcnc
124127
125128 dh_installdocs --doc-main-package=@MAIN_PACKAGE_NAME@ --package=linuxcnc-doc-zh-cn
129+ mv debian/linuxcnc-doc-zh-cn/usr/share/doc/@MAIN_PACKAGE_NAME@/gcode.html debian/linuxcnc-doc-zh-cn/usr/share/doc/@MAIN_PACKAGE_NAME@/gcode_zh_CN.html
126130 mv debian/linuxcnc-doc-zh-cn/usr/share/doc/@MAIN_PACKAGE_NAME@ debian/linuxcnc-doc-zh-cn/usr/share/doc/linuxcnc
127131
128132
0 commit comments