3 # Copyright (C) Jeremiah C. Foster 2009, based on:
5 # Lintian -- Debian package checker
6 # Copyright (C) 1998 Christian Schwarz and Richard Braakman
8 # This program is free software. It is distributed under the terms of
9 # the GNU General Public License as published by the Free Software
10 # Foundation; either version 2 of the License, or (at your option) any
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, you can find it on the World Wide
20 # Web at http://www.gnu.org/copyleft/gpl.html, or write to the Free
21 # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
26 maemian - Maemo package checker
38 # Cannot yet pull in all of Lintian
39 # unshift @INC, "/home/jeremiah/maemian/lib";
40 # require Maemian::Output;
41 # my $lintout = new Maemian::Output;
43 # --- Command line options
44 my $inputfile; # --- A file passed to maemian
45 GetOptions ("inputfile|i=s" => \$inputfile);
51 my ($filename, $dirs) = fileparse($path);
52 if ($filename =~ /maemo/) {
53 print "W: Any use of the word \"maemo\" is subject to trademark.\n";
56 # --- Open file into an array
57 open my $file, '<', $path or die "Cannot open file: $!\n";
61 my ($field, $maintainer) = map { split /: / } grep /Maintainer/, @lines;
63 if ($maintainer =~ /(ubuntu|debian)/i) {
64 print "W: Maintainer email addres ($maintainer) might be the same as upstream.\n";
67 print "N: $maintainer\n";
69 if (grep /BEGIN PGP SIGNED MESSAGE/, @lines) {
70 print "N: $filename is signed\n";
72 # print "\n$dirs\n$filename\n";
75 croak "File not readable: $!\n";
80 file_tests($inputfile);
82 croak "No input file found: $!\n";