[SCM] Debian packaging of libsoftware-license-perl branch, master, updated. debian/0.103004-2-1-g8fc78e8
Dominique Dumont
dod at debian.org
Fri Mar 30 15:10:10 UTC 2012
The following commit has been merged in the master branch:
commit 8fc78e8051f32fdee2f6332fe5f56f3bfcb15dc1
Author: Dominique Dumont <dod at debian.org>
Date: Fri Mar 30 17:09:48 2012 +0200
changed all patches as requested by upstream
diff --git a/debian/patches/create-license-from-short-name b/debian/patches/create-license-from-short-name
deleted file mode 100644
index 3b3d742..0000000
--- a/debian/patches/create-license-from-short-name
+++ /dev/null
@@ -1,69 +0,0 @@
-Description: Create license from short name
---- a/lib/Software/License.pm
-+++ b/lib/Software/License.pm
-@@ -11,15 +11,48 @@
- use Sub::Install ();
- use Text::Template ();
-
-+my %short_name = (
-+ 'GPL-1' => 'GPL_1',
-+ 'GPL-2' => 'GPL_2',
-+ 'GPL-3' => 'GPL_3',
-+ 'Artistic' => 'Artistic_1_0',
-+ 'Artistic-1' => 'Artistic_1_0',
-+ 'Artistic-2' => 'Artistic_2_0',
-+);
-+
-+# Software::License is a virtual class. On the other hand, it's a
-+# natural entry point to create "real" license using short names.
-+# Of the 2 solutions provided below, I don't know which one is the best
-+# (or the worse).
-
- sub new {
- my ($class, $arg) = @_;
-
- Carp::croak "no copyright holder specified" unless $arg->{holder};
-
-- bless $arg => $class;
-+ # This ugly hack avoids having 2 constructors.
-+ if ($class eq __PACKAGE__ ) {
-+ return new_from_short_name(@_) ;
-+ }
-+ else {
-+ bless $arg => $class;
-+ }
- }
-
-+# here's a second constructor that will provide a real license
-+sub new_from_short_name {
-+ my ($class, $arg) = @_;
-+
-+ Carp::croak "no license short name specified" unless $arg->{short_name};
-+ my $short = delete $arg->{short_name} ;
-+ my $lic = $short_name{$short} ;
-+ Carp::croak "Unknow license with short name $short" unless $lic;
-+
-+ my $lic_file = my $lic_class = __PACKAGE__.'::'.$lic ;
-+ $lic_file =~ s!::!/!g ;
-+ require "$lic_file.pm";
-+ return $lic_class->new ($arg) ;
-+}
-
- sub year { defined $_[0]->{year} ? $_[0]->{year} : (localtime)[5]+1900 }
- sub holder { $_[0]->{holder} }
-@@ -112,6 +145,15 @@
- holder - the holder of the copyright; required
- year - the year of copyright; defaults to current year
-
-+=head2 new_from_short_name
-+
-+ my $license = Software::License -> new_from_short_name(
-+ { short_name => 'GPL-1', %arg }
-+ );
-+
-+This constructor will return the correct subclass depending on
-+C<short_name> value.
-+
- =head2 year
-
- =head2 holder
diff --git a/debian/patches/gpl-1-plus-class b/debian/patches/gpl-1-plus-class
deleted file mode 100644
index a36996f..0000000
--- a/debian/patches/gpl-1-plus-class
+++ /dev/null
@@ -1,77 +0,0 @@
-Description: new class to represent GPL-1+ clauses
---- /dev/null
-+++ b/lib/Software/License/GPL_1_plus.pm
-@@ -0,0 +1,42 @@
-+use strict;
-+use warnings;
-+package Software::License::GPL_1_plus;
-+
-+use base 'Software::License::GPL_1';
-+
-+sub name { 'The GNU General Public License, Version 1 or later, February 1989' }
-+
-+1;
-+
-+=pod
-+
-+=head1 NAME
-+
-+Software::License::GPL_1_plus - GNU General Public License, Version 1 or later
-+
-+=head1 VERSION
-+
-+version 0.103002
-+
-+=head1 AUTHOR
-+
-+Dominique Dumont <ddumont at cpan.org>
-+
-+=head1 COPYRIGHT AND LICENSE
-+
-+This software is copyright (c) 2011 by Dominique Dumont
-+
-+This is free software; you can redistribute it and/or modify it under
-+the same terms as the Perl 5 programming language system itself.
-+
-+=cut
-+
-+__DATA__
-+__DEBIAN-SUMMARY__
-+This program is free software; you can redistribute it and/or modify
-+it under the terms of the GNU General Public License as published by
-+the Free Software Foundation; either version 1, or (at your option)
-+any later version.
-+
-+On Debian systems, the complete text of version 1 of the GNU General
-+Public License can be found in `/usr/share/common-licenses/GPL-1'.
---- a/t/short_name.t
-+++ b/t/short_name.t
-@@ -2,7 +2,7 @@
- use strict;
- use warnings;
-
--use Test::More tests => 6;
-+use Test::More tests => 9;
-
- my $class = 'Software::License';
- require_ok($class);
-@@ -14,3 +14,9 @@
- isa_ok($license,'Software::License::GPL_1',"license class");
- like($license->name, qr/version 1/i, "license name");
- like($license->fulltext, qr/general public/i, 'license text');
-+
-+my $license_plus = $class->new({ short_name => 'GPL-1+', holder => 'X. Ample' });
-+
-+is($license_plus->holder, 'X. Ample', '(c) holder');
-+is($license_plus->year, (localtime)[5]+1900, '(c) year');
-+isa_ok($license_plus,'Software::License::GPL_1_plus',"license class");
---- a/lib/Software/License.pm
-+++ b/lib/Software/License.pm
-@@ -13,6 +13,7 @@
-
- my %short_name = (
- 'GPL-1' => 'GPL_1',
-+ 'GPL-1+' => 'GPL_1_plus',
- 'GPL-2' => 'GPL_2',
- 'GPL-3' => 'GPL_3',
- 'LGPL-2.1' => 'LGPL_2_1',
diff --git a/debian/patches/gpl-1-summary b/debian/patches/gpl-1-summary
index 2758643..2f7ea96 100644
--- a/debian/patches/gpl-1-summary
+++ b/debian/patches/gpl-1-summary
@@ -11,7 +11,7 @@ Description: added summary
+the Free Software Foundation; version 1, February 1989
+
+On Debian systems, the complete text of version 1 of the GNU General
-+Public License can be found in `/usr/share/common-licenses/GPL-1'.
++Public License can be found in `/usr/share/common-licenses/GPL-1'{{$or_later_clause}}.
__LICENSE__
GNU GENERAL PUBLIC LICENSE
Version 1, February 1989
diff --git a/debian/patches/gpl-2-plus-class b/debian/patches/gpl-2-plus-class
deleted file mode 100644
index 53df6b0..0000000
--- a/debian/patches/gpl-2-plus-class
+++ /dev/null
@@ -1,57 +0,0 @@
-Description: new class
---- /dev/null
-+++ b/lib/Software/License/GPL_2_plus.pm
-@@ -0,0 +1,43 @@
-+use strict;
-+use warnings;
-+package Software::License::GPL_2_plus;
-+
-+use base 'Software::License::GPL_2';
-+
-+sub name { 'The GNU General Public License, Version 2 or later' }
-+
-+1;
-+
-+=pod
-+
-+=head1 NAME
-+
-+Software::License::GPL_2_plus - GNU General Public License, Version 2 or later
-+
-+=head1 VERSION
-+
-+version 0.103002
-+
-+=head1 AUTHOR
-+
-+Dominique Dumont <ddumont at cpan.org>
-+
-+=head1 COPYRIGHT AND LICENSE
-+
-+This software is copyright (c) 2011 by Dominique Dumont
-+
-+This is free software; you can redistribute it and/or modify it under
-+the same terms as the Perl 5 programming language system itself.
-+
-+=cut
-+
-+
-+__DATA__
-+__DEBIAN-SUMMARY__
-+This program is free software; you can redistribute it and/or modify
-+it under the terms of the GNU General Public License as published by
-+the Free Software Foundation; version 2 dated June, 1991, or (at your
-+option) any later version.
-+
-+On Debian systems, the complete text of version 2 of the GNU General
-+Public License can be found in '/usr/share/common-licenses/GPL-2'.
---- a/lib/Software/License.pm
-+++ b/lib/Software/License.pm
-@@ -15,6 +15,7 @@
- 'GPL-1' => 'GPL_1',
- 'GPL-1+' => 'GPL_1_plus',
- 'GPL-2' => 'GPL_2',
-+ 'GPL-2+' => 'GPL_2_plus',
- 'GPL-3' => 'GPL_3',
- 'LGPL-2.1' => 'LGPL_2_1',
- 'LGPL-3' => 'LGPL_3_0',
diff --git a/debian/patches/gpl-2-summary b/debian/patches/gpl-2-summary
index 0a44112..7ab3fe3 100644
--- a/debian/patches/gpl-2-summary
+++ b/debian/patches/gpl-2-summary
@@ -11,7 +11,7 @@ Description: gpl-2 summary
+the Free Software Foundation; version 2 dated June, 1991.
+
+On Debian systems, the complete text of version 2 of the GNU General
-+Public License can be found in '/usr/share/common-licenses/GPL-2'.
++Public License can be found in '/usr/share/common-licenses/GPL-2'{{$or_later_clause}}.
__LICENSE__
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
diff --git a/debian/patches/gpl-3-plus-class b/debian/patches/gpl-3-plus-class
deleted file mode 100644
index ddf5b06..0000000
--- a/debian/patches/gpl-3-plus-class
+++ /dev/null
@@ -1,56 +0,0 @@
-Description: new class for gpl3 plus summary
---- /dev/null
-+++ b/lib/Software/License/GPL_3_plus.pm
-@@ -0,0 +1,42 @@
-+use strict;
-+use warnings;
-+package Software::License::GPL_3_plus;
-+
-+use base 'Software::License::GPL_3';
-+
-+sub name { 'The GNU General Public License, Version 3 or later' }
-+
-+1;
-+
-+=pod
-+
-+=head1 NAME
-+
-+Software::License::GPL_3_plus - GNU General Public License, Version 3 or later
-+
-+=head1 VERSION
-+
-+version 0.103002
-+
-+=head1 AUTHOR
-+
-+Dominique Dumont <ddumont at cpan.org>
-+
-+=head1 COPYRIGHT AND LICENSE
-+
-+This software is copyright (c) 2011 by Dominique Dumont
-+
-+This is free software; you can redistribute it and/or modify it under
-+the same terms as the Perl 5 programming language system itself.
-+
-+=cut
-+
-+__DATA__
-+__DEBIAN-SUMMARY__
-+This program is free software; you can redistribute it and/or modify
-+it under the terms of the GNU General Public License as published by
-+the Free Software Foundation; version 3 dated June, 2007, or (at your
-+option) any later version.
-+
-+On Debian systems, the complete text of version 3 of the GNU General
-+Public License can be found in '/usr/share/common-licenses/GPL-3'.
---- a/lib/Software/License.pm
-+++ b/lib/Software/License.pm
-@@ -17,6 +17,7 @@
- 'GPL-2' => 'GPL_2',
- 'GPL-2+' => 'GPL_2_plus',
- 'GPL-3' => 'GPL_3',
-+ 'GPL-3+' => 'GPL_3_plus',
- 'LGPL-2.1' => 'LGPL_2_1',
- 'LGPL-3' => 'LGPL_3_0',
- 'LGPL-3.0' => 'LGPL_3_0',
diff --git a/debian/patches/gpl-3-summary b/debian/patches/gpl-3-summary
index efb3b71..65e63bf 100644
--- a/debian/patches/gpl-3-summary
+++ b/debian/patches/gpl-3-summary
@@ -11,7 +11,7 @@ Description: gpl3 summary
+the Free Software Foundation; version 3 dated June, 2007.
+
+On Debian systems, the complete text of version 3 of the GNU General
-+Public License can be found in '/usr/share/common-licenses/GPL-3'.
++Public License can be found in '/usr/share/common-licenses/GPL-3'{{$or_later_clause}}.
__LICENSE__
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
diff --git a/debian/patches/lgpl-2-1-plus b/debian/patches/lgpl-2-1-plus
deleted file mode 100644
index 1c11bf7..0000000
--- a/debian/patches/lgpl-2-1-plus
+++ /dev/null
@@ -1,57 +0,0 @@
-Description: Lgpl 2.1+ license class
---- a/lib/Software/License.pm
-+++ b/lib/Software/License.pm
-@@ -19,6 +19,7 @@
- 'GPL-3' => 'GPL_3',
- 'GPL-3+' => 'GPL_3_plus',
- 'LGPL-2.1' => 'LGPL_2_1',
-+ 'LGPL-2.1+' => 'LGPL_2_1_plus',
- 'LGPL-3' => 'LGPL_3_0',
- 'LGPL-3.0' => 'LGPL_3_0',
- 'Artistic' => 'Artistic_1_0',
---- /dev/null
-+++ b/lib/Software/License/LGPL_2_1_plus.pm
-@@ -0,0 +1,43 @@
-+use strict;
-+use warnings;
-+package Software::License::LGPL_2_1_plus;
-+
-+use base 'Software::License::LGPL_2_1';
-+
-+sub name { 'The GNU Lesser General Public License, Version 2.1 or later' }
-+
-+1;
-+
-+=pod
-+
-+=head1 NAME
-+
-+Software::License::LGPL_2_1_plus - GNU Lesser General Public License, Version 2.1 or later
-+
-+=head1 VERSION
-+
-+version 0.103002
-+
-+=head1 AUTHOR
-+
-+Dominique Dumont <ddumont at cpan.org>
-+
-+=head1 COPYRIGHT AND LICENSE
-+
-+This software is copyright (c) 2011 by Dominique Dumont
-+
-+This is free software; you can redistribute it and/or modify it under
-+the same terms as the Perl 5 programming language system itself.
-+
-+=cut
-+
-+
-+__DATA__
-+__DEBIAN-SUMMARY__
-+This program is free software; you can redistribute it and/or modify
-+it under the terms of the GNU Lesser General Public License as published by
-+the Free Software Foundation; either version 2.1 of the License, or (at
-+your option) any later version.
-+
-+On Debian systems, the complete text of version 2.1 of the GNU Lesser
-+Public License can be found in `/usr/share/common-licenses/LGPL-2.1'.
diff --git a/debian/patches/lgpl-2-1-summary b/debian/patches/lgpl-2-1-summary
index 36739be..f8c1cf6 100644
--- a/debian/patches/lgpl-2-1-summary
+++ b/debian/patches/lgpl-2-1-summary
@@ -11,7 +11,7 @@ Description: Lgpl 2.1 summary
+Free Software Foundation; version 2.1 of the License.
+.
+On Debian systems, the complete text of version 2.1 of the GNU Lesser
-+Public License can be found in `/usr/share/common-licenses/LGPL-2.1'.
++Public License can be found in `/usr/share/common-licenses/LGPL-2.1'{{$or_later_clause}}.
__LICENSE__
The GNU Lesser General Public License (LGPL)
Version 2.1, February 1999
diff --git a/debian/patches/lgpl-2-plus b/debian/patches/lgpl-2-plus
deleted file mode 100644
index fb37d87..0000000
--- a/debian/patches/lgpl-2-plus
+++ /dev/null
@@ -1,57 +0,0 @@
-Description: Lgpl 2 plus license informations
---- a/lib/Software/License.pm
-+++ b/lib/Software/License.pm
-@@ -19,6 +19,7 @@
- 'GPL-3' => 'GPL_3',
- 'GPL-3+' => 'GPL_3_plus',
- 'LGPL-2' => 'LGPL_2',
-+ 'LGPL-2+' => 'LGPL_2_plus',
- 'LGPL-2.1' => 'LGPL_2_1',
- 'LGPL-2.1+' => 'LGPL_2_1_plus',
- 'LGPL-3' => 'LGPL_3_0',
---- /dev/null
-+++ b/lib/Software/License/LGPL_2_plus.pm
-@@ -0,0 +1,43 @@
-+use strict;
-+use warnings;
-+package Software::License::LGPL_2_plus;
-+
-+use base 'Software::License::LGPL_2';
-+
-+sub name { 'The GNU Lesser General Public License, Version 2 or later' }
-+
-+1;
-+
-+=pod
-+
-+=head1 NAME
-+
-+Software::License::LGPL_2_plus - GNU Lesser General Public License, Version 2 or later
-+
-+=head1 VERSION
-+
-+version 0.103002
-+
-+=head1 AUTHOR
-+
-+Dominique Dumont <ddumont at cpan.org>
-+
-+=head1 COPYRIGHT AND LICENSE
-+
-+This software is copyright (c) 2011 by Dominique Dumont
-+
-+This is free software; you can redistribute it and/or modify it under
-+the same terms as the Perl 5 programming language system itself.
-+
-+=cut
-+
-+
-+__DATA__
-+__DEBIAN-SUMMARY__
-+This program is free software; you can redistribute it and/or modify
-+it under the terms of the GNU Lesser General Public License as published by
-+the Free Software Foundation; either version 2 of the License, or (at
-+your option) any later version.
-+
-+On Debian systems, the complete text of version 2 of the GNU Lesser
-+Public License can be found in `/usr/share/common-licenses/LGPL-2'.
diff --git a/debian/patches/lgpl-2-summary b/debian/patches/lgpl-2-summary
index 44f532d..3abe1af 100644
--- a/debian/patches/lgpl-2-summary
+++ b/debian/patches/lgpl-2-summary
@@ -50,7 +50,7 @@ Description: summary for lgpl-2 license
+Free Software Foundation; version 2 of the License.
+.
+On Debian systems, the complete text of version 2 of the GNU Library
-+Public License can be found in `/usr/share/common-licenses/LGPL-2'.
++Public License can be found in `/usr/share/common-licenses/LGPL-2'{{$or_later_clause}}.
+__LICENSE__
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ Version 2, June 1991
@@ -533,13 +533,3 @@ Description: summary for lgpl-2 license
+ Ty Coon, President of Vice
+
+That's all there is to it!
---- a/lib/Software/License.pm
-+++ b/lib/Software/License.pm
-@@ -18,6 +18,7 @@
- 'GPL-2+' => 'GPL_2_plus',
- 'GPL-3' => 'GPL_3',
- 'GPL-3+' => 'GPL_3_plus',
-+ 'LGPL-2' => 'LGPL_2',
- 'LGPL-2.1' => 'LGPL_2_1',
- 'LGPL-2.1+' => 'LGPL_2_1_plus',
- 'LGPL-3' => 'LGPL_3_0',
diff --git a/debian/patches/lgpl-3-plus b/debian/patches/lgpl-3-plus
deleted file mode 100644
index 629c504..0000000
--- a/debian/patches/lgpl-3-plus
+++ /dev/null
@@ -1,58 +0,0 @@
-Description: Lgpl 3+ license class
---- /dev/null
-+++ b/lib/Software/License/LGPL_3_0_plus.pm
-@@ -0,0 +1,43 @@
-+use strict;
-+use warnings;
-+package Software::License::LGPL_3_0_plus;
-+
-+use base 'Software::License::LGPL_3_0';
-+
-+sub name { 'The GNU Lesser General Public License, Version 3 or later' }
-+
-+1;
-+
-+=pod
-+
-+=head1 NAME
-+
-+Software::License::LGPL_3_0_plus - GNU Lesser General Public License, Version 3 or later
-+
-+=head1 VERSION
-+
-+version 0.103002
-+
-+=head1 AUTHOR
-+
-+Dominique Dumont <ddumont at cpan.org>
-+
-+=head1 COPYRIGHT AND LICENSE
-+
-+This software is copyright (c) 2011 by Dominique Dumont
-+
-+This is free software; you can redistribute it and/or modify it under
-+the same terms as the Perl 5 programming language system itself.
-+
-+=cut
-+
-+
-+__DATA__
-+__DEBIAN-SUMMARY__
-+This program is free software; you can redistribute it and/or modify
-+it under the terms of the GNU Lesser General Public License as published by
-+the Free Software Foundation; either version 3 of the License, or (at
-+your option) any later version.
-+
-+On Debian systems, the complete text of version 3 of the GNU Lesser
-+Public License can be found in `/usr/share/common-licenses/LGPL-3'.
---- a/lib/Software/License.pm
-+++ b/lib/Software/License.pm
-@@ -22,6 +22,8 @@
- 'LGPL-2.1+' => 'LGPL_2_1_plus',
- 'LGPL-3' => 'LGPL_3_0',
- 'LGPL-3.0' => 'LGPL_3_0',
-+ 'LGPL-3+' => 'LGPL_3_0_plus',
-+ 'LGPL-3.0+' => 'LGPL_3_0_plus',
- 'Artistic' => 'Artistic_1_0',
- 'Artistic-1' => 'Artistic_1_0',
- 'Artistic-2' => 'Artistic_2_0',
diff --git a/debian/patches/lgpl-3-summary b/debian/patches/lgpl-3-summary
index 6385080..d90af2f 100644
--- a/debian/patches/lgpl-3-summary
+++ b/debian/patches/lgpl-3-summary
@@ -11,7 +11,7 @@ Description: Lgpl 3 summary
+Free Software Foundation; version 3 of the License.
+.
+On Debian systems, the complete text of version 3 of the GNU Lesser
-+Public License can be found in `/usr/share/common-licenses/LGPL-3'.
++Public License can be found in `/usr/share/common-licenses/LGPL-3'{{$or_later_clause}}.
__LICENSE__
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
diff --git a/debian/patches/series b/debian/patches/series
index d0539bc..e813360 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,18 +1,13 @@
-create-license-from-short-name
+new_from_short_name
test-short-name
summary_method
artistic_1.0_summary
apache-2-summary
-gpl-1-plus-class
gpl-1-summary
-gpl-2-plus-class
gpl-2-summary
-gpl-3-plus-class
gpl-3-summary
-lgpl-2-1-plus
lgpl-2-1-summary
lgpl-3-summary
-lgpl-3-plus
lgpl-2-summary
-lgpl-2-plus
+summary
summary_test
diff --git a/debian/patches/summary_method b/debian/patches/summary_method
index a067819..6ea7bd8 100644
--- a/debian/patches/summary_method
+++ b/debian/patches/summary_method
@@ -1,19 +1,7 @@
Description: new method
--- a/lib/Software/License.pm
+++ b/lib/Software/License.pm
-@@ -15,7 +15,10 @@
- 'GPL-1' => 'GPL_1',
- 'GPL-2' => 'GPL_2',
- 'GPL-3' => 'GPL_3',
-- 'Artistic' => 'Artistic_1_0',
-+ 'LGPL-2.1' => 'LGPL_2_1',
-+ 'LGPL-3' => 'LGPL_3_0',
-+ 'LGPL-3.0' => 'LGPL_3_0',
-+ 'Artistic' => 'Artistic_1_0',
- 'Artistic-1' => 'Artistic_1_0',
- 'Artistic-2' => 'Artistic_2_0',
- );
-@@ -60,6 +63,11 @@
+@@ -28,6 +28,11 @@
sub notice { shift->_fill_in('NOTICE') }
@@ -25,7 +13,7 @@ Description: new method
sub license { shift->_fill_in('LICENSE') }
-@@ -207,6 +215,13 @@
+@@ -173,6 +178,13 @@
C<meta_name> returns open_source, restricted, unrestricted, or unknown, that
value will be used.
diff --git a/debian/patches/summary_test b/debian/patches/summary_test
index f1a3673..2485e3d 100644
--- a/debian/patches/summary_test
+++ b/debian/patches/summary_test
@@ -1,35 +1,42 @@
Description: new test for summary feature
--- /dev/null
+++ b/t/summary.t
-@@ -0,0 +1,32 @@
+@@ -0,0 +1,39 @@
+#!perl
+use strict;
+use warnings;
+
-+use Test::More tests => 11;
++use Test::More tests => 13;
+
-+{
-+my $class = 'Software::License::GPL_1_plus';
++# try LGP2 license
++
++my $class = 'Software::LicenseUtils';
+require_ok($class);
+
-+my $license = $class->new({ holder => 'X. Ample' });
++{
++my $license = $class->new_from_short_name({
++ short_name => 'LGPL-2',
++ holder => 'X. Ample'
++});
+
+is($license->holder, 'X. Ample', '(c) holder');
-+like($license->fulltext, qr/general public/i, 'license text');
-+like($license->summary, qr/later version/i, 'summary text');
++isa_ok($license,'Software::License::LGPL_2',"license class");
+like($license->summary, qr/common-licenses/i, 'common-licenses found');
-+}
++unlike($license->summary, qr/later version/i, 'later version clause not included');
++like($license->name, qr/version 2/i, "license name");
++like($license->fulltext, qr/library/i, 'license text');
+
-+# try LGP2 license
++}
+{
-+my $class = 'Software::License';
-+require_ok($class);
-+
-+my $license = $class->new({ short_name => 'LGPL-2', holder => 'X. Ample' });
++my $license = $class->new_from_short_name({
++ short_name => 'LGPL-2+',
++ holder => 'X. Ample'
++});
+
+is($license->holder, 'X. Ample', '(c) holder');
+isa_ok($license,'Software::License::LGPL_2',"license class");
+like($license->summary, qr/common-licenses/i, 'common-licenses found');
++like($license->summary, qr/later version/i, 'later version clause found');
+like($license->name, qr/version 2/i, "license name");
+like($license->fulltext, qr/library/i, 'license text');
+
diff --git a/debian/patches/test-short-name b/debian/patches/test-short-name
index 6b60478..ab8baf4 100644
--- a/debian/patches/test-short-name
+++ b/debian/patches/test-short-name
@@ -1,17 +1,20 @@
Description: Test short name
--- /dev/null
+++ b/t/short_name.t
-@@ -0,0 +1,16 @@
+@@ -0,0 +1,19 @@
+#!perl
+use strict;
+use warnings;
+
+use Test::More tests => 6;
+
-+my $class = 'Software::License';
++my $class = 'Software::LicenseUtils';
+require_ok($class);
+
-+my $license = $class->new({ short_name => 'GPL-1', holder => 'X. Ample' });
++my $license = $class->new_from_short_name({
++ short_name => 'GPL-1',
++ holder => 'X. Ample'
++});
+
+is($license->holder, 'X. Ample', '(c) holder');
+is($license->year, (localtime)[5]+1900, '(c) year');
--
Debian packaging of libsoftware-license-perl
More information about the Pkg-perl-cvs-commits
mailing list