dh_installdocs –link-doc when using jh_installjavadoc

This post exists to stop people (possibly including myself) spending hours being thoroughly confused as to why

dh_installdocs --link-doc=package
is not working. In fact it probably is working but your package-doc.javadoc probably looks something like:


rather than like:

docs/api /usr/share/doc/package/api

and hence jh_installjavadoc is correctly creating the /usr/share/doc/package-doc/ directory when really you didn’t want that to happen and so dh_installdocs –link-doc silently ignores your instruction as it doesn’t make sense in context.

Relatedly I have ‘finished’ packaging JEval for Debian partly using the instructions on packaging java packages using git. It just needs some further testing and to be uploaded and sponsored.
(I am packaging the dependencies of my Part II Project)

Tags: , , , , ,

2 Responses to “dh_installdocs –link-doc when using jh_installjavadoc”

  1. Malcolm Says:

    I thought it was usual behaviour to separate out large chunks of documentation, such as Javadoc, into a separate package (package-doc) — hence the default behaviour.

    Using a separate package helps users for whom disk space is very tight.

  2. Daniel Thomas Says:

    Yes. This is what I am doing but the –link-doc option means that iff the -doc package is installed then the documentation will be in the /usr/share/doc/package directory and that /usr/share/doc/package-doc will be a symlink to that directory this actually reduces disk usage as we don’t need two copies of the copyright and changelog if the -doc package is installed and is I think more useful for the end user as if they look in /usr/share/doc/package first then they find the docs there and if they look in /usr/share/doc/package-doc because they expect the documentation to be there then it is. :-)

    I intend that all packages a I package will use –link-doc because I judge this to be ‘better’. ;-)

Leave a Reply