From f693254160585068bd1db62ffa980963a2ef7011 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Thu, 6 Apr 2017 11:02:14 +0100 Subject: [PATCH] Introduce build-condition for optional tests Also: - Simplify find command using -delete - Switch to hunspell for spell check --- perl-CPAN-Meta-Requirements.spec | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/perl-CPAN-Meta-Requirements.spec b/perl-CPAN-Meta-Requirements.spec index f2859e9..f97c19b 100644 --- a/perl-CPAN-Meta-Requirements.spec +++ b/perl-CPAN-Meta-Requirements.spec @@ -1,6 +1,9 @@ +# Run optional tests +%bcond_without perl_CPAN_Meta_Requirements_enables_optional_test + Name: perl-CPAN-Meta-Requirements Version: 2.140 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Set of version requirements for a CPAN dist License: GPL+ or Artistic Group: Development/Libraries @@ -24,7 +27,7 @@ BuildRequires: perl(warnings) BuildRequires: perl(File::Spec) BuildRequires: perl(Test::More) # Extra Tests (not run when bootstrapping due to circular build dependencies) -%if !%{defined perl_bootstrap} && ! ( 0%{?rhel} ) +%if !%{defined perl_bootstrap} && ! ( 0%{?rhel} ) && %{with perl_CPAN_Meta_Requirements_enables_optional_test} BuildRequires: perl(blib) BuildRequires: perl(CPAN::Meta) >= 2.120900 BuildRequires: perl(English) @@ -41,7 +44,7 @@ BuildRequires: perl(Test::Perl::Critic) BuildRequires: perl(Test::Pod) >= 1.41 BuildRequires: perl(Test::Pod::Coverage) >= 1.08 BuildRequires: perl(Test::Portability::Files) -BuildRequires: perl(Test::Spelling) >= 0.12, aspell-en +BuildRequires: perl(Test::Spelling) >= 0.12, hunspell-en BuildRequires: perl(Test::Version) >= 1 %endif # Runtime @@ -79,12 +82,12 @@ make %{?_smp_mflags} %install make pure_install DESTDIR=%{buildroot} -find %{buildroot} -type f -name .packlist -exec rm -f {} \; -%{_fixperms} %{buildroot} +find %{buildroot} -type f -name .packlist -delete +%{_fixperms} -c %{buildroot} %check make test AUTHOR_TESTING=1 -%if !%{defined perl_bootstrap} && ! ( 0%{?rhel} ) +%if !%{defined perl_bootstrap} && ! ( 0%{?rhel} ) && %{with perl_CPAN_Meta_Requirements_enables_optional_test} make test TEST_FILES="$(echo $(find xt/ -name '*.t'))" %endif @@ -95,6 +98,11 @@ make test TEST_FILES="$(echo $(find xt/ -name '*.t'))" %{_mandir}/man3/CPAN::Meta::Requirements.3* %changelog +* Thu Apr 6 2017 Paul Howarth - 2.140-7 +- Introduce build-condition for optional tests +- Simplify find command using -delete +- Switch to hunspell for spell check + * Sat Feb 11 2017 Fedora Release Engineering - 2.140-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild