scripts/strip-kmod.sh: replace legacy backticks with $()
[openwrt/openwrt.git] / scripts / metadata.pm
index 4a5464edc0d9e401a0fa1cecc086b9e10dd11afa..1826a040a1165032f49a64f10de40ed0d75f97fe 100644 (file)
@@ -131,6 +131,7 @@ sub parse_target_metadata($) {
                /^Target-Optimization:\s*(.+)\s*$/ and $target->{cflags} = $1;
                /^CPU-Type:\s*(.+)\s*$/ and $target->{cputype} = $1;
                /^Linux-Version:\s*(.+)\s*$/ and $target->{version} = $1;
+               /^Linux-Testing-Version:\s*(.+)\s*$/ and $target->{testing_version} = $1;
                /^Linux-Release:\s*(.+)\s*$/ and $target->{release} = $1;
                /^Linux-Kernel-Arch:\s*(.+)\s*$/ and $target->{karch} = $1;
                /^Default-Subtarget:\s*(.+)\s*$/ and $target->{def_subtarget} = $1;
@@ -139,19 +140,25 @@ sub parse_target_metadata($) {
                        $profile = {
                                id => $1,
                                name => $1,
+                               has_image_metadata => 0,
+                               supported_devices => [],
                                priority => 999,
-                               packages => []
+                               packages => [],
+                               default => "y if TARGET_ALL_PROFILES"
                        };
                        $1 =~ /^DEVICE_/ and $target->{has_devices} = 1;
                        push @{$target->{profiles}}, $profile;
                };
                /^Target-Profile-Name:\s*(.+)\s*$/ and $profile->{name} = $1;
+               /^Target-Profile-hasImageMetadata:\s*(\d+)\s*$/ and $profile->{has_image_metadata} = $1;
+               /^Target-Profile-SupportedDevices:\s*(.+)\s*$/ and $profile->{supported_devices} = [ split(/\s+/, $1) ];
                /^Target-Profile-Priority:\s*(\d+)\s*$/ and do {
                        $profile->{priority} = $1;
                        $target->{sort} = 1;
                };
                /^Target-Profile-Packages:\s*(.*)\s*$/ and $profile->{packages} = [ split(/\s+/, $1) ];
                /^Target-Profile-Description:\s*(.*)\s*/ and $profile->{desc} = get_multiline(*FILE);
+               /^Target-Profile-Default:\s*(.+)\s*$/ and $profile->{default} = $1;
        }
        close FILE;
        foreach my $target (@target) {
@@ -238,6 +245,7 @@ sub parse_package_metadata($) {
                /^Build-Types:\s*(.+)\s*$/ and $src->{buildtypes} = [ split /\s+/, $1 ];
                next unless $pkg;
                /^Version: \s*(.+)\s*$/ and $pkg->{version} = $1;
+               /^ABIVersion: \s*(.+)\s*$/ and $pkg->{abiversion} = $1;
                /^Title: \s*(.+)\s*$/ and $pkg->{title} = $1;
                /^Menu: \s*(.+)\s*$/ and $pkg->{menu} = $1;
                /^Submenu: \s*(.+)\s*$/ and $pkg->{submenu} = $1;