]> git.donarmstrong.com Git - debhelper.git/blob - dh_installlogrotate
r458: * Typo, Closes: #92407
[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   dh_installlogrotate [debhelper options]
15
16 =head1 DESCRIPTION
17
18 dh_installlogrotate is a debhelper program that is responsible for installing
19 logrotate config files into etc/logrotate.d in package build directories.
20 Files named debian/package.logrotate are installed.
21
22 =cut
23
24 init();
25
26 foreach my $package (@{$dh{DOPACKAGES}}) {
27         my $tmp=tmpdir($package);
28         my $file=pkgfile($package,"logrotate");
29
30         if ($file) {
31                 if (! -d "$tmp/etc/logrotate.d") {
32                         doit("install","-o",0,"-g",0,"-d","$tmp/etc/logrotate.d");
33                 }
34                 doit("install","-m",644,$file,"$tmp/etc/logrotate.d/$package");
35         }
36 }
37
38 =head1 SEE ALSO
39
40 L<debhelper(1)>
41
42 This program is a part of debhelper.
43
44 =head1 AUTHOR
45
46 Joey Hess <joeyh@debian.org>
47
48 =cut