3 # Copyright (C) Jeremiah C. Foster 2009, based on:
4 # Lintian -- Debian package checker
5 # Copyright (C) 1998 Christian Schwarz and Richard Braakman
9 minimae - A small, cuddly version of maemian
13 Maemian is the maemo version of lintian - a policy checker designed to
14 assure the quality of a package uploaded into the maemo.org repositories.
15 The goal of maemian is to improve quality by checking that the maemo
16 packaging policy is followed. In order to do that it reads files in the
17 uploaded deb. Currently maemian only looks at the .dsc file and tries to
18 ascertain who uploaded it, and if they used the correct email address.
22 # Check a debian description file
35 # --- Command line options
36 my $inputfile; # --- A file passed on the command line
42 'verbose' => \$verbose,
43 'inputfile|i=s' => \$inputfile,
46 # --- Process Command line options
48 pod2usage() if not $inputfile;
50 # --- Output settings.
51 my $out = new Maemian::Output;
54 $out->v_msg("Verbose on");
56 # --- If this is set to true, then you only get msgs
58 $out->msg("Notice on");
59 # --- If this is set to true, then you will get verbose messages.
76 my ($filename, $dirs) = fileparse($path);
77 # --- maemo is a trademarked term
78 if ($filename =~ /maemo/) {
79 print "W: Any use of the word \"maemo\" in the package name (not package version) is subject to trademark.\n";
81 # --- Open file into an array
82 open my $file, '<', $path or die "Cannot open file: $!\n";
86 my ($field, $maintainer) = map { split /: / } grep /Maintainer/, @lines;
88 if ($maintainer =~ /(ubuntu|debian)/i) {
89 print "W: Maintainer email address ($maintainer) might be the same as upstream.\n";
92 $out->msg("$maintainer");
94 if (grep /BEGIN PGP SIGNED MESSAGE/, @lines) {
95 $out->v_msg("$filename is signed");
97 $out->debug_msg(3, "\n$dirs\n$filename\n");
100 croak "File not readable: $!\n";
105 file_tests($inputfile);
107 croak "No input file found: $!\n";