return 1;
}
+# add_deb takes the name of a binary deb and the letter "b" as args.
sub add_deb {
- my ($self, $type, $file) = @_;
-
- my $info = get_deb_info($file);
- return unless defined $info;
- return $self->add_file($type, $file, %$info);
+ my ($self, $type, $file) = @_;
+
+ my $info = get_deb_info($file);
+# use the following code to peer into the control file of the deb
+# print map { $_, ": ",
+# %$info->{$_} . "\n" } keys %$info;
+ return unless defined $info;
+ return $self->add_file($type, $file, %$info);
}
sub add_dsc {
minimae - A small, cuddly version of maemian
+=head1 VERSION
+
+This document describes minimae version 0.1
+
=head1 PURPOSE
Maemian is the maemo version of lintian - a policy checker designed to
use Carp;
use lib qw(/home/jeremiah/maemian/lib/);
use Maemian::Output;
+use Maemian::Schedule;
+
+my $LINTIAN_LAB = "/home/jeremiah/maemian/lab";
# --- Command line options
my $inputfile; # --- A file passed on the command line
pod2usage() if $help;
pod2usage() if not $inputfile;
-# --- Output settings.
+# --- Output settings
my $out = new Maemian::Output;
if ($verbose) {
$out->verbose(1);
croak "No input file found: $!\n";
}
+my $schedule = new Maemian::Schedule(verbose => $verbose);
+# .deb file?
+if ($inputfile =~ /\.deb$/) {
+ $out->v_msg("Lab is $LINTIAN_LAB");
+
+ # schedule is a hash containing two hashes followed by an array
+ $schedule->add_deb('b', $inputfile)
+ or warning("$inputfile is a zero-byte file, skipping");
+}
+
+
+
1;