Clean up for building --with author_tests

This commit is contained in:
Paul Howarth 2018-04-18 09:52:43 +01:00
parent 4667ce7a2a
commit af8d6cf985
2 changed files with 15 additions and 7 deletions

2
.rpmlint Normal file
View File

@ -0,0 +1,2 @@
from Config import *
addFilter("spelling-error %description -l en_US Calc -> ")

View File

@ -2,7 +2,7 @@
Name: perl-Math-BigInt-GMP
Version: 1.6005
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Use the GMP library for Math::BigInt routines
License: GPL+ or Artistic
URL: http://search.cpan.org/dist/Math-BigInt-GMP/
@ -27,16 +27,19 @@ BuildRequires: perl(XSLoader) >= 0.02
BuildRequires: perl(Exporter)
BuildRequires: perl(Math::BigFloat) >= 1.994
BuildRequires: perl(Math::BigInt) >= 1.999812
BuildRequires: perl(Pod::Coverage) >= 0.18
BuildRequires: perl(Storable)
BuildRequires: perl(Test::More) >= 0.88
BuildRequires: perl(Test::Pod) >= 1.22
BuildRequires: perl(Test::Pod::Coverage) >= 1.08
BuildRequires: perl(threads)
# Author Tests
# Author/Release Tests
%if %{with author_tests}
BuildRequires: perl(Config::Tiny)
BuildRequires: perl(Pod::Coverage) >= 0.18
BuildRequires: perl(Test::CPAN::Changes)
BuildRequires: perl(Test::Pod) >= 1.22
BuildRequires: perl(Test::Pod::Coverage) >= 1.08
BuildRequires: perl(Test::Portability::Files)
BuildRequires: perl(Test::Version)
%endif
# Runtime
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
@ -56,6 +59,9 @@ also reduces the memory footprint by not loading Math::GMP and Carp at all.
# Get rid of bogus exec permissions
chmod -c -x CHANGES lib/Math/BigInt/GMP.pm
# t/release-cpan-changes.t wants "Changes", not "CHANGES"
ln -s CHANGES Changes
%build
perl Makefile.PL \
INSTALLDIRS=vendor \
@ -67,10 +73,10 @@ make %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
find %{buildroot} -type f -name '*.bs' -empty -delete
%{_fixperms} %{buildroot}
%{_fixperms} -c %{buildroot}
%check
make test %{?_with_author_tests:AUTHOR_TESTING=1}
make test %{?_with_author_tests:AUTHOR_TESTING=1 RELEASE_TESTING=1}
%files
%license LICENSE