]> git.donarmstrong.com Git - debhelper.git/blob - dh_installlogcheck
fix pod breakage
[debhelper.git] / dh_installlogcheck
1 #!/usr/bin/perl -w
2
3 =head1 NAME
4
5 dh_installlogcheck - install logcheck rulefiles into etc/logcheck/
6
7 =cut
8
9 use strict;
10 use Debian::Debhelper::Dh_Lib;
11
12 =head1 SYNOPSIS
13
14 B<dh_installlogcheck> [S<I<debhelper options>>]
15
16 =head1 DESCRIPTION
17
18 B<dh_installlogcheck> is a debhelper program that is responsible for
19 installing logcheck rule files.
20
21 =head1 FILES
22
23 =over 4
24
25 =item debian/I<package>.logcheck.cracking
26
27 =item debian/I<package>.logcheck.violations
28
29 =item debian/I<package>.logcheck.violations.ignore
30
31 =item debian/I<package>.logcheck.ignore.workstation
32
33 =item debian/I<package>.logcheck.ignore.server
34
35 =item debian/I<package>.logcheck.ignore.paranoid
36
37 Each of these files, if present, are installed into corresponding
38 subdirectories of F<etc/logcheck/> in package build directories.
39
40 =head1 OPTIONS
41
42 =over 4
43
44 =item B<--name=>I<name>
45
46 Look for files named F<debian/package.name.logcheck.*> and install
47 them into the corresponding subdirectories of F<etc/logcheck/>, but
48 use the specified name instead of that of the package.
49
50 =back
51
52 =cut
53
54 init();
55
56 foreach my $package (@{$dh{DOPACKAGES}}) {
57         my $tmp=tmpdir($package);
58
59         foreach my $type (qw{ignore.d.workstation ignore.d.server
60                              ignore.d.paranoid cracking.d
61                              violations.d violations.ignore.d}) {
62                 my $typenod=$type;
63                 $typenod=~s/\.d//;
64                 my $logcheck=pkgfile($package,"logcheck.$typenod");
65                 if ($logcheck) {
66                         if (! -d "$tmp/etc/logcheck/$type") {
67                                 doit("install","-o",0,"-g",0,"-d","$tmp/etc/logcheck/$type");
68                         }
69                         my $packagenodot=pkgfilename($package); # run-parts..
70                         $packagenodot=~s/\./_/g;
71                         doit("install","-m","0644",$logcheck,"$tmp/etc/logcheck/$type/$packagenodot");
72                 }
73         }
74 }
75
76 =head1 SEE ALSO
77
78 L<debhelper(7)>
79
80 This program is a part of debhelper.
81     
82 =head1 AUTHOR
83
84 Jon Middleton <jjm@debian.org>
85
86 =cut