1DH_INSTALLDOCS(1)                  Debhelper                 DH_INSTALLDOCS(1)
2
3
4

NAME

6       dh_installdocs - install documentation into package build directories
7

SYNOPSIS

9       dh_installdocs [debhelper options] [-A] [-Xitem] [file ...]
10

DESCRIPTION

12       dh_installdocs is a debhelper program that is responsible for
13       installing documentation into usr/share/doc/package in package build
14       directories.
15
16       In compat 10 and earlier, dh_install(1) may be a better tool for
17       handling the upstream documentation, when upstream's own build system
18       installs all the desired documentation correctly.  In this case,
19       dh_installdocs is still useful for installing packaging related
20       documentation (e.g. the debian/copyright file).
21
22       From debhelper compatibility level 11 on, dh_install will fall back to
23       looking in debian/tmp for files, if it does not find them in the
24       current directory (or wherever you've told it to look using
25       --sourcedir).
26
27       In compat 11 and later, dh_installdocs offers many of the features that
28       dh_install(1) also has.  Furthermore, dh_installdocs also supports the
29       nodoc build profile to exclude documentation (regardless of compat
30       level).
31

FILES

33       debian/package.docs
34           List documentation files to be installed into package.
35
36       debian/copyright
37           The copyright file is installed into all packages, unless a more
38           specific copyright file is available.
39
40       debian/package.copyright
41       debian/package.README.Debian
42       debian/package.TODO
43           Each of these files is automatically installed if present for a
44           package.
45
46       debian/README.Debian
47       debian/TODO
48           These files are installed into the first binary package listed in
49           debian/control.
50
51           Note that README.debian files are also installed as README.Debian,
52           and TODO files will be installed as TODO.Debian in non-native
53           packages.
54
55       debian/package.doc-base
56           Installed as doc-base control files. Note that the doc-id will be
57           determined from the Document: entry in the doc-base control file in
58           question. In the event that multiple doc-base files in a single
59           source package share the same doc-id, they will be installed to
60           usr/share/doc-base/package instead of usr/share/doc-base/doc-id.
61
62       debian/package.doc-base.*
63           If your package needs to register more than one document, you need
64           multiple doc-base files, and can name them like this. In the event
65           that multiple doc-base files of this style in a single source
66           package share the same doc-id, they will be installed to
67           usr/share/doc-base/package-* instead of usr/share/doc-base/doc-id.
68

OPTIONS

70       -A, --all
71           Install all files specified by command line parameters in ALL
72           packages acted on.
73
74       -Xitem, --exclude=item
75           Exclude files that contain item anywhere in their filename from
76           being installed. Note that this includes doc-base files.
77
78       --sourcedir=dir
79           Look in the specified directory for files to be installed.  This
80           option requires compat 11 or later (it is silently ignored in
81           compat 10 or earlier).
82
83           Note that this is not the same as the --sourcedirectory option used
84           by the dh_auto_* commands. You rarely need to use this option,
85           since dh_installman automatically looks for files in debian/tmp in
86           debhelper compatibility level 11 and above.
87
88       --doc-main-package=main-package
89           Set the main package for a documentation package.  This is used to
90           install the documentation of the documentation package in
91           /usr/share/doc/main-package as recommended by the Debian policy
92           manual 3.9.7 in §12.3.
93
94           In compat 11 (or later), this option is only useful if debhelper's
95           auto-detection of the main package is wrong.  The option can also
96           be used to silence a warning from debhelper when the auto-detection
97           fails but the default happens to be correct.
98
99           This option cannot be used when dh_installdocs is instructed to act
100           on multiple packages.  If you need this option, you will generally
101           need to combine it with -p to ensure exactly one package is acted
102           on.
103
104           Please keep in mind that some documentation (the copyright file,
105           README.Debian, etc.) will be unaffected by this option.
106
107       --link-doc=package
108           Make the documentation directory of all packages acted on be a
109           symlink to the documentation directory of package. This has no
110           effect when acting on package itself, or if the documentation
111           directory to be created already exists when dh_installdocs is run.
112           To comply with policy, package must be a binary package that comes
113           from the same source package.
114
115           debhelper will try to avoid installing files into linked
116           documentation directories that would cause conflicts with the
117           linked package. The -A option will have no effect on packages with
118           linked documentation directories, and copyright, changelog,
119           README.Debian, and TODO files will not be installed.
120
121           (An older method to accomplish the same thing, which is still
122           supported, is to make the documentation directory of a package be a
123           dangling symlink, before calling dh_installdocs.)
124
125           Please note that this option only applies to the documentation
126           directory for the package itself.  When the package ships
127           documentation for another package (e.g. see --doc-main-package), it
128           will not use a symlink for the documentation of the other package.
129
130           CAVEAT 1: If a previous version of the package was built without
131           this option and is now built with it (or vice-versa), it requires a
132           "dir to symlink" (or "symlink to dir") migration.  Since debhelper
133           has no knowledge of previous versions, you have to enable this
134           migration itself.
135
136           This can be done by providing a "debian/package.maintscript" file
137           and using dh_installdeb(1) to provide the relevant maintainer
138           script snippets.
139
140           CAVEAT 2: The use of --link-doc should only be done when the
141           packages have same "architecture" type.  A link from an
142           architecture independent package to an architecture dependent
143           package (or vice versa) will not work.  Since compat 10, debhelper
144           will actively reject unsupported combinations.
145
146       file ...
147           Install these files as documentation into the first package acted
148           on. (Or in all packages if -A is specified).
149

EXAMPLES

151       This is an example of a debian/package.docs file:
152
153         README
154         TODO
155         debian/notes-for-maintainers.txt
156         docs/manual.txt
157         docs/manual.pdf
158         docs/manual-html/
159

NOTES

161       Note that dh_installdocs will happily copy entire directory hierarchies
162       if you ask it to (similar to cp -a). If it is asked to install a
163       directory, it will install the complete contents of the directory.
164

SEE ALSO

166       debhelper(7)
167
168       This program is a part of debhelper.
169

AUTHOR

171       Joey Hess <joeyh@debian.org>
172
173
174
17511.4                              2018-09-02                 DH_INSTALLDOCS(1)
Impressum