]> git.donarmstrong.com Git - debhelper.git/blob - dh_installlogrotate
Typo. Closes: #653339
[debhelper.git] / dh_installlogrotate
1 #!/usr/bin/perl -w
2
3 =head1 NAME
4
5 dh_installlogrotate - install logrotate config files
6
7 =cut
8
9 use strict;
10 use Debian::Debhelper::Dh_Lib;
11
12 =head1 SYNOPSIS
13
14 B<dh_installlogrotate> [S<I<debhelper options>>] [B<--name=>I<name>]
15
16 =head1 DESCRIPTION
17
18 B<dh_installlogrotate> is a debhelper program that is responsible for installing
19 logrotate config files into F<etc/logrotate.d> in package build directories.
20 Files named F<debian/package.logrotate> are installed.
21
22 =head1 OPTIONS
23
24 =over 4
25
26 =item B<--name=>I<name>
27
28 Look for files named F<debian/package.name.logrotate> and install them as
29 F<etc/logrotate.d/name>, instead of using the usual files and installing them
30 as the package name.
31
32 =back
33
34 =cut
35
36 init();
37
38 foreach my $package (@{$dh{DOPACKAGES}}) {
39         my $tmp=tmpdir($package);
40         my $file=pkgfile($package,"logrotate");
41
42         if ($file) {
43                 if (! -d "$tmp/etc/logrotate.d") {
44                         doit("install","-o",0,"-g",0,"-d","$tmp/etc/logrotate.d");
45                 }
46                 doit("install","-m",644,$file,"$tmp/etc/logrotate.d/".pkgfilename($package));
47         }
48 }
49
50 =head1 SEE ALSO
51
52 L<debhelper(7)>
53
54 This program is a part of debhelper.
55
56 =head1 AUTHOR
57
58 Joey Hess <joeyh@debian.org>
59
60 =cut