]> git.donarmstrong.com Git - debhelper.git/blob - dh_installlogcheck
r589: * Added dh_scrollkeeper, by Ross Burton.
[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<B<debhelper options>>]
15
16 =head1 DESCRIPTION
17
18 dh_installlocgheck is a debhelper program that is responsible for
19 installing logcheck rule files into subdirectories of etc/logcheck/ in
20 package build directories. The files debian/package.logcheck.cracking,
21 debian/package.logcheck.violations,
22 debian/package.logcheck.violations.ignore,
23 debian/package.logcheck.ignore.workstation,
24 debian/package.logcheck.ignore.server and
25 debian/package.logcheck.ignore.paranoid are installed if present.
26
27 =cut
28
29 init();
30
31 foreach my $package (@{$dh{DOPACKAGES}}) {
32     my $tmp=tmpdir($package);
33
34     foreach my $type (qw{ignore.d.workstation ignore.d.server
35                              ignore.d.paranoid cracking.d
36                              violations.d violations.ignore.d}) {
37         my $typenod=$type;
38         $typenod=~s/\.d//;
39         my $logcheck=pkgfile($package,"logcheck.$typenod");
40         if ($logcheck) {
41             if (! -d "$tmp/etc/logcheck/$type") {
42                 doit("install","-o",0,"-g",0,"-d","$tmp/etc/logcheck/$type");
43             }
44             my $packagenodot=$package; # run-parts..
45             $packagenodot=~s/\./_/g;
46             doit("install","-m",600,$logcheck,"$tmp/etc/logcheck/$type/$packagenodot");
47         }
48     }
49 }
50
51 =head1 SEE ALSO
52
53 L<debhelper(7)>
54
55 This program is a part of debhelper.
56     
57 =head1 AUTHOR
58
59 Jon Middleton <jjm@debian.org>
60
61 =cut