9 sub print_category
($) {
12 return unless $category{$cat};
14 print "menu \"$cat\"\n\n";
15 my %spkg = %{$category{$cat}};
16 foreach my $spkg (sort {uc($a) cmp uc($b)} keys %spkg) {
17 foreach my $pkg (@
{$spkg{$spkg}}) {
18 my $title = $pkg->{name
};
19 my $c = (72 - length($pkg->{name
}) - length($pkg->{title
}));
21 $title .= ("." x
$c). " ". $pkg->{title
};
24 $pkg->{menu
} and print "menu";
25 print "config PACKAGE_".$pkg->{name
}."\n";
26 print "\t\ttristate \"$title\"\n";
27 print "\t\tdefault ".$pkg->{default}."\n";
28 foreach my $depend (@
{$pkg->{depends
}}) {
29 print "\t\tdepends PACKAGE_$depend\n";
32 print $pkg->{description
};
38 undef $category{$cat};
44 $line =~ /^Source-Makefile: \s*(.+\/([^\
/]+)\/Makefile
)\s
*$/ and do {
49 $line =~ /^Package: \s*(.+)\s*$/ and do {
52 $pkg->{makefile
} = $makefile;
54 $pkg->{default} = "m if ALL";
56 $line =~ /^Version: \s*(.+)\s*$/ and $pkg->{version
} = $1;
57 $line =~ /^Title: \s*(.+)\s*$/ and $pkg->{title
} = $1;
58 $line =~ /^Menu: \s*(.+)\s*$/ and $pkg->{menu
} = $1;
59 $line =~ /^Default: \s*(.+)\s*$/ and $pkg->{default} = $1;
60 $line =~ /^Depends: \s*(.+)\s*$/ and do {
61 my @dep = split /,\s*/, $1;
62 $pkg->{depends
} = \
@dep;
64 $line =~ /^Category: \s*(.+)\s*$/ and do {
65 $pkg->{category
} = $1;
66 defined $category{$1} or $category{$1} = {};
67 defined $category{$1}->{$src} or $category{$1}->{$src} = [];
68 push @
{$category{$1}->{$src}}, $pkg;
70 $line =~ /^Description: \s*(.*)\s*$/ and do {
71 my $desc = "\t\t$1\n\n";
74 last if $line =~ /^@@/;
77 $pkg->{description
} = $desc;
81 print_category
'Base system';
82 foreach my $cat (keys %category) {
This page took 0.047396 seconds and 5 git commands to generate.