diff --git a/Dist-CheckConflicts-0.11-old-Test::More.patch b/Dist-CheckConflicts-0.11-old-Test::More.patch deleted file mode 100644 index 2105170..0000000 --- a/Dist-CheckConflicts-0.11-old-Test::More.patch +++ /dev/null @@ -1,128 +0,0 @@ ---- t/also.t -+++ t/also.t -@@ -1,7 +1,7 @@ - #!/usr/bin/env perl - use strict; - use warnings; --use Test::More; -+use Test::More tests => 2; - use Test::Fatal; - use lib 't/lib/also'; - -@@ -29,4 +29,3 @@ use lib 't/lib/also'; - ); - } - --done_testing; ---- t/basic.t -+++ t/basic.t -@@ -1,7 +1,7 @@ - #!/usr/bin/env perl - use strict; - use warnings; --use Test::More; -+use Test::More tests => 4; - use lib 't/lib/basic'; - - { -@@ -44,4 +44,3 @@ use lib 't/lib/basic'; - ); - } - --done_testing; ---- t/conflicts.t -+++ t/conflicts.t -@@ -2,7 +2,7 @@ - use strict; - use warnings; - --use Test::More; -+use Test::More tests => 12; - use Test::Fatal; - use lib 't/lib/conflicts'; - -@@ -109,4 +109,3 @@ use lib 't/lib/conflicts'; - ; - } - --done_testing; ---- t/dist.t -+++ t/dist.t -@@ -1,7 +1,7 @@ - #!/usr/bin/env perl - use strict; - use warnings; --use Test::More; -+use Test::More tests => 12; - use Test::Fatal; - use lib 't/lib/dist'; - -@@ -73,4 +73,3 @@ use lib 't/lib/dist'; - is(Bar::Conflicts::Bad->dist, 'Bar', "correct dist"); - } - --done_testing; ---- t/merge.t -+++ t/merge.t -@@ -1,7 +1,7 @@ - #!/usr/bin/env perl - use strict; - use warnings; --use Test::More; -+use Test::More tests => 1; - use lib 't/lib/merge'; - - { -@@ -18,4 +18,3 @@ use lib 't/lib/merge'; - ); - } - --done_testing; ---- t/runtime.t -+++ t/runtime.t -@@ -1,7 +1,7 @@ - #!/usr/bin/env perl - use strict; - use warnings; --use Test::More; -+use Test::More tests => 7; - use lib 't/lib/runtime'; - - use Module::Runtime 'require_module'; -@@ -46,4 +46,3 @@ is(scalar(grep { ref($_) eq 'ARRAY' && @ - 1, - "only installed one \@INC hook"); - --done_testing; ---- t/warn.t -+++ t/warn.t -@@ -1,7 +1,7 @@ - #!/usr/bin/env perl - use strict; - use warnings; --use Test::More; -+use Test::More tests => 1; - use lib 't/lib/warn'; - - { -@@ -13,4 +13,3 @@ use lib 't/lib/warn'; - is($warning, '', "we don't see warnings from loaded modules"); - } - --done_testing; ---- xt/release/no-tabs.t -+++ xt/release/no-tabs.t -@@ -3,7 +3,7 @@ use warnings; - - # this test was generated with Dist::Zilla::Plugin::NoTabsTests 0.06 - --use Test::More 0.88; -+use Test::More tests => 1; - use Test::NoTabs; - - my @files = ( -@@ -11,4 +11,3 @@ my @files = ( - ); - - notabs_ok($_) foreach @files; --done_testing; diff --git a/perl-Dist-CheckConflicts.spec b/perl-Dist-CheckConflicts.spec index ed46fd0..96906a3 100644 --- a/perl-Dist-CheckConflicts.spec +++ b/perl-Dist-CheckConflicts.spec @@ -1,5 +1,3 @@ -# We need to patch the test suite if we have an old version of Test::More -%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.88) ? 1 : 0);' 2>/dev/null || echo 0) # Run extra test %if 0%{?fedora} %bcond_without perl_Dist_CheckConflicts_enables_extra_test @@ -9,15 +7,18 @@ Name: perl-Dist-CheckConflicts Version: 0.11 -Release: 17%{?dist} +Release: 18%{?dist} Summary: Declare version conflicts for your dist License: GPL+ or Artistic URL: https://metacpan.org/release/Dist-CheckConflicts -Source0: https://cpan.metacpan.org/authors/id/D/DO/DOY/Dist-CheckConflicts-%{version}.tar.gz -Patch0: Dist-CheckConflicts-0.11-old-Test::More.patch +Source0: https://cpan.metacpan.org/modules/by-module/Dist/Dist-CheckConflicts-%{version}.tar.gz BuildArch: noarch # Module Build +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: make BuildRequires: perl-generators +BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) >= 6.30 # Module BuildRequires: perl(base) @@ -27,12 +28,13 @@ BuildRequires: perl(Module::Runtime) >= 0.009 BuildRequires: perl(strict) BuildRequires: perl(warnings) # Test Suite +BuildRequires: perl(blib) BuildRequires: perl(File::Spec) BuildRequires: perl(IO::Handle) BuildRequires: perl(IPC::Open3) BuildRequires: perl(lib) BuildRequires: perl(Test::Fatal) -BuildRequires: perl(Test::More) >= 0.47 +BuildRequires: perl(Test::More) >= 0.88 # Extra Tests %if %{with perl_Dist_CheckConflicts_enables_extra_test} BuildRequires: perl(Pod::Coverage::TrustPod) @@ -65,20 +67,14 @@ this manually. %prep %setup -q -n Dist-CheckConflicts-%{version} -# Test suite needs patching if we have Test::More < 0.88 -%if %{old_test_more} -%patch0 -%endif - %build 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 @@ -87,11 +83,26 @@ make test TEST_FILES="$(echo $(find xt/ -name '*.t'))" %endif %files -%doc Changes LICENSE README +%if 0%{?_licensedir:1} +%license LICENSE +%else +%doc LICENSE +%endif +%doc Changes README %{perl_vendorlib}/Dist/ -%{_mandir}/man3/Dist::CheckConflicts.3pm* +%{_mandir}/man3/Dist::CheckConflicts.3* %changelog +* Tue Mar 10 2020 Paul Howarth - 0.11-18 +- Spec tidy-up + - Use author-independent source URL + - Drop support for building with Test::More < 0.88 + - Specify all build dependencies + - Drop redundant buildroot cleaning in %%install section + - Simplify find command using -delete + - Fix permissions verbosely + - Use %%license where possible + * Wed Jan 29 2020 Fedora Release Engineering - 0.11-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild