X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;ds=sidebyside;f=scripts%2Fmetadata.pl;h=963be3f3828250b441f2fce57cb1037eac3502f8;hb=5856dd2406c1de4a05cd69151abe1ad0790d3dfb;hp=5da5ac48a0734fc36b02aec61bfd6b26b37ed555;hpb=99bd2a4e33ce4e19a54fad62aff613126068c1df;p=openwrt%2Fsvn-archive%2Farchive.git diff --git a/scripts/metadata.pl b/scripts/metadata.pl index 5da5ac48a0..963be3f382 100755 --- a/scripts/metadata.pl +++ b/scripts/metadata.pl @@ -45,6 +45,23 @@ sub parse_target_metadata() { }; /^Target-Profile-Name:\s*(.+)\s*$/ and $profile->{name} = $1; /^Target-Profile-Packages:\s*(.*)\s*$/ and $profile->{packages} = [ split(/\s+/, $1) ]; + /^Target-Profile-Description:/ and do { + my $desc; + while (<>) { + last if /^@@/; + $desc .= $_; + } + $profile->{desc} = $desc; + }; + } + foreach my $target (@target) { + @{$target->{profiles}} > 0 or $target->{profiles} = [ + { + id => 'Default', + name => 'Default', + packages => [] + } + ]; } return @target; } @@ -163,6 +180,7 @@ sub target_config_features(@) { /usb/ and $ret .= "\tselect USB_SUPPORT\n"; /atm/ and $ret .= "\tselect ATM_SUPPORT\n"; /pcmcia/ and $ret .= "\tselect PCMCIA_SUPPORT\n"; + /video/ and $ret .= "\tselect VIDEO_SUPPORT\n"; /squashfs/ and $ret .= "\tselect USES_SQUASHFS\n"; /jffs2/ and $ret .= "\tselect USES_JFFS2\n"; /ext2/ and $ret .= "\tselect USES_EXT2\n"; @@ -274,21 +292,18 @@ EOF foreach my $target (@target) { my $profiles = $target->{profiles}; - @$profiles > 0 or $profiles = [ - { - id => 'Default', - name => 'Default', - packages => [] - } - ]; foreach my $profile (@$profiles) { print <{conf}_$profile->{id} bool "$profile->{name}" depends LINUX_$target->{conf} EOF + my %pkgs; foreach my $pkg (@{$target->{packages}}, @{$profile->{packages}}) { - print "\tselect DEFAULT_$pkg\n"; + $pkgs{$pkg} = 1; + } + foreach my $pkg (keys %pkgs) { + print "\tselect DEFAULT_$pkg\n" unless ($pkg =~ /^-/ or $pkgs{"-$pkg"}); } print "\n"; }