~ubuntu-branches/ubuntu/oneiric/debhelper/oneiric-updates

« back to all changes in this revision

Viewing changes to dh_install

  • Committer: Bazaar Package Importer
  • Author(s): أحمد المحمودي (Ahmed El-Mahmoudy)
  • Date: 2011-02-07 17:16:49 UTC
  • mfrom: (1.4.21 sid)
  • Revision ID: james.westby@ubuntu.com-20110207171649-v8k6uowavom83cxt
Tags: 8.1.0ubuntu1
* Merge with Debian (LP: #714705); remaining changes:
  - dh_installinit: Add --upstart-only and --onlyscripts-upstart modes.
  - Add various autoscripts for above: postinst-upstart,
    postinst-upstart-replace, postinst-upstart-restart,
    prerm-upstart, prerm-upstart-norestart, preinst-removeconffile.
  - dh_installudev: Change default init.d symlink priority to 40.
  - dh_installchangelogs: Do not install upstream changelog in compat level
    7. This floods packages with huge upstream changelogs which take
    precious CD space.
  - dh_strip, dh_makeshlibs: use triplet-objdump, triplet-objcopy and
    triplet-strip from cross-binutils when cross-compiling; Debian #412118.
  - add dh_apparmor and autoscripts
  - debian/rules: override build target to set executable bit for
    dh_apparmor before actually running dh build, that is in order to get
    the manpage built for dh_apparmor.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 
13
13
=head1 SYNOPSIS
14
14
 
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>>]
16
16
 
17
17
=head1 DESCRIPTION
18
18
 
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.
26
26
 
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.
33
33
 
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>).
37
37
 
38
38
=head1 FILES
39
39
 
57
57
 
58
58
=item B<--list-missing>
59
59
 
60
 
This option makes dh_install keep track of the files it installs, and then at
 
60
This option makes B<dh_install> keep track of the files it installs, and then at
61
61
the end, compare that list with the files in the source directory. If any of
62
62
the files (and symlinks) in the source directory were not installed to
63
63
somewhere, it will warn on stderr about that.
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.
67
67
 
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
69
69
warned about.
70
70
 
71
71
=item B<--fail-missing>
72
72
 
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. 
75
75
 
76
 
=item B<-Xitem>, B<--exclude=item>
 
76
=item B<-X>I<item>, B<--exclude=>I<item>
77
77
 
78
 
Exclude files that contain "item" anywhere in their filename from
 
78
Exclude files that contain I<item> anywhere in their filename from
79
79
being installed.
80
80
 
81
 
=item B<--sourcedir=dir>
 
81
=item B<--sourcedir=>I<dir>
82
82
 
83
83
Look in the specified directory for files to be installed.
84
84
 
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
 
88
89
compatibility level 7 and above.
89
90
 
90
91
=item B<--autodest>
91
92
 
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:
96
97
 
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/>.
102
103
 
103
104
Note that if you list exactly one filename or wildcard-pattern on a line by
104
105
itself in a
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.
107
108
 
108
 
=item I<file [...] dest>
 
109
=item I<file> ... I<dest>
109
110
 
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.
112
113
 
113
114
=back
114
115
 
251
252
 
252
253
=head1 EXAMPLE
253
254
 
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>
258
259
contain:
259
260
 
260
261
  usr/bin
261
262
  usr/share/man/man1
262
263
 
263
 
While debian/libfoo.install contains:
 
264
While F<debian/libfoo.install> contains:
264
265
 
265
266
  usr/lib/libfoo*.so.*
266
267
 
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:
268
269
 
269
270
  usr/include
270
271
  usr/lib/libfoo*.so
272
273
 
273
274
=head1 LIMITATIONS
274
275
 
275
 
dh_install cannot rename files or directories, it can only install them
 
276
B<dh_install> cannot rename files or directories, it can only install them
276
277
with the names they already have into wherever you want in the package
277
278
build tree.
278
279