utils/scancpan: support more licenses
authorChristopher McCrory <chrismcc@gmail.com>
Mon, 20 Aug 2018 11:16:23 +0000 (04:16 -0700)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 20 Sep 2018 22:01:13 +0000 (00:01 +0200)
Signed-off-by: Christopher McCrory <chrismcc@gmail.com>
Reviewed-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
utils/scancpan

index 8f47521692137252dd47350231e9027dd1a2761b..3b77b21330649527ebdf8213339e36e4d8fd9733 100755 (executable)
@@ -699,9 +699,16 @@ while (my ($distname, $dist) = each %dist) {
                     ? join q{ or }, @{$dist->{license}}
                     : $dist->{license};
         # BR requires license name as in http://spdx.org/licenses/
+        $license =~ s|apache_1_1|Apache-1.1|;
         $license =~ s|apache_2_0|Apache-2.0|;
+        $license =~ s|artistic|Artistic-1.0|;
         $license =~ s|artistic_2|Artistic-2.0|;
+        $license =~ s|lgpl_2_1|LGPL-2.1|;
+        $license =~ s|lgpl_3_0|LGPL-3.0|;
+        $license =~ s|gpl_2|GPL-2.0|;
+        $license =~ s|gpl_3|GPL-3.0|;
         $license =~ s|mit|MIT|;
+        $license =~ s|mozilla_1_1|Mozilla-1.1|;
         $license =~ s|openssl|OpenSSL|;
         $license =~ s|perl_5|Artistic or GPL-1.0+|;
         my $license_files = join q{ }, keys %{$license_files{$distname}};