[SCM] Debian packaging of dh-make-perl branch, master, updated. debian/0.75-1-14-g2f42f25

gregor herrmann gregoa at debian.org
Fri Mar 16 19:49:14 UTC 2012


The following commit has been merged in the master branch:
commit 7bd3323e6b0bb18750a2c04b9dd8748d50ead8ee
Author: Per Carlson <pelle at hemmop.com>
Date:   Fri Mar 16 11:12:04 2012 +0100

    License attribute from META file is array.

diff --git a/lib/DhMakePerl/Command/Packaging.pm b/lib/DhMakePerl/Command/Packaging.pm
index 596104b..442bf65 100644
--- a/lib/DhMakePerl/Command/Packaging.pm
+++ b/lib/DhMakePerl/Command/Packaging.pm
@@ -2,6 +2,7 @@ package DhMakePerl::Command::Packaging;
 
 use strict;
 use warnings;
+use feature 'switch';
 
 =head1 NAME
 
@@ -1062,13 +1063,29 @@ sub create_copyright {
         # mind that many licenses are not meant to be used as
         # templates (i.e. you must add the author name and some
         # information within the licensing text as such).
-        if (   $self->meta->{license} and $self->meta->{license} =~ /perl/i
-            or $mangle_cprt =~ /terms\s*as\s*Perl\s*itself/is )
-        {
-            $licenses{'GPL-1+'}   = 1;
-            $licenses{'Artistic'} = 1;
-        }
+        if ( $self->meta->{license} ) {
+	    foreach ( @{ $self->meta->{license} }) {
+	        given ($_) {
+		    when (/apache_2_0/) { $licenses{'Apache-2.0'} = 1; }
+		    when (/artistic_1/) { $licenses{'Artistic'} = 1; }
+		    when (/artistic_2/) { $licenses{'Artistic-2.0'} = 1; }
+		    # EU::MM and M::B converts the unversioned 'gpl' to gpl_1.
+		    # As a unversioned GPL means *any* GPL,I think it's safe to use GPL-1+ here
+		    when (/gpl_1/) { $licenses{'GPL-1+'} = 1; }
+
+		    when (/perl_5/) {
+		       $licenses{'GPL-1+'}   = 1;
+                       $licenses{'Artistic'} = 1;
+		    }
+		}
+	  }
+	}
         else {
+	    if ( $mangle_cprt =~ /terms\s*as\s*Perl\s*itself/is ) {
+              $licenses{'GPL-1+'}   = 1;
+              $licenses{'Artistic'} = 1;
+	    }
+
             if ( $mangle_cprt =~ /[^L]GPL/ ) {
                 if ( $mangle_cprt =~ /GPL.*version\s*1.*later\s+version/is ) {
                     $licenses{'GPL-1+'} = 1;

-- 
Debian packaging of dh-make-perl



More information about the Pkg-perl-cvs-commits mailing list