.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
.    if \nF \{\
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{\
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "DH_INSTALLDOCS 1"
.TH DH_INSTALLDOCS 1 "2020-03-27" "12.10ubuntu1" "Debhelper"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
dh_installdocs \- install documentation into package build directories
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
\&\fBdh_installdocs\fR [\fIdebhelper options\fR] [\fB\-A\fR] [\fB\-X\fR\fIitem\fR] [\fIfile\fR ...]
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
\&\fBdh_installdocs\fR is a debhelper program that is responsible for installing
documentation into \fIusr/share/doc/package\fR in package build directories.
.PP
In compat 10 and earlier, \fBdh_install\fR\|(1) may be a better tool for handling
the upstream documentation, when upstream's own build system installs all the desired documentation
correctly.  In this case, \fBdh_installdocs\fR is still useful for installing
packaging related documentation (e.g. the \fIdebian/copyright\fR file).
.PP
From debhelper compatibility level 11 on, \fBdh_install\fR will fall back to
looking in \fIdebian/tmp\fR for files, if it does not find them in the current
directory (or wherever you've told it to look using \fB\-\-sourcedir\fR).
.PP
In compat 11 and later, \fBdh_installdocs\fR offers many of the features that
\&\fBdh_install\fR\|(1) also has.  Furthermore, \fBdh_installdocs\fR also supports
the \fBnodoc\fR build profile to exclude documentation (regardless of compat
level).
.SH "FILES"
.IX Header "FILES"
.IP "debian/\fIpackage\fR.docs" 4
.IX Item "debian/package.docs"
List documentation files to be installed into \fIpackage\fR.
.Sp
Supports substitution variables in compat 13 and later as
documented in \fBdebhelper\fR\|(7).
.IP "\fIdebian/copyright\fR" 4
.IX Item "debian/copyright"
The copyright file is installed into all packages, unless a more
specific copyright file is available.
.IP "debian/\fIpackage\fR.copyright" 4
.IX Item "debian/package.copyright"
.PD 0
.IP "debian/\fIpackage\fR.README.Debian" 4
.IX Item "debian/package.README.Debian"
.IP "debian/\fIpackage\fR.TODO" 4
.IX Item "debian/package.TODO"
.PD
Each of these files is automatically installed if present for a
\&\fIpackage\fR.
.IP "\fIdebian/README.Debian\fR" 4
.IX Item "debian/README.Debian"
.PD 0
.IP "\fIdebian/TODO\fR" 4
.IX Item "debian/TODO"
.PD
These files are installed into the first binary package listed in
debian/control.
.Sp
Note that \fI\s-1README\s0.debian\fR files are also installed as \fI\s-1README\s0.Debian\fR,
and \fI\s-1TODO\s0\fR files will be installed as \fI\s-1TODO\s0.Debian\fR in non-native packages.
.IP "debian/\fIpackage\fR.doc\-base" 4
.IX Item "debian/package.doc-base"
Installed as doc-base control files. Note that the doc-id will be
determined from the \fBDocument:\fR entry in the doc-base control file in
question. In the event that multiple doc-base files in a single source
package share the same doc-id, they will be installed to
usr/share/doc\-base/package instead of usr/share/doc\-base/doc\-id.
.IP "debian/\fIpackage\fR.doc\-base.*" 4
.IX Item "debian/package.doc-base.*"
If your package needs to register more than one document, you need
multiple doc-base files, and can name them like this. In the event
that multiple doc-base files of this style in a single source package
share the same doc-id, they will be installed to
usr/share/doc\-base/package\-* instead of usr/share/doc\-base/doc\-id.
.SH "OPTIONS"
.IX Header "OPTIONS"
.IP "\fB\-A\fR, \fB\-\-all\fR" 4
.IX Item "-A, --all"
Install all files specified by command line parameters in \s-1ALL\s0 packages
acted on.
.IP "\fB\-X\fR\fIitem\fR, \fB\-\-exclude=\fR\fIitem\fR" 4
.IX Item "-Xitem, --exclude=item"
Exclude files that contain \fIitem\fR anywhere in their filename from
being installed. Note that this includes doc-base files.
.IP "\fB\-\-sourcedir=\fR\fIdir\fR" 4
.IX Item "--sourcedir=dir"
Look in the specified directory for files to be installed.  This option
requires compat 11 or later (it is silently ignored in compat 10 or earlier).
.Sp
Note that this is not the same as the \fB\-\-sourcedirectory\fR option used
by the \fBdh_auto_\fR\fI*\fR commands. You rarely need to use this option, since
\&\fBdh_installman\fR automatically looks for files in \fIdebian/tmp\fR in debhelper
compatibility level 11 and above.
.IP "\fB\-\-doc\-main\-package=\fR\fImain-package\fR" 4
.IX Item "--doc-main-package=main-package"
Set the main package for a documentation package.  This is used to
install the documentation of the documentation package in \fI/usr/share/doc/\fImain-package\fI\fR as recommended by the Debian policy
manual 3.9.7 in §12.3.
.Sp
In compat 11 (or later), this option is only useful if debhelper's
auto-detection of the main package is wrong.  The option can also be
used to silence a warning from debhelper when the auto-detection fails
but the default happens to be correct.
.Sp
This option cannot be used when \fBdh_installdocs\fR is instructed to act
on multiple packages.  If you need this option, you will generally
need to combine it with \fB\-p\fR to ensure exactly one package is acted
on.
.Sp
Please keep in mind that some documentation (the copyright file,
\&\s-1README\s0.Debian, etc.) will be unaffected by this option.
.IP "\fB\-\-link\-doc=\fR\fIpackage\fR" 4
.IX Item "--link-doc=package"
Make the documentation directory of all packages acted on be a symlink to
the documentation directory of \fIpackage\fR. This has no effect when acting on
\&\fIpackage\fR itself, or if the documentation directory to be created already
exists when \fBdh_installdocs\fR is run. To comply with policy, \fIpackage\fR must
be a binary package that comes from the same source package.
.Sp
debhelper will try to avoid installing files into linked documentation
directories that would cause conflicts with the linked package. The \fB\-A\fR
option will have no effect on packages with linked documentation
directories, and \fIcopyright\fR, \fIchangelog\fR, \fI\s-1README\s0.Debian\fR, and \fI\s-1TODO\s0\fR files will
not be installed.
.Sp
(An older method to accomplish the same thing, which is still supported,
is to make the documentation directory of a package be a dangling symlink,
before calling \fBdh_installdocs\fR.)
.Sp
Please note that this option only applies to the documentation
directory for the package itself.  When the package ships
documentation for another package (e.g. see \fB\-\-doc\-main\-package\fR), it
will not use a symlink for the documentation of the other package.
.Sp
\&\fB\s-1CAVEAT 1\s0\fR: If a previous version of the package was built without this
option and is now built with it (or vice-versa), it requires a \*(L"dir to
symlink\*(R" (or \*(L"symlink to dir\*(R") migration.  Since debhelper has no
knowledge of previous versions, you have to enable this migration
itself.
.Sp
This can be done by providing a "debian/\fIpackage\fR.maintscript" file
and using \fBdh_installdeb\fR\|(1) to provide the relevant maintainer
script snippets.
.Sp
\&\fB\s-1CAVEAT 2\s0\fR: The use of \fB\-\-link\-doc\fR should only be done when the
packages have same \*(L"architecture\*(R" type.  A link from an architecture
independent package to an architecture dependent package (or vice
versa) will not work.  Since compat 10, debhelper will actively reject
unsupported combinations.
.IP "\fIfile\fR ..." 4
.IX Item "file ..."
Install these files as documentation into the first package acted on. (Or
in all packages if \fB\-A\fR is specified).
.SH "EXAMPLES"
.IX Header "EXAMPLES"
This is an example of a \fIdebian/package.docs\fR file:
.PP
.Vb 6
\&  README
\&  TODO
\&  debian/notes\-for\-maintainers.txt
\&  docs/manual.txt
\&  docs/manual.pdf
\&  docs/manual\-html/
.Ve
.SH "NOTES"
.IX Header "NOTES"
Note that \fBdh_installdocs\fR will happily copy entire directory hierarchies if
you ask it to (similar to \fBcp \-a\fR). If it is asked to install a
directory, it will install the complete contents of the directory.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fBdebhelper\fR\|(7)
.PP
This program is a part of debhelper.
.SH "AUTHOR"
.IX Header "AUTHOR"
Joey Hess <joeyh@debian.org>
