From 78c446fbf43604ec25b25d26195ae4e4267d3553 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Mon, 19 Nov 2018 13:17:00 +0000 Subject: [PATCH] Package clean-up - Specify all build dependencies - Simplify find command using -delete - Use %license where possible - 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 --- ExtUtils-Config-0.008-old-Test::More.patch | 16 -------- perl-ExtUtils-Config.rpmlintrc | 4 ++ perl-ExtUtils-Config.spec | 43 +++++++++++++--------- 3 files changed, 29 insertions(+), 34 deletions(-) delete mode 100644 ExtUtils-Config-0.008-old-Test::More.patch create mode 100644 perl-ExtUtils-Config.rpmlintrc diff --git a/ExtUtils-Config-0.008-old-Test::More.patch b/ExtUtils-Config-0.008-old-Test::More.patch deleted file mode 100644 index ae11df3..0000000 --- a/ExtUtils-Config-0.008-old-Test::More.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- t/basics.t -+++ t/basics.t -@@ -2,7 +2,7 @@ - - use strict; - use warnings FATAL => 'all'; --use Test::More 0.88; -+use Test::More tests=> 8; - - use Config; - -@@ -29,4 +29,3 @@ my $set = $config->values_set; - $set->{more} = 'more3'; - is($config->get('more'), $Config{more}, "more is still '$Config{more}'"); - --done_testing; diff --git a/perl-ExtUtils-Config.rpmlintrc b/perl-ExtUtils-Config.rpmlintrc new file mode 100644 index 0000000..2acfad4 --- /dev/null +++ b/perl-ExtUtils-Config.rpmlintrc @@ -0,0 +1,4 @@ +from Config import * + +# False positive +addFilter("unexpanded-macro %description -l C %Config") diff --git a/perl-ExtUtils-Config.spec b/perl-ExtUtils-Config.spec index 8d1c6f7..592169a 100644 --- a/perl-ExtUtils-Config.spec +++ b/perl-ExtUtils-Config.spec @@ -1,19 +1,17 @@ -# 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) - Name: perl-ExtUtils-Config Version: 0.008 -Release: 12%{?dist} +Release: 13%{?dist} Summary: A wrapper for perl's configuration -Group: Development/Libraries License: GPL+ or Artistic URL: https://metacpan.org/release/ExtUtils-Config Source0: http://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-Config-%{version}.tar.gz -Patch1: ExtUtils-Config-0.008-old-Test::More.patch BuildArch: noarch # Build -BuildRequires: perl-interpreter +BuildRequires: coreutils +BuildRequires: findutils +BuildRequires: make BuildRequires: perl-generators +BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) >= 6.30 # Module BuildRequires: perl(Config) @@ -21,7 +19,7 @@ BuildRequires: perl(Data::Dumper) # Test Suite BuildRequires: perl(File::Find) BuildRequires: perl(File::Temp) -BuildRequires: perl(Test::More) +BuildRequires: perl(Test::More) >= 0.88 # Runtime Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) @@ -31,30 +29,39 @@ ExtUtils::Config is an abstraction around the %%Config hash. %prep %setup -q -n ExtUtils-Config-%{version} -# Test suite needs patching if we have Test::More < 0.88 -%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 make test %files -%doc Changes LICENSE README +%if 0%{?_licensedir:1} +%license LICENSE +%else +%doc LICENSE +%endif +%doc Changes README %{perl_vendorlib}/ExtUtils/ -%{_mandir}/man3/ExtUtils::Config.3pm* +%{_mandir}/man3/ExtUtils::Config.3* %changelog +* Mon Nov 19 2018 Paul Howarth - 0.008-13 +- Specify all build dependencies +- Simplify find command using -delete +- Use %%license where possible +- 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 + * Fri Jul 13 2018 Fedora Release Engineering - 0.008-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild