Drop EL-5 support and introduce build-condition for optional tests
- Drop EL-5 support - Drop BuildRoot: and Group: tags - Drop explicit buildroot cleaning in %install section - Drop explicit %clean section - Drop workaround for building with Test::More < 0.88 - Spell checker is always hunspell now - Introduce build-condition for optional tests - Desired for modularity
This commit is contained in:
parent
8deae6e202
commit
c2efc33ea8
|
@ -0,0 +1,3 @@
|
|||
from Config import *
|
||||
addFilter("spelling-error %description -l en_US linux -> ");
|
||||
addFilter("spelling-error %description -l en_US freebsd -> ");
|
|
@ -1,30 +0,0 @@
|
|||
--- t/OSType.t
|
||||
+++ t/OSType.t
|
||||
@@ -1,7 +1,7 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
-use Test::More 0.88;
|
||||
+use Test::More tests => 19;
|
||||
|
||||
use constant NON_EXISTENT_OS => 'titanix'; #the system they said could not go down...
|
||||
|
||||
@@ -65,5 +65,3 @@ can_ok( $test_pkg, @functions );
|
||||
ok( !is_os_type(), "$fcn: false if no type provided" );
|
||||
}
|
||||
|
||||
-done_testing;
|
||||
-
|
||||
--- xt/author/test-version.t
|
||||
+++ xt/author/test-version.t
|
||||
@@ -17,7 +17,8 @@ my $params = {
|
||||
push @imports, $params
|
||||
if version->parse( $Test::Version::VERSION ) >= version->parse('1.002');
|
||||
|
||||
+plan tests => 2;
|
||||
+
|
||||
Test::Version->import(@imports);
|
||||
|
||||
-version_all_ok;
|
||||
-done_testing;
|
||||
+version_all_ok();
|
|
@ -1,33 +1,21 @@
|
|||
# Test suite needs patching if we have Test::More < 0.88
|
||||
%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.88) ? 1 : 0);' 2>/dev/null || echo 0)
|
||||
|
||||
# Select the appropriate system speller
|
||||
%if 0%{?rhel} && (0%{?rhel} < 6)
|
||||
%global speller aspell
|
||||
%else
|
||||
%global speller hunspell
|
||||
%endif
|
||||
# Run optional tests
|
||||
%bcond_without perl_Perl_OSType_enables_optional_test
|
||||
|
||||
Name: perl-Perl-OSType
|
||||
Version: 1.010
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: Map Perl operating system names to generic types
|
||||
License: GPL+ or Artistic
|
||||
Group: Development/Libraries
|
||||
URL: http://search.cpan.org/dist/Perl-OSType/
|
||||
Source0: http://search.cpan.org/CPAN/authors/id/D/DA/DAGOLDEN/Perl-OSType-%{version}.tar.gz
|
||||
Patch1: Perl-OSType-1.010-old-Test::More.patch
|
||||
Patch2: Perl-OSType-1.010-stopwords.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
|
||||
BuildArch: noarch
|
||||
# Build
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: findutils
|
||||
BuildRequires: make
|
||||
BuildRequires: perl
|
||||
%if 0%{?fedora} > 20 || 0%{?rhel} > 7
|
||||
BuildRequires: perl-generators
|
||||
%endif
|
||||
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.17
|
||||
# Module
|
||||
BuildRequires: perl(Exporter)
|
||||
|
@ -37,10 +25,10 @@ BuildRequires: perl(warnings)
|
|||
BuildRequires: perl(blib)
|
||||
BuildRequires: perl(constant)
|
||||
BuildRequires: perl(File::Spec)
|
||||
BuildRequires: perl(Test::More)
|
||||
BuildRequires: perl(Test::More) >= 0.88
|
||||
# Optional tests, not run for this dual-lived module when bootstrapping
|
||||
# Also not run for EPEL builds due to package unavailability
|
||||
%if !%{defined perl_bootstrap} && 0%{?fedora}
|
||||
%if !%{defined perl_bootstrap} && 0%{?fedora} && %{with perl_Perl_OSType_enables_optional_test}
|
||||
BuildRequires: perl(CPAN::Meta) >= 2.120900
|
||||
BuildRequires: perl(CPAN::Meta::Prereqs)
|
||||
BuildRequires: perl(File::Temp)
|
||||
|
@ -55,7 +43,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), %{speller}-en
|
||||
BuildRequires: perl(Test::Spelling), hunspell-en
|
||||
BuildRequires: perl(Test::Version)
|
||||
%endif
|
||||
# Runtime
|
||||
|
@ -74,11 +62,6 @@ systems are given the type 'Windows' rather than 'Win32').
|
|||
%prep
|
||||
%setup -q -n Perl-OSType-%{version}
|
||||
|
||||
# Fix test suite for Test::More < 0.88
|
||||
%if %{old_test_more}
|
||||
%patch1
|
||||
%endif
|
||||
|
||||
# More stopwords for the spell checker
|
||||
%patch2
|
||||
|
||||
|
@ -87,20 +70,16 @@ perl Makefile.PL INSTALLDIRS=vendor
|
|||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
make pure_install DESTDIR=%{buildroot}
|
||||
find %{buildroot} -type f -name .packlist -delete
|
||||
%{_fixperms} %{buildroot}
|
||||
%{_fixperms} -c %{buildroot}
|
||||
|
||||
%check
|
||||
make test
|
||||
%if !%{defined perl_bootstrap} && 0%{?fedora}
|
||||
%if !%{defined perl_bootstrap} && 0%{?fedora} && %{with perl_Perl_OSType_enables_optional_test}
|
||||
LANG=en_US make test TEST_FILES="$(echo $(find xt/ -name '*.t'))"
|
||||
%endif
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%files
|
||||
%if 0%{?_licensedir:1}
|
||||
%license LICENSE
|
||||
|
@ -112,6 +91,15 @@ rm -rf %{buildroot}
|
|||
%{_mandir}/man3/Perl::OSType.3*
|
||||
|
||||
%changelog
|
||||
* Wed Apr 5 2017 Paul Howarth <paul@city-fan.org> - 1.010-4
|
||||
- Drop EL-5 support
|
||||
- Drop BuildRoot: and Group: tags
|
||||
- Drop explicit buildroot cleaning in %%install section
|
||||
- Drop explicit %%clean section
|
||||
- Drop workaround for building with Test::More < 0.88
|
||||
- Spell checker is always hunspell now
|
||||
- Introduce build-condition for optional tests
|
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.010-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
|
|
Loading…
Reference in New Issue