Drop some support for older distributions
- Drop BuildRoot: tags - Drop explicit buildroot cleaning in %install section - Drop workarounds for building with Test::More < 0.94
This commit is contained in:
parent
d97c2f13f7
commit
34cd68b9cc
@ -1,53 +0,0 @@
|
||||
--- t/000-report-versions-tiny.t
|
||||
+++ t/000-report-versions-tiny.t
|
||||
@@ -1,12 +1,8 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
-use Test::More 0.88;
|
||||
-# This is a relatively nice way to avoid Test::NoWarnings breaking our
|
||||
-# expectations by adding extra tests, without using no_plan. It also helps
|
||||
-# avoid any other test module that feels introducing random tests, or even
|
||||
-# test plans, is a nice idea.
|
||||
+use Test::More 0.47 tests => 1;
|
||||
our $success = 0;
|
||||
-END { $success && done_testing; }
|
||||
+END { $success; }
|
||||
|
||||
# List our own version used to generate this
|
||||
my $v = "\nGenerated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.10\n";
|
||||
@@ -57,7 +53,7 @@ eval { $v .= pmver('IO::Handle','any ver
|
||||
eval { $v .= pmver('IPC::Open3','any version') };
|
||||
eval { $v .= pmver('Params::Util','0.14') };
|
||||
eval { $v .= pmver('Sub::Install','0.92') };
|
||||
-eval { $v .= pmver('Test::More','0.96') };
|
||||
+eval { $v .= pmver('Test::More','0.47') };
|
||||
eval { $v .= pmver('base','any version') };
|
||||
eval { $v .= pmver('lib','any version') };
|
||||
eval { $v .= pmver('overload','any version') };
|
||||
@@ -77,7 +73,6 @@ EOT
|
||||
|
||||
diag($v);
|
||||
ok(1, "we really didn't test anything, just reporting data");
|
||||
-$success = 1;
|
||||
|
||||
# Work around another nasty module on CPAN. :/
|
||||
no warnings 'once';
|
||||
--- xt/release/changes_has_content.t
|
||||
+++ xt/release/changes_has_content.t
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
use Test::More tests => 2;
|
||||
|
||||
-note 'Checking Changes';
|
||||
my $changes_file = 'Changes';
|
||||
my $newver = '0.987';
|
||||
my $trial_token = '-TRIAL';
|
||||
@@ -14,8 +13,6 @@ SKIP: {
|
||||
ok(_get_changes($newver), "$changes_file has content for $newver");
|
||||
}
|
||||
|
||||
-done_testing;
|
||||
-
|
||||
# _get_changes copied and adapted from Dist::Zilla::Plugin::Git::Commit
|
||||
# by Jerome Quelin
|
||||
sub _get_changes
|
||||
@ -1,16 +0,0 @@
|
||||
--- t/00-compile.t
|
||||
+++ t/00-compile.t
|
||||
@@ -3,7 +3,7 @@ use warnings;
|
||||
|
||||
# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.037
|
||||
|
||||
-use Test::More 0.94 tests => 2;
|
||||
+use Test::More 0.47 tests => 2;
|
||||
|
||||
|
||||
|
||||
@@ -46,4 +46,3 @@ for my $lib (@module_files)
|
||||
|
||||
# no warning checks;
|
||||
|
||||
-BAIL_OUT("Compilation problems") if !Test::More->builder->is_passing;
|
||||
@ -1,9 +1,5 @@
|
||||
# We need to patch the test suite if we have an old version of Test::More
|
||||
%global quite_old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.94) ? 1 : 0);' 2>/dev/null || echo 0)
|
||||
%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.88) ? 1 : 0);' 2>/dev/null || echo 0)
|
||||
|
||||
# Provides/Requires filtering is different from rpm 4.9 onwards
|
||||
%global rpm49 0%(rpm --version | perl -p -e 's/^.* (\\d+)\\.(\\d+).*/sprintf("%d.%03d",$1,$2) ge 4.009 ? 1 : 0/e')
|
||||
%global rpm49 %(rpm --version | perl -p -e 's/^.* (\\d+)\\.(\\d+).*/sprintf("%d.%03d",$1,$2) ge 4.009 ? 1 : 0/e' 2>/dev/null || echo 0)
|
||||
|
||||
# Run extra test
|
||||
%if ! (0%{?rhel})
|
||||
@ -14,21 +10,18 @@
|
||||
|
||||
Name: perl-Sub-Exporter
|
||||
Version: 0.987
|
||||
Release: 14%{?dist}
|
||||
Release: 15%{?dist}
|
||||
Summary: Sophisticated exporter for custom-built routines
|
||||
License: GPL+ or Artistic
|
||||
Group: Development/Libraries
|
||||
URL: https://metacpan.org/release/Sub-Exporter
|
||||
Source0: http://cpan.metacpan.org/authors/id/R/RJ/RJBS/Sub-Exporter-%{version}.tar.gz
|
||||
Patch0: Sub-Exporter-0.987-tm094.patch
|
||||
Patch1: Sub-Exporter-0.987-tm088.patch
|
||||
BuildArch: noarch
|
||||
# Build
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: findutils
|
||||
BuildRequires: make
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: perl-generators
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.30
|
||||
# Module
|
||||
BuildRequires: perl(Carp)
|
||||
@ -44,10 +37,10 @@ BuildRequires: perl(IO::Handle)
|
||||
BuildRequires: perl(IPC::Open3)
|
||||
BuildRequires: perl(lib)
|
||||
BuildRequires: perl(subs)
|
||||
BuildRequires: perl(Test::More)
|
||||
%if %{with perl_Sub_Exporter_enables_extra_test}
|
||||
BuildRequires: perl(Test::More) >= 0.94
|
||||
# Extra tests
|
||||
BuildRequires: perl(Test::Pod)
|
||||
%if %{with perl_Sub_Exporter_enables_extra_test}
|
||||
BuildRequires: perl(Test::Pod) >= 1.41
|
||||
%endif
|
||||
# Runtime
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
||||
@ -68,17 +61,9 @@ Sub::Exporter::Tutorial first!
|
||||
%prep
|
||||
%setup -q -n Sub-Exporter-%{version}
|
||||
|
||||
# We need to patch the test suite if we have an old version of Test::More
|
||||
%if %{quite_old_test_more}
|
||||
%patch0
|
||||
%endif
|
||||
%if %{old_test_more}
|
||||
%patch1
|
||||
%endif
|
||||
|
||||
# Fix shellbangs
|
||||
find t/ -type f -exec \
|
||||
perl -MExtUtils::MakeMaker -e 'ExtUtils::MM_Unix->fixin(qw{{}})' \;
|
||||
perl -MExtUtils::MakeMaker -e 'ExtUtils::MM_Unix->fixin(qw{{}})' \;
|
||||
|
||||
# Filter bogus provides/requires if we don't have rpm ≥ 4.9
|
||||
%if ! %{rpm49}
|
||||
@ -93,10 +78,9 @@ perl Makefile.PL INSTALLDIRS=vendor
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
rm -rf %{buildroot}
|
||||
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
|
||||
@ -118,6 +102,13 @@ make test TEST_FILES="$(echo $(find xt/ -name '*.t'))"
|
||||
%{_mandir}/man3/Sub::Exporter::Util.3*
|
||||
|
||||
%changelog
|
||||
* Thu Apr 12 2018 Paul Howarth <paul@city-fan.org> - 0.987-15
|
||||
- Drop some support for older distributions
|
||||
- Drop BuildRoot: and Group: tags
|
||||
- Drop explicit buildroot cleaning in %%install section
|
||||
- Drop explicit %%clean section
|
||||
- Drop workarounds for building with Test::More < 0.94
|
||||
|
||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.987-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user