Add WL-700gE support (based on work by jr)
[openwrt.git] / scripts / metadata.pl
index 9434af0..ded3805 100755 (executable)
@@ -45,6 +45,14 @@ 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} = [
@@ -289,8 +297,12 @@ config LINUX_$target->{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";
                }
This page took 0.028213 seconds and 4 git commands to generate.