257 lines
7.6 KiB
HTML
257 lines
7.6 KiB
HTML
|
||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
<HTML><HEAD><TITLE>Man page of DH_INSTALL</TITLE>
|
||
</HEAD><BODY>
|
||
<H1>DH_INSTALL</H1>
|
||
Section: Debhelper (1)<BR>Updated: 2020-03-27<BR><A HREF="#index">Index</A>
|
||
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<A NAME="lbAB"> </A>
|
||
<H2>NAME</H2>
|
||
|
||
dh_install - install files into package build directories
|
||
<A NAME="lbAC"> </A>
|
||
<H2>SYNOPSIS</H2>
|
||
|
||
|
||
|
||
<B>dh_install</B> [<B>-X</B><I>item</I>] [<B>--autodest</B>] [<B>--sourcedir=</B><I>dir</I>] [<I>debhelper options</I>] [<I>file|dir</I> ... <I>destdir</I>]
|
||
<A NAME="lbAD"> </A>
|
||
<H2>DESCRIPTION</H2>
|
||
|
||
|
||
|
||
<B>dh_install</B> is a debhelper program that handles installing files into package
|
||
build directories. There are many <B>dh_install</B><I>*</I> commands that handle installing
|
||
specific types of files such as documentation, examples, man pages, and so on,
|
||
and they should be used when possible as they often have extra intelligence for
|
||
those particular tasks. <B>dh_install</B>, then, is useful for installing everything
|
||
else, for which no particular intelligence is needed. It is a replacement for
|
||
the old <B>dh_movefiles</B> command.
|
||
<P>
|
||
|
||
This program may be used in one of two ways. If you just have a file or two
|
||
that the upstream Makefile does not install for you, you can run <B>dh_install</B>
|
||
on them to move them into place. On the other hand, maybe you have a large
|
||
package that builds multiple binary packages. You can use the upstream
|
||
<I>Makefile</I> to install it all into <I>debian/tmp</I>, and then use <B>dh_install</B> to copy
|
||
directories and files from there into the proper package build directories.
|
||
<P>
|
||
|
||
From debhelper compatibility level 7 on, <B>dh_install</B> will fall back to
|
||
looking in <I>debian/tmp</I> for files, if it does not find them in the current
|
||
directory (or wherever you've told it to look using <B>--sourcedir</B>).
|
||
<A NAME="lbAE"> </A>
|
||
<H2>FILES</H2>
|
||
|
||
|
||
|
||
<DL COMPACT>
|
||
<DT id="1">debian/<I>package</I>.install<DD>
|
||
|
||
|
||
List the files to install into each package and the directory they should be
|
||
installed to. The format is a set of lines, where each line lists a file or
|
||
files to install, and at the end of the line tells the directory it should be
|
||
installed in. The name of the files (or directories) to install should be given
|
||
relative to the current directory, while the installation directory is given
|
||
relative to the package build directory. You may use wildcards in the names of
|
||
the files to install.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
Note that if you list exactly one filename or wildcard-pattern on a line by
|
||
itself, with no explicit destination, then <B>dh_install</B>
|
||
will automatically guess the destination to use, the same as if the
|
||
--autodest option were used.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
Supports substitution variables in compat 13 and later as
|
||
documented in <B><A HREF="/cgi-bin/man/man2html?7+debhelper">debhelper</A></B>(7).
|
||
<DT id="2">debian/not-installed<DD>
|
||
|
||
|
||
Used with the deprecated <B>--list-missing</B> and <B>--fail-missing</B> options.
|
||
Please refer to <B><A HREF="/cgi-bin/man/man2html?1+dh_missing">dh_missing</A></B>(1) for the documentation of this file.
|
||
</DL>
|
||
<A NAME="lbAF"> </A>
|
||
<H2>OPTIONS</H2>
|
||
|
||
|
||
|
||
<DL COMPACT>
|
||
<DT id="3"><B>--list-missing</B><DD>
|
||
|
||
|
||
<B>Deprecated</B>: Please use <B>dh_missing --list-missing</B> instead. If you use
|
||
this option, <B>dh_install</B> will call <B>dh_missing</B> with that option after it has
|
||
processed all the files. Please see <B><A HREF="/cgi-bin/man/man2html?1+dh_missing">dh_missing</A></B>(1) for the documentation of
|
||
this option.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
This option is removed in compat 12.
|
||
<DT id="4"><B>--fail-missing</B><DD>
|
||
|
||
|
||
<B>Deprecated</B>: Please use <B>dh_missing --fail-missing</B> instead. If you use
|
||
this option, <B>dh_install</B> will call <B>dh_missing</B> with that option after it has
|
||
processed all the files. Please see <B><A HREF="/cgi-bin/man/man2html?1+dh_missing">dh_missing</A></B>(1) for the documentation of
|
||
this option.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
This option is removed in compat 12.
|
||
<DT id="5"><B>--sourcedir=</B><I>dir</I><DD>
|
||
|
||
|
||
Look in the specified directory for files to be installed.
|
||
|
||
|
||
<P>
|
||
|
||
|
||
Note that this is not the same as the <B>--sourcedirectory</B> option used
|
||
by the <B>dh_auto_</B><I>*</I> commands. You rarely need to use this option, since
|
||
<B>dh_install</B> automatically looks for files in <I>debian/tmp</I> in debhelper
|
||
compatibility level 7 and above.
|
||
<DT id="6"><B>--autodest</B><DD>
|
||
|
||
|
||
Guess as the destination directory to install things to. If this is
|
||
specified, you should not list destination directories in
|
||
<I>debian/package.install</I> files or on the command line. Instead, <B>dh_install</B>
|
||
will guess as follows:
|
||
|
||
|
||
<P>
|
||
|
||
|
||
Strip off <I>debian/tmp</I> (or the sourcedir if one is given) from the front of
|
||
the filename, if it is present, and install into the dirname of the
|
||
filename. So if the filename is <I>debian/tmp/usr/bin</I>, then that directory
|
||
will be copied to <I>debian/package/usr/</I>. If the filename is
|
||
<I>debian/tmp/etc/passwd</I>, it will be copied to <I>debian/package/etc/</I>.
|
||
<DT id="7"><I>file|dir</I> ... <I>destdir</I><DD>
|
||
|
||
|
||
Lists files (or directories) to install and where to install them to.
|
||
The files will be installed into the first package <I>dh_install</I> acts on.
|
||
</DL>
|
||
<A NAME="lbAG"> </A>
|
||
<H2>EXAMPLES</H2>
|
||
|
||
|
||
|
||
Here are some small examples of configuration files for dh_install.
|
||
<P>
|
||
|
||
|
||
|
||
<PRE>
|
||
# Install my-prog into usr/bin (as "usr/bin/my-prog")
|
||
my-prog usr/bin
|
||
|
||
# Install a plugins directory into usr/share/my-prog
|
||
# (as "usr/share/my-prog/plugins/")
|
||
plugins usr/share/my-prog
|
||
|
||
# Install a file with spaces in into usr/share/my-prog/data
|
||
# (as "usr/share/my-prog/data/my datafile with spaces.txt")
|
||
# ASSUMES COMPAT 13, where substitution patterns are available
|
||
my${Space}datafile${Space}with${Space}spaces.txt usr/share/my-prog/data
|
||
|
||
# Install a library into the multi-arch lib directory
|
||
# ASSUMES COMPAT 13, where substitution patterns are available
|
||
build/output/libfrop*.so.* usr/lib/${DEB_HOST_MULTIARCH}
|
||
|
||
</PRE>
|
||
|
||
|
||
<A NAME="lbAH"> </A>
|
||
<H2>LIMITATIONS</H2>
|
||
|
||
|
||
|
||
<B>dh_install</B> cannot rename files or directories, it can only install them
|
||
with the names they already have into wherever you want in the package
|
||
build tree.
|
||
<P>
|
||
|
||
However, renaming can be achieved by using <B>dh-exec</B> with compatibility level 9 or
|
||
later. An example debian/<I>package</I>.install file using <B>dh-exec</B>
|
||
could look like:
|
||
<P>
|
||
|
||
|
||
|
||
<PRE>
|
||
#!/usr/bin/dh-exec
|
||
debian/default.conf => /etc/my-package/start.conf
|
||
|
||
</PRE>
|
||
|
||
|
||
<P>
|
||
|
||
Please remember the following three things:
|
||
<DL COMPACT>
|
||
<DT id="8">•<DD>
|
||
The package must be using compatibility level 9 or later (see <B><A HREF="/cgi-bin/man/man2html?7+debhelper">debhelper</A></B>(7))
|
||
<DT id="9">•<DD>
|
||
The package will need a build-dependency on dh-exec.
|
||
<DT id="10">•<DD>
|
||
The install file must be marked as executable.
|
||
</DL>
|
||
<A NAME="lbAI"> </A>
|
||
<H2>SEE ALSO</H2>
|
||
|
||
|
||
|
||
<B><A HREF="/cgi-bin/man/man2html?7+debhelper">debhelper</A></B>(7)
|
||
<P>
|
||
|
||
This program is a part of debhelper.
|
||
<A NAME="lbAJ"> </A>
|
||
<H2>AUTHOR</H2>
|
||
|
||
|
||
|
||
Joey Hess <<A HREF="mailto:joeyh@debian.org">joeyh@debian.org</A>>
|
||
<P>
|
||
|
||
<HR>
|
||
<A NAME="index"> </A><H2>Index</H2>
|
||
<DL>
|
||
<DT id="11"><A HREF="#lbAB">NAME</A><DD>
|
||
<DT id="12"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
||
<DT id="13"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
||
<DT id="14"><A HREF="#lbAE">FILES</A><DD>
|
||
<DT id="15"><A HREF="#lbAF">OPTIONS</A><DD>
|
||
<DT id="16"><A HREF="#lbAG">EXAMPLES</A><DD>
|
||
<DT id="17"><A HREF="#lbAH">LIMITATIONS</A><DD>
|
||
<DT id="18"><A HREF="#lbAI">SEE ALSO</A><DD>
|
||
<DT id="19"><A HREF="#lbAJ">AUTHOR</A><DD>
|
||
</DL>
|
||
<HR>
|
||
This document was created by
|
||
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
||
using the manual pages.<BR>
|
||
Time: 00:05:10 GMT, March 31, 2021
|
||
</BODY>
|
||
</HTML>
|