Hello community,
here is the log from the commit of package cpanspec for openSUSE:Factory
checked in at Fri Apr 8 11:08:54 CEST 2011.
--------
--- cpanspec/cpanspec.changes 2011-04-06 11:13:07.000000000 +0200
+++ /mounts/work_src_done/STABLE/cpanspec/cpanspec.changes 2011-04-08 10:11:10.000000000 +0200
@@ -1,0 +2,19 @@
+Fri Apr 8 08:10:07 UTC 2011 - coolo@novell.com
+
+- use abstract if summary is not given
+- package examples
+- use wget -nc instead of repeated curl in cpanget
+
+-------------------------------------------------------------------
+Thu Apr 7 08:20:56 UTC 2011 - coolo@novell.com
+
+- use description=summary if no description is given, that's better
+ than "sorry"
+
+-------------------------------------------------------------------
+Wed Apr 6 13:12:51 UTC 2011 - coolo@novell.com
+
+- increment the version to 1.17.04
+ * check the pod for the license
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cpanspec.spec ++++++
--- /var/tmp/diff_new_pack.qiPjcm/_old 2011-04-08 11:01:46.000000000 +0200
+++ /var/tmp/diff_new_pack.qiPjcm/_new 2011-04-08 11:01:46.000000000 +0200
@@ -20,7 +20,7 @@
Name: cpanspec
Version: 1.78
-Release: 23
+Release: 25
%define tar_version 1.78
Summary: Generate a SUSE spec file for a CPAN module
License: GPL+ or Artistic
++++++ cpanspec.patch ++++++
--- /var/tmp/diff_new_pack.qiPjcm/_old 2011-04-08 11:01:46.000000000 +0200
+++ /var/tmp/diff_new_pack.qiPjcm/_new 2011-04-08 11:01:46.000000000 +0200
@@ -1,7 +1,7 @@
Index: cpanspec-1.78/cpanspec
===================================================================
--- cpanspec-1.78.orig/cpanspec 2009-01-16 21:35:55.000000000 +0100
-+++ cpanspec-1.78/cpanspec 2011-04-06 10:53:36.712945449 +0200
++++ cpanspec-1.78/cpanspec 2011-04-08 10:10:43.221274504 +0200
@@ -12,9 +12,6 @@
#
# $Id: cpanspec,v 1.67 2009/01/16 20:35:17 stevenpritchard Exp $
@@ -17,7 +17,7 @@
use warnings;
+our $NAME="cpanspec";
-+our $VERSION='1.78.03';
++our $VERSION='1.78.04';
+
use FileHandle;
use Archive::Tar;
@@ -51,7 +51,7 @@
our @add_buildrequires;
+our ($file,$name,$source,$version,$type);
-+our ($content,$summary,$description,$author);
++our ($content,$summary,$description,$author,$license);
# env. vars and their macro analogues
my @MACROS = (
@@ -140,7 +140,7 @@
my $path=$args{module};
$path=~s,::,/,g;
-@@ -415,60 +473,97 @@ sub get_description(%) {
+@@ -415,60 +473,130 @@ sub get_description(%) {
last if $pm;
}
@@ -208,7 +208,7 @@
+ # autoformat and return...
+ return autoformat $description, { all => 1 };
}
-+ return $description='sorry, no description found';
++ return $description=undef;
+}
- if (my $readme=(sort {
@@ -230,7 +230,6 @@
- warn "Failed to read $readme from $args{filename}"
- . ($args{type} eq 'tar'
- ? (": " . $args{archive}->error()) : "") . "\n";
-- }
+sub get_summary($$) {
+ my $cont = shift;
+ my $mod = shift;
@@ -249,7 +248,7 @@
+
+ # return...
+ return $summary = $1 if $pom;
- }
++ }
+ return $summary="$mod Perl module";
+}
+
@@ -277,16 +276,49 @@
+ }
+
+ $author = join "\n", @lines;
-
-- return(undef, undef);
++
+ # return...
+ return $author;
+ }
+ return $author='sorry, no author found';
++}
++
++sub get_license($) {
++ my $cont = shift;
++ my @lines=();
++ my $parser = Pod::POM->new;
++
++ # extract pod; the file may contain no pod, that's ok
++ my $pom = $parser->parse_text($cont);
++
++ HEAD1:
++ foreach my $head1 ($pom->head1) {
++
++ next HEAD1 unless $head1->title =~ /LICENSE/;
++
++ my $pom = $head1->content;
++ $license = $pom->present('Pod::POM::View::Text');
++
++ my @paragraphs = (split /\n/, $license);
++ foreach my $line (@paragraphs){
++ next if $line eq "";
++ next if $line =~ /Copyright/i;
++ $line =~ s/^/ /;
++ push(@lines, $line);
+ }
++
++ $license = join "\n", @lines;
++
++ # return...
++ return $license;
+ }
++ return $license='sorry, no license found';
+
+- return(undef, undef);
}
sub check_rpm($) {
-@@ -554,13 +649,6 @@ my $prefix=$noprefix ? "" : "perl-";
+@@ -554,13 +682,6 @@ my $prefix=$noprefix ? "" : "perl-";
$packager=$packager || `rpm --eval '\%packager'`;
@@ -300,7 +332,15 @@
our %corelist;
my $rpm=new FileHandle "rpm -q --provides perl|"
-@@ -577,67 +665,49 @@ while (my $provides=<$rpm>) {
+@@ -570,74 +691,56 @@ while (my $provides=<$rpm>) {
+ chomp $provides;
+
+ if ($provides=~/^perl\(([^\)]+)\)(?:\s+=\s+(\S+))\s*$/) {
+- $corelist{$1}=defined($2) ? $2 : 0;
++ #$corelist{$1}=defined($2) ? $2 : 0;
+ }
+ }
+
my @args=@ARGV;
my @processed=();
@@ -386,7 +426,7 @@
if ($@) {
warn "Failed to load IO::Uncompress::Bunzip2: $@\n";
-@@ -650,12 +720,14 @@ for my $file (@args) {
+@@ -650,12 +753,14 @@ for my $file (@args) {
warn "IO::Uncompress::Bunzip2->new() failed on $file: $!\n";
next;
}
@@ -401,7 +441,7 @@
}
my @files;
-@@ -684,12 +756,9 @@ for my $file (@args) {
+@@ -684,12 +789,9 @@ for my $file (@args) {
my $url="http://search.cpan.org/dist/$name/";
@@ -416,7 +456,7 @@
archive => $archive,
type => $type,
filename => $file,
-@@ -700,18 +769,13 @@ for my $file (@args) {
+@@ -700,18 +802,13 @@ for my $file (@args) {
path => $path,
);
@@ -441,7 +481,7 @@
my @doc=sort { $a cmp $b } grep {
!/\//
-@@ -722,17 +786,22 @@ for my $file (@args) {
+@@ -722,21 +819,29 @@ for my $file (@args) {
and $_ ne "MANIFEST.SKIP"
and $_ ne "INSTALL"
and $_ ne "SIGNATURE"
@@ -464,8 +504,19 @@
and $_ ne "pm_to_blib"
and $_ ne "install.sh"
} @files;
-@@ -809,7 +878,7 @@ for my $file (@args) {
- my $license="";
+
++ # special subdir
++ push(@doc, "examples") if grep(/examples\//, @files);
++
+ my $date=strftime("%a %b %d %Y", localtime);
+
+ my $noarch=!grep /\.(c|h|xs|inl)$/i, @files;
+@@ -806,10 +911,10 @@ for my $file (@args) {
+ print $spec qq[\%{!?perl_$vendorlib: \%define perl_$vendorlib \%(eval "\`\%{__perl} -V:install$vendorlib\`"; echo \$install$vendorlib)}\n\n]
+ if ($compat);
+
+- my $license="";
++ $license=undef;
my $scripts=0;
- my (%build_requires,%requires);
@@ -473,15 +524,47 @@
my ($yml,$meta);
if (grep /^META\.yml$/, @files
and $yml=extract($archive, $type, "$path/META.yml")) {
-@@ -823,6 +892,7 @@ for my $file (@args) {
+@@ -821,8 +926,15 @@ for my $file (@args) {
+ goto SKIP;
+ }
++ if ($meta->{abstract}) {
++ my $abstract=$meta->{abstract};
++ $summary=$abstract if (!defined($summary));
++ $description=$summary if (!defined($description));
++ }
++
%build_requires=%{$meta->{build_requires}} if ($meta->{build_requires});
%requires=%{$meta->{requires}} if ($meta->{requires});
+ %recommends=%{$meta->{recommends}} if ($meta->{recommends});
if ($meta->{recommends}) {
for my $dep (keys(%{$meta->{recommends}})) {
$requires{$dep}=$requires{$dep}
-@@ -947,45 +1017,63 @@ for my $file (@args) {
+@@ -867,7 +979,7 @@ for my $file (@args) {
+ . " This package should not be redistributed.\n";
+ } else {
+ warn "Unknown license '" . $meta->{license} . "'!\n";
+- $license="CHECK(Distributable)";
++ $license=undef;
+ }
+ }
+ SKIP:
+@@ -880,6 +992,14 @@ for my $file (@args) {
+ $license.=", see @licenses";
+ }
+ }
++ if (!defined($license)) {
++ get_license($content);
++ if ($license =~ /under the same terms as Perl itself/ ||
++ $license =~ /under the terms of the Perl artistic license/) {
++ $license = "GPL+ or Artistic";
++ }
++ }
++
+ $license="CHECK(GPL+ or Artistic)" if (!$license);
+
+ my $usebuildpl=0;
+@@ -947,45 +1067,63 @@ for my $file (@args) {
}
print $spec <