15
B<dh_install> [B<-X>I<item>] [B<--autodest>] [B<--sourcedir=>I<dir>] [S<I<debhelper options>>] [S<I<file [...] dest>>]
15
B<dh_install> [B<-X>I<item>] [B<--autodest>] [B<--sourcedir=>I<dir>] [S<I<debhelper options>>] [S<I<file> ... I<dest>>]
19
dh_install is a debhelper program that handles installing files into package
20
build directories. There are many dh_install* commands that handle installing
19
B<dh_install> is a debhelper program that handles installing files into package
20
build directories. There are many B<dh_install>I<*> commands that handle installing
21
21
specific types of files such as documentation, examples, man pages, and so on,
22
22
and they should be used when possible as they often have extra intelligence for
23
those particular tasks. dh_install, then, is useful for installing everything
23
those particular tasks. B<dh_install>, then, is useful for installing everything
24
24
else, for which no particular intelligence is needed. It is a replacement for
25
the old dh_movefiles command.
25
the old B<dh_movefiles> command.
27
27
This program may be used in one of two ways. If you just have a file or two
28
that the upstream Makefile does not install for you, you can run dh_install
28
that the upstream Makefile does not install for you, you can run B<dh_install>
29
29
on them to move them into place. On the other hand, maybe you have a large
30
30
package that builds multiple binary packages. You can use the upstream
31
Makefile to install it all into debian/tmp, and then use dh_install to copy
31
F<Makefile> to install it all into F<debian/tmp>, and then use B<dh_install> to copy
32
32
directories and files from there into the proper package build directories.
34
From debhelper compatibility level 7 on, dh_install will fall back to
35
looking in debian/tmp for files, if it doesn't find them in the current
36
directory (or whereever you've told it to look using --sourcedir).
34
From debhelper compatibility level 7 on, B<dh_install> will fall back to
35
looking in F<debian/tmp> for files, if it doesn't find them in the current
36
directory (or whereever you've told it to look using B<--sourcedir>).
65
65
This may be useful if you have a large package and want to make sure that
66
66
you don't miss installing newly added files in new upstream releases.
68
Note that files that are excluded from being moved via the -X option are not
68
Note that files that are excluded from being moved via the B<-X> option are not
71
71
=item B<--fail-missing>
73
This option is like --list-missing, except if a file was missed, it will
73
This option is like B<--list-missing>, except if a file was missed, it will
74
74
not only list the missing files, but also fail with a nonzero exit code.
76
=item B<-Xitem>, B<--exclude=item>
76
=item B<-X>I<item>, B<--exclude=>I<item>
78
Exclude files that contain "item" anywhere in their filename from
78
Exclude files that contain I<item> anywhere in their filename from
81
=item B<--sourcedir=dir>
81
=item B<--sourcedir=>I<dir>
83
83
Look in the specified directory for files to be installed.
85
Note that this is not the same as the --sourcedirectory option used
86
by the dh_auto_* commands. You rarely need to use this option, since
87
dh_install automatically looks for files in debian/tmp in debhelper
85
Note that this is not the same as the B<--sourcedirectory> option used
86
by the B<dh_auto_>I<*> commands. You rarely need to use this option, since
87
B<dh_install> automatically looks for files in F<debian/tmp> in debhelper
88
89
compatibility level 7 and above.
90
91
=item B<--autodest>
92
93
Guess as the destination directory to install things to. If this is
93
94
specified, you should not list destination directories in
94
debian/package.install files or on the command line. Instead, dh_install
95
F<debian/package.install> files or on the command line. Instead, B<dh_install>
95
96
will guess as follows:
97
Strip off debian/tmp (or the sourcedir if one is given) from the front of
98
Strip off F<debian/tmp> (or the sourcedir if one is given) from the front of
98
99
the filename, if it is present, and install into the dirname of the
99
filename. So if the filename is debian/tmp/usr/bin, then that directory
100
will be copied to debian/package/usr/. If the filename is
101
debian/tmp/etc/passwd, it will be copied to debian/package/etc/.
100
filename. So if the filename is F<debian/tmp/usr/bin>, then that directory
101
will be copied to F<debian/package/usr/>. If the filename is
102
F<debian/tmp/etc/passwd>, it will be copied to F<debian/package/etc/>.
103
104
Note that if you list exactly one filename or wildcard-pattern on a line by
105
debian/package.install file, with no explicit destination, then dh_install
106
F<debian/package.install> file, with no explicit destination, then B<dh_install>
106
107
will automatically guess the destination even if this flag is not set.
108
=item I<file [...] dest>
109
=item I<file> ... I<dest>
110
111
Lists files (or directories) to install and where to install them to.
111
The files will be installed into the first package dh_install acts on.
112
The files will be installed into the first package F<dh_install> acts on.
254
Suppose your package's upstream Makefile installs a binary, a man page, and
255
a library into appropriate subdirectories of debian/tmp. You want to put
255
Suppose your package's upstream F<Makefile> installs a binary, a man page, and
256
a library into appropriate subdirectories of F<debian/tmp>. You want to put
256
257
the library into package libfoo, and the rest into package foo. Your rules
257
file will run "dh_install --sourcedir=debian/tmp". Make debian/foo.install
258
file will run "B<dh_install --sourcedir=debian/tmp>". Make F<debian/foo.install>
261
262
usr/share/man/man1
263
While debian/libfoo.install contains:
264
While F<debian/libfoo.install> contains:
265
266
usr/lib/libfoo*.so.*
267
If you want a libfoo-dev package too, debian/libfoo-dev.install might contain:
268
If you want a libfoo-dev package too, F<debian/libfoo-dev.install> might contain:
270
271
usr/lib/libfoo*.so