Spec tidy-up
- Use SPDX-format license tag - Use author-independent source URL - Drop support for building with Test::More < 0.88 - Drop redundant buildroot cleaning in %install section - Use %license unconditionally
This commit is contained in:
parent
8c6e4666be
commit
2869cd6697
@ -1,137 +0,0 @@
|
||||
--- Makefile.PL
|
||||
+++ Makefile.PL
|
||||
@@ -17,7 +17,7 @@ my %WriteMakefileArgs = (
|
||||
"NAME" => "Sub::Exporter::Progressive",
|
||||
"PREREQ_PM" => {},
|
||||
"TEST_REQUIRES" => {
|
||||
- "Test::More" => "0.88"
|
||||
+ "Test::More" => "0.47"
|
||||
},
|
||||
"VERSION" => "0.001013",
|
||||
"test" => {
|
||||
@@ -27,7 +27,7 @@ my %WriteMakefileArgs = (
|
||||
|
||||
|
||||
my %FallbackPrereqs = (
|
||||
- "Test::More" => "0.88"
|
||||
+ "Test::More" => "0.47"
|
||||
);
|
||||
|
||||
|
||||
--- t/all.t
|
||||
+++ t/all.t
|
||||
@@ -2,7 +2,7 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
-use Test::More;
|
||||
+use Test::More tests => 6;
|
||||
use lib 't/lib';
|
||||
use A::JunkAll;
|
||||
|
||||
@@ -17,5 +17,3 @@ use A::JunkAll ':all';
|
||||
ok(main->can('junk1'), 'sub exported');
|
||||
ok(main->can('junk2'), 'sub exported');
|
||||
ok(! $INC{'Sub/Exporter.pm'}, 'Sub::Exporter not loaded');
|
||||
-
|
||||
-done_testing;
|
||||
--- t/basic.t
|
||||
+++ t/basic.t
|
||||
@@ -2,11 +2,9 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
-use Test::More;
|
||||
+use Test::More tests => 2;
|
||||
use lib 't/lib';
|
||||
use A::Junk 'junk1';
|
||||
|
||||
ok(main->can('junk1'), 'requested sub exported');
|
||||
ok(! $INC{'Sub/Exporter.pm'}, 'Sub::Exporter not loaded');
|
||||
-
|
||||
-done_testing;
|
||||
--- t/default.t
|
||||
+++ t/default.t
|
||||
@@ -2,11 +2,9 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
-use Test::More;
|
||||
+use Test::More tests => 2;
|
||||
use lib 't/lib';
|
||||
use A::Junk;
|
||||
|
||||
ok(main->can('junk2'), 'sub exported');
|
||||
ok(! $INC{'Sub/Exporter.pm'}, 'Sub::Exporter not loaded');
|
||||
-
|
||||
-done_testing;
|
||||
--- t/release-changes_has_content.t
|
||||
+++ t/release-changes_has_content.t
|
||||
@@ -10,7 +10,6 @@ BEGIN {
|
||||
|
||||
use Test::More tests => 2;
|
||||
|
||||
-note 'Checking Changes';
|
||||
my $changes_file = 'Changes';
|
||||
my $newver = '0.001013';
|
||||
my $trial_token = '-TRIAL';
|
||||
@@ -22,8 +21,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
|
||||
--- t/sex.t
|
||||
+++ t/sex.t
|
||||
@@ -2,7 +2,7 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
-use Test::More;
|
||||
+use Test::More tests => 2;
|
||||
BEGIN {
|
||||
plan skip_all => 'Sub::Exporter not installed'
|
||||
unless eval { require Sub::Exporter };
|
||||
@@ -13,5 +13,3 @@ use A::Junk 'junk1' => { -as => 'junk' }
|
||||
|
||||
ok(main->can('junk'), 'sub renamed with Sub::Exporter');
|
||||
ok($INC{'Sub/Exporter.pm'}, 'Sub::Exporter loaded');
|
||||
-
|
||||
-done_testing;
|
||||
--- t/tags.t
|
||||
+++ t/tags.t
|
||||
@@ -1,7 +1,7 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
-use Test::More;
|
||||
+use Test::More tests => 44;
|
||||
use Carp;
|
||||
use lib 't/lib';
|
||||
use A::Junk ':other';
|
||||
@@ -64,5 +64,3 @@ SKIP: {
|
||||
check_tag('bar -default', [qw/foo bar/], [qw/baz/]);
|
||||
}
|
||||
|
||||
-done_testing;
|
||||
-
|
||||
--- t/version-check.t
|
||||
+++ t/version-check.t
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
-use Test::More;
|
||||
+use Test::More tests => 5;
|
||||
|
||||
BEGIN {
|
||||
package AAA;
|
||||
@@ -38,5 +38,3 @@ ok(eval('use AAA 1; 1'), 'perl built-in
|
||||
);
|
||||
}
|
||||
|
||||
-done_testing;
|
||||
-
|
||||
@ -1,21 +1,17 @@
|
||||
# We need to patch the test suite if we have old versions 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-Sub-Exporter-Progressive
|
||||
Version: 0.001013
|
||||
Release: 20%{?dist}
|
||||
Release: 21%{?dist}
|
||||
Summary: Only use Sub::Exporter if you need it
|
||||
License: GPL+ or Artistic
|
||||
License: GPL-1.0-or-later OR Artistic-1.0-Perl
|
||||
URL: https://metacpan.org/release/Sub-Exporter-Progressive
|
||||
Source0: https://cpan.metacpan.org/authors/id/F/FR/FREW/Sub-Exporter-Progressive-%{version}.tar.gz
|
||||
Patch1: Sub-Exporter-Progressive-0.001013-old-Test::More.patch
|
||||
Source0: https://cpan.metacpan.org/modules/by-module/Sub/Sub-Exporter-Progressive-%{version}.tar.gz
|
||||
BuildArch: noarch
|
||||
# =============== Module Build ======================
|
||||
BuildRequires: coreutils
|
||||
BuildRequires: findutils
|
||||
BuildRequires: make
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: perl-generators
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: perl(ExtUtils::MakeMaker)
|
||||
# =============== Module Runtime ====================
|
||||
BuildRequires: perl(Carp)
|
||||
@ -26,8 +22,8 @@ BuildRequires: perl(warnings)
|
||||
# =============== Test Suite ========================
|
||||
BuildRequires: perl(constant)
|
||||
BuildRequires: perl(lib)
|
||||
BuildRequires: perl(Test::More)
|
||||
# =============== Module Runtime ====================
|
||||
BuildRequires: perl(Test::More) >= 0.88
|
||||
# =============== Module Dependencies ===============
|
||||
Requires: perl(Carp)
|
||||
Requires: perl(Exporter) >= 5.58
|
||||
Requires: perl(Sub::Exporter)
|
||||
@ -48,17 +44,11 @@ might as well use it directly.
|
||||
%prep
|
||||
%setup -q -n Sub-Exporter-Progressive-%{version}
|
||||
|
||||
# We need to patch the test suite if we have old versions of Test::More
|
||||
%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 -delete
|
||||
%{_fixperms} -c %{buildroot}
|
||||
@ -67,16 +57,20 @@ find %{buildroot} -type f -name .packlist -delete
|
||||
make test
|
||||
|
||||
%files
|
||||
%if 0%{?_licensedir:1}
|
||||
%license LICENSE
|
||||
%else
|
||||
%doc LICENSE
|
||||
%endif
|
||||
%doc Changes README
|
||||
%{perl_vendorlib}/Sub/
|
||||
%{_mandir}/man3/Sub::Exporter::Progressive.3*
|
||||
|
||||
%changelog
|
||||
* Fri May 12 2023 Paul Howarth <paul@city-fan.org> - 0.001013-21
|
||||
- Spec tidy-up
|
||||
- Use SPDX-format license tag
|
||||
- Use author-independent source URL
|
||||
- Drop support for building with Test::More < 0.88
|
||||
- Drop redundant buildroot cleaning in %%install section
|
||||
- Use %%license unconditionally
|
||||
|
||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.001013-20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user