]> git.donarmstrong.com Git - debhelper.git/blob - dh_lintian
Merge branch 'master' of ssh://git.debian.org/git/debhelper/debhelper
[debhelper.git] / dh_lintian
1 #!/usr/bin/perl -w
2
3 =head1 NAME
4
5 dh_lintian - install lintian override files into package build directories
6
7 =cut
8
9 use strict;
10 use Debian::Debhelper::Dh_Lib;
11
12 =head1 SYNOPSIS
13
14 B<dh_lintian> [S<I<debhelper options>>]
15
16 =head1 DESCRIPTION
17
18 dh_lintian is a debhelper program that is responsible for installing
19 override files used by lintian into package build directories.
20
21 If a file named debian/package.lintian-overrides exists, then it is
22 installed into usr/share/lintian/overrides/package in the package
23 build directory. This file is used to suppress erroneous lintian
24 diagnostics.
25
26 Note that a file named debian/source.lintian-overrides will not be
27 installed, but will be scanned by lintian to provide overrides for the
28 source package.
29
30 =cut
31
32 init();
33
34 foreach my $package (@{$dh{DOPACKAGES}}) {
35         next if is_udeb($package);
36
37         my $tmp=tmpdir($package);
38         my $or_dir = "$tmp/usr/share/lintian/overrides";
39         my $overrides=pkgfile($package,"lintian-overrides");
40
41         if ($overrides ne '') {
42                 if (! -d "$or_dir") {
43                          doit("install","-d","$or_dir");
44                 }
45                 doit("install","-p","-m644",$overrides,"$or_dir/$package");
46         }
47 }
48
49 =head1 SEE ALSO
50
51 L<debhelper(1)>
52
53 This program is a part of debhelper.
54
55 L<lintian(1)>
56
57 =head1 AUTHOR
58
59 Steve Robbins <smr@debian.org>
60
61 =cut