]> git.donarmstrong.com Git - debhelper.git/blob - dh_installinfo
Updated French man page translation. Closes: #685560
[debhelper.git] / dh_installinfo
1 #!/usr/bin/perl -w
2
3 =head1 NAME
4
5 dh_installinfo - install info files
6
7 =cut
8
9 use strict;
10 use Debian::Debhelper::Dh_Lib;
11
12 =head1 SYNOPSIS
13
14 B<dh_installinfo> [S<I<debhelper options>>] [B<-A>] [S<I<file> ...>]
15
16 =head1 DESCRIPTION
17
18 B<dh_installinfo> is a debhelper program that is responsible for installing
19 info files into F<usr/share/info> in the package build directory.
20
21 =head1 FILES
22
23 =over 4
24
25 =item debian/I<package>.info
26
27 List info files to be installed.
28
29 =back
30
31 =head1 OPTIONS
32
33 =over 4
34
35 =item B<-A>, B<--all>
36
37 Install all files specified by command line parameters in ALL packages
38 acted on.
39
40 =item I<file> ...
41
42 Install these info files into the first package acted on. (Or in
43 all packages if B<-A> is specified).
44
45 =back
46
47 =cut
48
49 init();
50
51 foreach my $package (@{$dh{DOPACKAGES}}) {
52         my $tmp=tmpdir($package);
53         my $file=pkgfile($package,"info");
54
55         my @info;
56         
57         if ($file) {
58                 @info=filearray($file, ".");
59         }
60
61         if (($package eq $dh{FIRSTPACKAGE} || $dh{PARAMS_ALL}) && @ARGV) {
62                 push @info, @ARGV;
63         }
64
65         if (@info) {
66                 if ( ! -d "$tmp/usr/share/info") {
67                         doit("install","-d","$tmp/usr/share/info");
68                 }
69                 doit("cp",@info,"$tmp/usr/share/info");
70                 doit("chmod","-R", "go=rX","$tmp/usr/share/info/");
71                 doit("chmod","-R", "u+rw","$tmp/usr/share/info/");
72                 # For transition, could be removed later.
73                 addsubstvar($package, "misc:Depends", "dpkg (>= 1.15.4) | install-info");
74         }
75 }
76
77 =head1 SEE ALSO
78
79 L<debhelper(7)>
80
81 This program is a part of debhelper.
82
83 =head1 AUTHOR
84
85 Joey Hess <joeyh@debian.org>
86
87 =cut