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
32 use lib qw(/home/jeremiah/maemian/lib/);
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");
64 my ($filename, $path);
67 ($filename, $path) = fileparse($file);
70 die "Cannot read $file\n";
72 # --- maemo is a trademarked term
73 if ($filename =~ /maemo/) {
74 $out->v_msg("Any use of the word \"maemo\" in the package name (not package version) is subject to trademark.");
76 $out->v_msg("File name is $filename");
77 $out->v_msg("Path is $path");
79 # We push the entire file into an array
80 # If the file is signed, the sig is separated by a blank line
81 my @control = slurp $file, { irs => qr/\n\n/xms };
82 my @lines = split /\n/, $control[1];
83 print map { $_ } grep /Maintainer/, @lines;
87 file_tests($inputfile);
89 croak "No input file found: $!\n";