support/script/scancpan: more license name ajustment
authorFrancois Perrad <fperrad@gmail.com>
Thu, 24 Jul 2014 18:50:01 +0000 (20:50 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 24 Jul 2014 20:31:46 +0000 (22:31 +0200)
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
support/scripts/scancpan

index de11ef11b34b348fdea8cf38a67f14af3a9de5c4..50d9bab60101645d3b97c7f707bdd87223d36296 100755 (executable)
@@ -645,7 +645,10 @@ while (my ($distname, $dist) = each %dist) {
         my $license = ref $dist->{license} eq 'ARRAY'
                     ? join q{ or }, @{$dist->{license}}
                     : $dist->{license};
+        # BR requires license name as in http://spdx.org/licenses/
+        $license =~ s|apache_2_0|Apache-2.0|;
         $license =~ s|artistic_2|Artistic-2.0|;
+        $license =~ s|mit|MIT|;
         $license =~ s|openssl|OpenSSL|;
         $license =~ s|perl_5|Artistic or GPLv1+|;
         my $license_files = join q{ }, @{$license_files{$distname}};