Clean up bootstrapping and RHEL conditionals

- Run the extra tests in a separate test run, and only when not bootstrapping
- Don't BR: perl(Test::Spelling) with RHEL ≥ 7 as we don't have the other
  dependencies needed do the spell check test
This commit is contained in:
Paul Howarth 2012-06-07 11:24:21 +01:00
parent 9b3918d2b2
commit 796621320e

View File

@ -3,7 +3,7 @@
Name: perl-CPAN-Meta-YAML
Version: 0.008
Release: 6%{?dist}
Release: 7%{?dist}
Summary: Read and write a subset of YAML for CPAN Meta files
License: GPL+ or Artistic
Group: Development/Libraries
@ -17,16 +17,19 @@ BuildRequires: perl(File::Spec)
# Tests:
BuildRequires: perl(Test::More)
BuildRequires: perl(YAML)
%if !%{defined perl_bootstrap}
# Version 1.113620 needed for "UTF"; RHEL-7 package cannot have buildreq from EPEL-7
# Don't run extra tests when bootstrapping as many of those
# tests' dependencies build-require this package
%if 0%{!?perl_bootstrap:1}
# RHEL-7 package cannot have buildreqs from EPEL-7 (aspell-en, Pod::Wordlist::hanekomu),
# so skip the spell check there
%if 0%{?rhel} < 7
# Version 1.113620 needed for "UTF"
BuildRequires: perl(Pod::Wordlist::hanekomu) >= 1.113620
BuildRequires: aspell-en
BuildRequires: perl(Test::Spelling), aspell-en
%endif
BuildRequires: perl(Test::CPAN::Meta)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Requires)
BuildRequires: perl(Test::Spelling)
# RHEL ≤ 6 doesn't have a recent enough perl(version) for perl(Test::Version)
%if 0%{?fedora} || 0%{?rhel} > 6
BuildRequires: perl(Test::Version)
@ -58,10 +61,10 @@ find %{buildroot} -type f -name .packlist -exec rm -f {} \;
%{_fixperms} %{buildroot}
%check
%if %{defined perl_bootstrap}
rm -rf xt
make test
%if 0%{!?perl_bootstrap:1}
make test TEST_FILES="xt/*/*.t"
%endif
make test TEST_FILES="t/*.t xt/*/*.t"
%clean
rm -rf %{buildroot}
@ -72,8 +75,13 @@ rm -rf %{buildroot}
%{_mandir}/man3/CPAN::Meta::YAML.3pm*
%changelog
* Thu Jun 7 2012 Paul Howarth <paul@city-fan.org> - 0.008-7
- Run the extra tests in a separate test run, and only when not bootstrapping
- Don't BR: perl(Test::Spelling) with RHEL ≥ 7 as we don't have the other
dependencies needed do the spell check test
* Thu Jun 7 2012 Marcela Mašláňová <mmaslano@redhat.com> - 0.008-6
- conditionalize dependency on aspell
- Conditionalize dependency on aspell
* Wed Jun 06 2012 Petr Pisar <ppisar@redhat.com> - 0.008-5
- Perl 5.16 rebuild