1DH_INSTALL(1)                      Debhelper                     DH_INSTALL(1)
2
3
4

NAME

6       dh_install - install files into package build directories
7

SYNOPSIS

9       dh_install [-Xitem] [--autodest] [--sourcedir=dir] [debhelper options]
10       [file|dir ... destdir]
11

DESCRIPTION

13       dh_install is a debhelper program that handles installing files into
14       package build directories. There are many dh_install* commands that
15       handle installing specific types of files such as documentation,
16       examples, man pages, and so on, and they should be used when possible
17       as they often have extra intelligence for those particular tasks.
18       dh_install, then, is useful for installing everything else, for which
19       no particular intelligence is needed. It is a replacement for the old
20       dh_movefiles command.
21
22       This program may be used in one of two ways. If you just have a file or
23       two that the upstream Makefile does not install for you, you can run
24       dh_install on them to move them into place. On the other hand, maybe
25       you have a large package that builds multiple binary packages. You can
26       use the upstream Makefile to install it all into debian/tmp, and then
27       use dh_install to copy directories and files from there into the proper
28       package build directories.
29
30       From debhelper compatibility level 7 on, dh_install will fall back to
31       looking in debian/tmp for files, if it does not find them in the
32       current directory (or wherever you've told it to look using
33       --sourcedir).
34

FILES

36       debian/package.install
37           List the files to install into each package and the directory they
38           should be installed to. The format is a set of lines, where each
39           line lists a file or files to install, and at the end of the line
40           tells the directory it should be installed in. The name of the
41           files (or directories) to install should be given relative to the
42           current directory, while the installation directory is given
43           relative to the package build directory. You may use wildcards in
44           the names of the files to install.
45
46           Note that if you list exactly one filename or wildcard-pattern on a
47           line by itself, with no explicit destination, then dh_install will
48           automatically guess the destination to use, the same as if the
49           --autodest option were used.
50
51           Supports substitution variables in compat 13 and later as
52           documented in debhelper(7).
53
54       debian/not-installed
55           Used with the deprecated --list-missing and --fail-missing options.
56           Please refer to dh_missing(1) for the documentation of this file.
57

OPTIONS

59       --list-missing
60           Deprecated: Please use dh_missing --list-missing instead.  If you
61           use this option, dh_install will call dh_missing with that option
62           after it has processed all the files.  Please see dh_missing(1) for
63           the documentation of this option.
64
65           This option is removed in compat 12.
66
67       --fail-missing
68           Deprecated: Please use dh_missing --fail-missing instead.  If you
69           use this option, dh_install will call dh_missing with that option
70           after it has processed all the files.  Please see dh_missing(1) for
71           the documentation of this option.
72
73           This option is removed in compat 12.
74
75       --sourcedir=dir
76           Look in the specified directory for files to be installed.
77
78           Note that this is not the same as the --sourcedirectory option used
79           by the dh_auto_* commands. You rarely need to use this option,
80           since dh_install automatically looks for files in debian/tmp in
81           debhelper compatibility level 7 and above.
82
83       --autodest
84           Guess as the destination directory to install things to. If this is
85           specified, you should not list destination directories in
86           debian/package.install files or on the command line. Instead,
87           dh_install will guess as follows:
88
89           Strip off debian/tmp (or the sourcedir if one is given) from the
90           front of the filename, if it is present, and install into the
91           dirname of the filename. So if the filename is debian/tmp/usr/bin,
92           then that directory will be copied to debian/package/usr/. If the
93           filename is debian/tmp/etc/passwd, it will be copied to
94           debian/package/etc/.
95
96       file|dir ... destdir
97           Lists files (or directories) to install and where to install them
98           to.  The files will be installed into the first package dh_install
99           acts on.
100

EXAMPLES

102       Here are some small examples of configuration files for dh_install.
103
104           # Install my-prog into usr/bin (as "usr/bin/my-prog")
105           my-prog usr/bin
106
107           # Install a plugins directory into usr/share/my-prog
108           # (as "usr/share/my-prog/plugins/")
109           plugins usr/share/my-prog
110
111           # Install a file with spaces in into usr/share/my-prog/data
112           # (as "usr/share/my-prog/data/my datafile with spaces.txt")
113           # ASSUMES COMPAT 13, where substitution patterns are available
114           my${Space}datafile${Space}with${Space}spaces.txt usr/share/my-prog/data
115
116           # Install a library into the multi-arch lib directory
117           # ASSUMES COMPAT 13, where substitution patterns are available
118           build/output/libfrop*.so.* usr/lib/${DEB_HOST_MULTIARCH}
119

LIMITATIONS

121       dh_install cannot rename files or directories, it can only install them
122       with the names they already have into wherever you want in the package
123       build tree.
124
125       However, renaming can be achieved by using dh-exec with compatibility
126       level 9 or later.  An example debian/package.install file using dh-exec
127       could look like:
128
129        #!/usr/bin/dh-exec
130        debian/default.conf => /etc/my-package/start.conf
131
132       Please remember the following three things:
133
134       •   The package must be using compatibility level 9 or later (see
135           debhelper(7))
136
137       •   The package will need a build-dependency on dh-exec.
138
139       •   The install file must be marked as executable.
140

SEE ALSO

142       debhelper(7)
143
144       This program is a part of debhelper.
145

AUTHOR

147       Joey Hess <joeyh@debian.org>
148
149
150
15113.11.6                           2023-09-02                     DH_INSTALL(1)
Impressum