Added some code to peer into a data structure in Maemian/Schedule.pm. Also added the
[maemian] / nokia-lintian / checks / debian-readme
1 # debian-readme -- lintian check script -*- perl -*-
2
3 # Copyright (C) 1998 Richard Braakman
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program.  If not, you can find it on the World Wide
17 # Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free
18 # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
19 # MA 02110-1301, USA.
20
21 package Lintian::debian_readme;
22 use strict;
23 use Spelling;
24 use Tags;
25
26 sub run {
27
28 my $pkg = shift;
29 my $type = shift;
30 my $readme = "";
31 my $template;
32
33 if (open(IN, '<', "README.Debian")) {
34     local $_;
35     while (<IN>) {
36         if (m,/usr/doc\b,) {
37             tag 'readme-debian-mentions-usr-doc', "line $.";
38         }
39         $readme .= $_;
40     }
41     close(IN);
42 }
43
44 my @template =
45     ('Comments regarding the Package',
46      'So far nothing to say',
47      '<possible notes regarding this package - if none, delete this file>');
48 my $regex = join ('|', @template);
49 if ($readme =~ m/$regex/io) {
50     tag("readme-debian-contains-debmake-template");
51 } elsif ($readme =~ m/^\s*-- [^<]*<[^> ]+.\@unknown>/m) {
52     tag("readme-debian-contains-debmake-default-email-address");
53 }
54
55 spelling_check('spelling-error-in-readme-debian', $readme);
56
57 }
58
59 1;
60
61 # Local Variables:
62 # indent-tabs-mode: nil
63 # cperl-indent-level: 4
64 # End:
65 # vim: syntax=perl sw=4 sts=4 ts=4 et shiftround