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 This document describes minimae version 0.1
17 Maemian is the maemo version of lintian - a policy checker designed to
18 assure the quality of a package uploaded into the maemo.org repositories.
19 The goal of maemian is to improve quality by checking that the maemo
20 packaging policy is followed. In order to do that it reads files in the
21 uploaded deb. Currently maemian only looks at the .dsc file and tries to
22 ascertain who uploaded it, and if they used the correct email address.
26 # Check a debian description file
36 use lib qw(/home/jeremiah/maemian/lib/);
38 use Maemian::Schedule;
40 my $LINTIAN_LAB = "/home/jeremiah/maemian/lab";
42 # --- Command line options
43 my $inputfile; # --- A file passed on the command line
49 'verbose' => \$verbose,
50 'inputfile|i=s' => \$inputfile,
53 # --- Process Command line options
55 pod2usage() if not $inputfile;
58 my $out = new Maemian::Output;
61 $out->v_msg("Verbose on");
71 my ($filename, $path);
74 ($filename, $path) = fileparse($file);
77 die "Cannot read $file\n";
79 # --- maemo is a trademarked term
80 if ($filename =~ /maemo/) {
81 $out->v_msg("Any use of the word \"maemo\" in the package name (not package version) is subject to trademark.");
83 $out->v_msg("File name is $filename");
84 $out->v_msg("Path is $path");
86 # We push the entire file into an array
87 # If the file is signed, the sig is separated by a blank line
88 my @control = slurp $file, { irs => qr/\n\n/xms };
89 my @lines = split /\n/, $control[1];
90 print map { $_ } grep /Maintainer/, @lines;
94 file_tests($inputfile);
96 croak "No input file found: $!\n";
99 my $schedule = new Maemian::Schedule(verbose => $verbose);
101 if ($inputfile =~ /\.deb$/) {
102 $out->v_msg("Lab is $LINTIAN_LAB");
104 # schedule is a hash containing two hashes followed by an array
105 $schedule->add_deb('b', $inputfile)
106 or warning("$inputfile is a zero-byte file, skipping");