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 - [email protected] + +- 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 - [email protected] + +- use description=summary if no description is given, that's better + than "sorry" + +------------------------------------------------------------------- +Wed Apr 6 13:12:51 UTC 2011 - [email protected] + +- 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 <<END; @@ -562,7 +645,7 @@ if (check_dep($dep)) { verbose("$dep is available, skipping."); } else { -@@ -1000,11 +1088,12 @@ END +@@ -1000,11 +1138,12 @@ END print $spec "\n"; } @@ -577,7 +660,7 @@ next if (!$compat and exists($corelist{$dep})); printf $spec "%-16s%s", "Requires:", "perl($dep)"; print $spec (" >= " . $requires{$dep}) if ($requires{$dep}); -@@ -1015,15 +1104,19 @@ END +@@ -1015,15 +1154,19 @@ END printf $spec "%-16s%s\n", "Requires:", $dep; } @@ -602,7 +685,7 @@ if (@filter_requires) { print $spec <<END -@@ -1043,7 +1136,10 @@ Source99: $name-filter-provides.sh +@@ -1043,7 +1186,10 @@ Source99: $name-filter-provides.sh END } @@ -613,7 +696,7 @@ $buildpath=~s/$version/\%{version}/; print $spec <<END; -@@ -1085,7 +1181,8 @@ END +@@ -1085,7 +1231,8 @@ END if ($usebuildpl) { print $spec <<END; \%{__perl} Build.PL installdirs=vendor@{[$noarch ? '' : qq{ optimize="$macro{optimize}"} ]} @@ -623,35 +706,35 @@ END } else { print $spec <<END; -@@ -1097,15 +1194,24 @@ END +@@ -1097,15 +1244,24 @@ END if ($compat and !$noarch); print $spec <<END; -make \%{?_smp_mflags} +\%{__make} \%{?_smp_mflags} + - END - } - - print $spec <<END; -+\%check@{[($compat ? ' || :' : '')]} +END ++ } ++ ++ print $spec <<END; ++\%check@{[($compat ? ' || :' : '')]} + END + if ($usebuildpl) { + print $spec "./Build test\n"; + } else { + print $spec "\%{__make} test\n"; -+ } - --\%install --rm -rf $macro{buildroot} + } -+ print $spec <<END; + -+\%install + print $spec <<END; + + \%install +-rm -rf $macro{buildroot} +- END if ($usebuildpl) { -@@ -1113,24 +1219,12 @@ END +@@ -1113,24 +1269,12 @@ END "./Build install destdir=$macro{buildroot} create_packlist=0\n"; } else { print $spec <<END; @@ -680,7 +763,7 @@ if ($addlicense and !grep /copying|artistic|copyright|license/i, @doc) { print $spec <<END; -@@ -1143,43 +1237,28 @@ END +@@ -1143,43 +1287,28 @@ END } print $spec <<END; @@ -731,7 +814,7 @@ END $spec->close(); -@@ -1187,6 +1266,16 @@ END +@@ -1187,6 +1316,16 @@ END build_rpm($specfile) if ($buildsrpm or $buildrpm); push(@processed, $module); @@ -748,3 +831,17 @@ } # vi: set ai et: +Index: cpanspec-1.78/cpanget +=================================================================== +--- cpanspec-1.78.orig/cpanget 2009-01-16 21:35:55.000000000 +0100 ++++ cpanspec-1.78/cpanget 2011-04-08 10:10:47.357093029 +0200 +@@ -55,7 +55,8 @@ fi + + mkdir -p $( dirname $packages ) + +-curl $quiet -R -o $packages $CPAN/modules/$( basename $packages ) ++ ++(cd $(dirname $packages) && wget -q -nc $CPAN/modules/$( basename $packages ) ) + + for module in "$@" ; do + tar=$( zgrep '^'$module' ' $packages | awk '{print $3}' ) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
