Add build conditions

epel9
Petr Písař 7 years ago
parent b8a784b74f
commit c3256c3e2f

@ -1,3 +1,10 @@
# Report a difference on string nonequivalnce
%bcond_without perl_Test_Base_enables_diff
# Run extra test
%bcond_without perl_Test_Base_enables_extra_test
# Enable getting documents by URLs
%bcond_without perl_Test_Base_enables_network
Name: perl-Test-Base Name: perl-Test-Base
Version: 0.89 Version: 0.89
Release: 1%{?dist} Release: 1%{?dist}
@ -14,19 +21,25 @@ BuildRequires: perl-generators
BuildRequires: perl-interpreter BuildRequires: perl-interpreter
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.52 BuildRequires: perl(ExtUtils::MakeMaker) >= 6.52
# Module Runtime # Module Runtime
%if %{with perl_Test_Base_enables_diff}
BuildRequires: perl(Algorithm::Diff) >= 1.15 BuildRequires: perl(Algorithm::Diff) >= 1.15
%endif
BuildRequires: perl(Carp) BuildRequires: perl(Carp)
BuildRequires: perl(Data::Dumper) BuildRequires: perl(Data::Dumper)
BuildRequires: perl(File::Path) BuildRequires: perl(File::Path)
BuildRequires: perl(Filter::Util::Call) BuildRequires: perl(Filter::Util::Call)
BuildRequires: perl(LWP::Simple) %if %{with perl_Test_Base_enables_network}
# LWP::Simple not used at tests
%endif
BuildRequires: perl(MIME::Base64) BuildRequires: perl(MIME::Base64)
BuildRequires: perl(Scalar::Util) >= 1.07 BuildRequires: perl(Scalar::Util) >= 1.07
BuildRequires: perl(Spiffy) >= 0.40 BuildRequires: perl(Spiffy) >= 0.40
BuildRequires: perl(strict) BuildRequires: perl(strict)
BuildRequires: perl(Test::Deep) BuildRequires: perl(Test::Deep)
BuildRequires: perl(Test::More) >= 0.88 BuildRequires: perl(Test::More) >= 0.88
%if %{with perl_Test_Base_enables_diff}
BuildRequires: perl(Text::Diff) >= 0.35 BuildRequires: perl(Text::Diff) >= 0.35
%endif
BuildRequires: perl(warnings) BuildRequires: perl(warnings)
BuildRequires: perl(YAML) BuildRequires: perl(YAML)
# Test Suite # Test Suite
@ -34,20 +47,28 @@ BuildRequires: perl(base)
BuildRequires: perl(File::Find) BuildRequires: perl(File::Find)
BuildRequires: perl(lib) BuildRequires: perl(lib)
BuildRequires: perl(Test::Tester) BuildRequires: perl(Test::Tester)
%if %{with perl_Test_Base_enables_extra_test}
# Release Tests # Release Tests
BuildRequires: perl(Test::Pod) >= 1.41 BuildRequires: perl(Test::Pod) >= 1.41
%endif
# Dependencies # Dependencies
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
%if %{with perl_Test_Base_enables_diff}
Requires: perl(Algorithm::Diff) >= 1.15 Requires: perl(Algorithm::Diff) >= 1.15
%endif
Requires: perl(Data::Dumper) Requires: perl(Data::Dumper)
Requires: perl(File::Path) Requires: perl(File::Path)
Requires: perl(Filter::Util::Call) Requires: perl(Filter::Util::Call)
%if %{with perl_Test_Base_enables_network}
Requires: perl(LWP::Simple) Requires: perl(LWP::Simple)
%endif
Requires: perl(MIME::Base64) Requires: perl(MIME::Base64)
Requires: perl(Scalar::Util) >= 1.07 Requires: perl(Scalar::Util) >= 1.07
Requires: perl(Test::Deep) Requires: perl(Test::Deep)
Requires: perl(Test::More) >= 0.88 Requires: perl(Test::More) >= 0.88
%if %{with perl_Test_Base_enables_diff}
Requires: perl(Text::Diff) >= 0.35 Requires: perl(Text::Diff) >= 0.35
%endif
Requires: perl(YAML) Requires: perl(YAML)
%description %description
@ -73,7 +94,7 @@ find %{buildroot} -type f -name .packlist -delete
%{_fixperms} -c %{buildroot} %{_fixperms} -c %{buildroot}
%check %check
make test RELEASE_TESTING=1 make test %{?with_perl_Test_Base_enables_extra_test:RELEASE_TESTING=1}
%files %files
%license LICENSE %license LICENSE

Loading…
Cancel
Save