diff --git a/Data-Section-Simple-0.07-old-Test::More.patch b/Data-Section-Simple-0.07-old-Test::More.patch deleted file mode 100644 index 079fe1a..0000000 --- a/Data-Section-Simple-0.07-old-Test::More.patch +++ /dev/null @@ -1,65 +0,0 @@ ---- t/basic.t -+++ t/basic.t -@@ -1,6 +1,6 @@ - use strict; - use Data::Section::Simple qw(get_data_section); --use Test::More; -+use Test::More tests => 3; - - my $x = get_data_section(); - is_deeply [ sort keys %$x ], [ qw(bar.tt foo.html) ]; -@@ -19,8 +19,6 @@ bar - - TT - --done_testing; -- - __DATA__ - - @@ foo.html ---- t/data.t -+++ t/data.t -@@ -1,6 +1,6 @@ - use lib "t"; - use DataInCode; --use Test::More; -+use Test::More tests => 1; - use Data::Section::Simple; - - my $d = Data::Section::Simple->new('DataInCode'); -@@ -8,7 +8,3 @@ my $x = $d->get_data_section; - - is $x->{foo}, "bar\n\n"; - --done_testing; -- -- -- ---- t/no-datat.t -+++ t/no-datat.t -@@ -1,7 +1,5 @@ - use strict; - use Data::Section::Simple qw(get_data_section); --use Test::More; -+use Test::More tests => 1; - - is get_data_section('foo.html'), undef, 'Do not die.'; -- --done_testing; ---- t/pkg_oo.t -+++ t/pkg_oo.t -@@ -4,7 +4,7 @@ use Data::Section::Simple; - use lib "t"; - use Foo; - --use Test::More; -+use Test::More tests => 3; - - my $d = Data::Section::Simple->new('Foo'); - my $x = $d->get_data_section(); -@@ -24,5 +24,3 @@ bar - - TT - --done_testing; -- diff --git a/perl-Data-Section-Simple.spec b/perl-Data-Section-Simple.spec index 3ee0467..806fef9 100644 --- a/perl-Data-Section-Simple.spec +++ b/perl-Data-Section-Simple.spec @@ -1,18 +1,17 @@ -# 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) - Name: perl-Data-Section-Simple Version: 0.07 -Release: 16%{?dist} +Release: 17%{?dist} Summary: Read data from __DATA__ License: GPL+ or Artistic -URL: https://github.com/miyagawa/Data-Section-Simple -Source0: http://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Data-Section-Simple-%{version}.tar.gz -Patch1: Data-Section-Simple-0.07-old-Test::More.patch +URL: https://metacpan.org/release/Data-Section-Simple +Source0: https://cpan.metacpan.org/modules/by-module/Data/Data-Section-Simple-%{version}.tar.gz BuildArch: noarch # Build -BuildRequires: perl-interpreter +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: make BuildRequires: perl-generators +BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(warnings) # Module @@ -21,7 +20,7 @@ BuildRequires: perl(Exporter) BuildRequires: perl(strict) # Test Suite BuildRequires: perl(lib) -BuildRequires: perl(Test::More) +BuildRequires: perl(Test::More) >= 0.88 %if 0%{?fedora} || 0%{?rhel} > 6 BuildRequires: perl(Test::Pod) >= 1.41 %endif @@ -35,20 +34,14 @@ section of the file. %prep %setup -q -n Data-Section-Simple-%{version} -# Hack for old Test::More versions -%if %{old_test_more} -%patch1 -%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 %if 0%{?fedora} || 0%{?rhel} > 6 @@ -58,11 +51,26 @@ make test %endif %files -%doc Changes LICENSE README +%if 0%{?_licensedir:1} +%license LICENSE +%else +%doc LICENSE +%endif +%doc Changes README %{perl_vendorlib}/Data/ -%{_mandir}/man3/Data::Section::Simple.3pm* +%{_mandir}/man3/Data::Section::Simple.3* %changelog +* Wed Oct 16 2019 Paul Howarth - 0.07-17 +- Spec tidy-up + - Use author-independent URLs + - Specify all build dependencies + - Drop support for building with Test::More < 0.88 + - Drop redundant buildroot cleaning in %%install section + - Simplify find command using -delete + - Fix permissions verbosely + - Use %%license where possible + * Fri Jul 26 2019 Fedora Release Engineering - 0.07-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild