common/tools/populateziptemplate.pl
changeset 484 5efa4ed4b4f8
parent 461 874d24067366
child 614 ebd02353c4d9
equal deleted inserted replaced
483:e72afbf7a8c9 484:5efa4ed4b4f8
    70 # For each package in CSV...
    70 # For each package in CSV...
    71 foreach my $package (@packages)
    71 foreach my $package (@packages)
    72 {
    72 {
    73 	warn "Warning: Package $package->{dst} does not appear on the local system\n" unless -d $package->{dst};
    73 	warn "Warning: Package $package->{dst} does not appear on the local system\n" unless -d $package->{dst};
    74 	$package->{dst} =~ s{^/}{}g;
    74 	$package->{dst} =~ s{^/}{}g;
    75 	if ($package->{source} =~ m{/(sfl|oss)/(MCL|FCL)/sf/([^/]+)/([^/]+)})
    75 	if ($package->{source} =~ m{/(sfl|oss)/(MCL|FCL)/(sf|utilities)/(([^/]+)/([^/]+))?})
    76 	{
    76 	{
    77   		push @{$zipConfig->{config}->{config}->{src}->{config}->{$1}->{config}},
    77 		my ($license, $codeline, $thingy, $layer, $packageName) = ($1, $2, $3, $5, $6);
       
    78 		# $thingy is the part of the path after the codeline. For
       
    79 		# platform packages, it's "sf". For the utilities package, it's
       
    80 		# "utilities" (the name of the package) and there's no more
       
    81 		# path.
       
    82 		#
       
    83 		# I can't think of anything to describe this item, hence $thingy
       
    84 		if ($thingy eq "utilities")
       
    85 		{
       
    86 			$layer = "tools";
       
    87 			$packageName = "utilities";
       
    88 		}
       
    89 		elsif (!defined $packageName)
       
    90 		{
       
    91 			goto MISC_PACKAGE;
       
    92 		}
       
    93 		
       
    94   		push @{$zipConfig->{config}->{config}->{src}->{config}->{$license}->{config}},
    78   		{
    95   		{
    79   			set =>
    96   			set =>
    80   			[
    97   			[
    81   				{
    98   				{
    82   					name => "name",
    99   					name => "name",
    83   					value=> "src_$1_$3_$4",
   100   					value=> join "_", "src", $license, $layer, $packageName,
    84   				},
   101   				},
    85   				{
   102   				{
    86   					name => "include",
   103   					name => "include",
    87   					value => "$package->{dst}/**",
   104   					value => "$package->{dst}/**",
    88   				},
   105   				},
   152 			};
   169 			};
   153 		}
   170 		}
   154 	}
   171 	}
   155 	else
   172 	else
   156 	{
   173 	{
       
   174 MISC_PACKAGE:
   157 		(my $dest2 = $package->{dst}) =~ s{[\\/]}{_slash_}g;
   175 		(my $dest2 = $package->{dst}) =~ s{[\\/]}{_slash_}g;
   158 		push @{$zipConfig->{config}->{config}->{src}->{config}->{misc}->{config}},
   176 		push @{$zipConfig->{config}->{config}->{src}->{config}->{misc}->{config}},
   159 		{
   177 		{
   160 			set =>
   178 			set =>
   161 			[
   179 			[