[perl-Module-CPANTS-Analyse] Spec clean-up
Paul Howarth
pghmcfc at fedoraproject.org
Wed Mar 7 20:10:39 UTC 2012
commit c2d388aeabbd2f691543780bbb04834508469226
Author: Paul Howarth <paul at city-fan.org>
Date: Wed Mar 7 19:25:55 2012 +0000
Spec clean-up
- Fix line endings of cpants_lint.pl script and documentation
- Run the author tests too
- BR: perl(Perl::Critic) except when bootstrapping
- BR: perl(Test::CPAN::Meta::YAML::Version) rather than
perl(Test::CPAN::Meta::YAML)
- Don't BR: perl(Test::Pod::Coverage) due to presence of naked subroutines
- Sort buildreqs for readability
- Don't need to remove empty directories from buildroot
- Don't use macros for commands
- Drop %defattr, redundant since rpm 4.4
- Make %files list more explicit
perl-Module-CPANTS-Analyse.spec | 100 +++++++++++++++++++++++++++------------
1 files changed, 69 insertions(+), 31 deletions(-)
---
diff --git a/perl-Module-CPANTS-Analyse.spec b/perl-Module-CPANTS-Analyse.spec
index fa22bd7..fa76a1c 100644
--- a/perl-Module-CPANTS-Analyse.spec
+++ b/perl-Module-CPANTS-Analyse.spec
@@ -1,40 +1,47 @@
Name: perl-Module-CPANTS-Analyse
Version: 0.85
-Release: 10%{?dist}
+Release: 11%{?dist}
Summary: Generate Kwalitee ratings for a distribution
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/Module-CPANTS-Analyse/
Source0: http://www.cpan.org/authors/id/C/CH/CHORNY/Module-CPANTS-Analyse-%{version}.tar.gz
-Patch1: Module-CPANTS-Analyse-%{version}-Meta-YAML.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch1: Module-CPANTS-Analyse-0.85-Meta-YAML.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildArch: noarch
BuildRequires: perl(Archive::Any) >= 0.06
BuildRequires: perl(Archive::Tar) >= 1.30
BuildRequires: perl(Array::Diff) >= 0.04
BuildRequires: perl(Class::Accessor) >= 0.19
BuildRequires: perl(CPAN::DistnameInfo) >= 0.06
+BuildRequires: perl(File::Find::Rule)
+BuildRequires: perl(File::Slurp)
BuildRequires: perl(IO::Capture) >= 0.05
+BuildRequires: perl(List::MoreUtils)
+BuildRequires: perl(LWP::Simple)
BuildRequires: perl(Module::Build)
BuildRequires: perl(Module::ExtractUse) >= 0.18
BuildRequires: perl(Module::Pluggable) >= 2.96
BuildRequires: perl(Pod::Simple::Checker) >= 2.02
-BuildRequires: perl(Test::CPAN::Meta::YAML) >= 0.11
-BuildRequires: perl(version) >= 0.73
-BuildRequires: perl(YAML::Syck) >= 0.95
-BuildRequires: perl(Test::More)
+BuildRequires: perl(Readonly)
+BuildRequires: perl(Software::License)
+BuildRequires: perl(Test::CPAN::Meta::YAML::Version) >= 0.11
BuildRequires: perl(Test::Deep)
+BuildRequires: perl(Test::More)
+BuildRequires: perl(Test::NoWarnings)
+# We need to avoid Perl::Critic when bootstrapping because some of its dependencies
+# such as PPIx::Regexp and Exception::Class may want to use Test::Kwalitee, which of
+# course requires Module::CPANTS::Analyse
+%if 0%{!?perl_bootstrap:1}
+BuildRequires: perl(Test::Perl::Critic)
+%endif
BuildRequires: perl(Test::Pod)
-BuildRequires: perl(Test::Pod::Coverage)
+# Naked subroutines present in 0.85
+#BuildRequires: perl(Test::Pod::Coverage)
BuildRequires: perl(Test::Warn)
-BuildRequires: perl(Test::NoWarnings)
-BuildRequires: perl(File::Find::Rule)
-BuildRequires: perl(Readonly)
-BuildRequires: perl(List::MoreUtils)
-BuildRequires: perl(File::Slurp)
-BuildRequires: perl(LWP::Simple)
-BuildRequires: perl(Software::License)
BuildRequires: perl(Text::CSV_XS)
+BuildRequires: perl(version) >= 0.73
+BuildRequires: perl(YAML::Syck) >= 0.95
Requires: perl(Archive::Any) >= 0.06
Requires: perl(Archive::Tar) >= 1.30
Requires: perl(Array::Diff) >= 0.04
@@ -47,50 +54,81 @@ Requires: perl(Pod::Simple::Checker) >= 2.02
Requires: perl(Test::CPAN::Meta::YAML::Version) >= 0.11
Requires: perl(version) >= 0.73
Requires: perl(YAML::Syck) >= 0.95
-Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
%description
-CPANTS is an acronym for CPAN Testing Service. The goals
-of the CPANTS project are to provide some sort of quality
-measure (called "Kwalitee") and lots of metadata for all
-distributions on CPAN.
+CPANTS is an acronym for CPAN Testing Service. The goals of the CPANTS project
+are to provide some sort of quality measure (called "Kwalitee") and lots of
+metadata for all distributions on CPAN.
%prep
%setup -q -n Module-CPANTS-Analyse-%{version}
+
+# Test::YAML::Meta::Version superseded by Test::CPAN::Meta::YAML::Version
+# (CPAN RT#65903)
%patch1 -p1
+# Fix line endings
+sed -i -e 's/\r$//' bin/cpants_lint.pl Changes README TODO
+
%build
-%{__perl} Build.PL installdirs=vendor
+perl Build.PL installdirs=vendor
./Build
%install
rm -rf $RPM_BUILD_ROOT
-
./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
-find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
-
-%{_fixperms} $RPM_BUILD_ROOT/*
+%{_fixperms} $RPM_BUILD_ROOT
%check
./Build test
+AUTHOR_TEST=1 ./Build test --test_files="xt/*.t"
%clean
rm -rf $RPM_BUILD_ROOT
%files
-%defattr(-,root,root,-)
%doc Changes README TODO
-%dir %{perl_vendorlib}/Module
-%dir %{perl_vendorlib}/Module/CPANTS
+%{_bindir}/cpants_lint.pl
+%dir %{perl_vendorlib}/Module/
+%dir %{perl_vendorlib}/Module/CPANTS/
%{perl_vendorlib}/Module/CPANTS/Analyse.pm
%{perl_vendorlib}/Module/CPANTS/Kwalitee.pm
%dir %{perl_vendorlib}/Module/CPANTS/Kwalitee/
%{perl_vendorlib}/Module/CPANTS/Kwalitee/*.pm
-%{_mandir}/man1/*.1*
-%{_mandir}/man3/*.3pm*
-%{_bindir}/cpants_lint.pl
+%{_mandir}/man1/cpants_lint.pl.1*
+%{_mandir}/man3/Module::CPANTS::Analyse.3pm*
+%{_mandir}/man3/Module::CPANTS::Kwalitee.3pm*
+%{_mandir}/man3/Module::CPANTS::Kwalitee::BrokenInstaller.3pm*
+%{_mandir}/man3/Module::CPANTS::Kwalitee::CpantsErrors.3pm*
+%{_mandir}/man3/Module::CPANTS::Kwalitee::Distname.3pm*
+%{_mandir}/man3/Module::CPANTS::Kwalitee::Distros.3pm*
+%{_mandir}/man3/Module::CPANTS::Kwalitee::Files.3pm*
+%{_mandir}/man3/Module::CPANTS::Kwalitee::FindModules.3pm*
+%{_mandir}/man3/Module::CPANTS::Kwalitee::License.3pm*
+%{_mandir}/man3/Module::CPANTS::Kwalitee::Manifest.3pm*
+%{_mandir}/man3/Module::CPANTS::Kwalitee::MetaYML.3pm*
+%{_mandir}/man3/Module::CPANTS::Kwalitee::NeedsCompiler.3pm*
+%{_mandir}/man3/Module::CPANTS::Kwalitee::Pod.3pm*
+%{_mandir}/man3/Module::CPANTS::Kwalitee::Prereq.3pm*
+%{_mandir}/man3/Module::CPANTS::Kwalitee::Repackageable.3pm*
+%{_mandir}/man3/Module::CPANTS::Kwalitee::Uses.3pm*
+%{_mandir}/man3/Module::CPANTS::Kwalitee::Version.3pm*
%changelog
+* Wed Mar 7 2012 Paul Howarth <paul at city-fan.org> - 0.85-11
+- Fix line endings of cpants_lint.pl script and documentation
+- Run the author tests too
+- BR: perl(Perl::Critic) except when bootstrapping
+- BR: perl(Test::CPAN::Meta::YAML::Version) rather than
+ perl(Test::CPAN::Meta::YAML)
+- Don't BR: perl(Test::Pod::Coverage) due to presence of naked subroutines
+- Sort buildreqs for readability
+- Don't need to remove empty directories from buildroot
+- Don't use macros for commands
+- Drop %%defattr, redundant since rpm 4.4
+- Make %%files list more explicit
+
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.85-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the scm-commits
mailing list