Fix FTBFS with Perl::Critic 1.122 (#1139503)

- Avoid copyright.t more forcefully, as it is now upsetting Perl::Critic too
- Use %license where possible
This commit is contained in:
Paul Howarth 2014-09-09 17:44:24 +01:00
parent 18600af033
commit cbe255c79d
1 changed files with 21 additions and 3 deletions

View File

@ -1,6 +1,6 @@
Name: perl-PPIx-Utilities
Version: 1.001000
Release: 15%{?dist}
Release: 16%{?dist}
Summary: Extensions to PPI
Group: Development/Libraries
License: GPL+ or Artistic
@ -8,6 +8,7 @@ URL: http://search.cpan.org/dist/PPIx-Utilities/
Source0: http://search.cpan.org/CPAN/authors/id/E/EL/ELLIOTJS/PPIx-Utilities-%{version}.tar.gz
BuildArch: noarch
# Build:
BuildRequires: perl
BuildRequires: perl(ExtUtils::MakeMaker)
# Run-time:
BuildRequires: perl(base)
@ -17,6 +18,8 @@ BuildRequires: perl(PPI) >= 1.208
BuildRequires: perl(PPI::Document::Fragment) >= 1.208
BuildRequires: perl(Readonly)
BuildRequires: perl(Scalar::Util)
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
# Tests:
BuildRequires: perl(Data::Dumper)
BuildRequires: perl(PPI::Document) >= 1.208
@ -28,6 +31,7 @@ BuildRequires: perl(Test::More)
# PPI needed by Perl::Critic, so don't run extra tests when bootstrapping
%if 0%{!?perl_bootstrap:1}
BuildRequires: aspell-en
BuildRequires: perl(File::Find)
BuildRequires: perl(File::Slurp)
BuildRequires: perl(Perl::Critic::Policy::Miscellanea::RequireRcsKeywords)
BuildRequires: perl(Test::Perl::Critic)
@ -49,6 +53,11 @@ PPI::Nodes is in PPIx::Utilities::Node.
%prep
%setup -q -n PPIx-Utilities-%{version}
# Remove date-sensitive copyright.t, which also upsets Perl::Critic
# (#1139503)
rm xt/author/copyright.t
sed -i -e '/copyright\.t/d' MANIFEST
%build
perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
@ -61,11 +70,16 @@ find %{buildroot} -type f -name .packlist -exec rm -f {} \;
%check
make test
%if 0%{!?perl_bootstrap:1}
make test TEST_FILES="$(echo $(find xt/ -name '*.t' | grep -Fv copyright.t))"
make test TEST_FILES="$(echo $(find xt/ -name '*.t'))"
%endif
%files
%doc Changes LICENSE README
%if 0%{?_licensedir:1}
%license LICENSE
%else
%doc LICENSE
%endif
%doc Changes README
%{perl_vendorlib}/PPIx/
%{_mandir}/man3/PPIx::Utilities.3pm*
%{_mandir}/man3/PPIx::Utilities::Exception::Bug.3pm*
@ -73,6 +87,10 @@ make test TEST_FILES="$(echo $(find xt/ -name '*.t' | grep -Fv copyright.t))"
%{_mandir}/man3/PPIx::Utilities::Statement.3pm*
%changelog
* Tue Sep 9 2014 Paul Howarth <paul@city-fan.org> - 1.001000-16
- Avoid copyright.t more forcefully, as it is now upsetting Perl::Critic too
- Use %%license where possible
* Sun Sep 07 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.001000-15
- Perl 5.20 re-rebuild of bootstrapped packages