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
This commit is contained in:
Paul Howarth 2018-11-19 13:17:00 +00:00
parent 985211e4c6
commit 78c446fbf4
3 changed files with 29 additions and 34 deletions

View File

@ -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;

View File

@ -0,0 +1,4 @@
from Config import *
# False positive
addFilter("unexpanded-macro %description -l C %Config")

View File

@ -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 <paul@city-fan.org> - 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 <releng@fedoraproject.org> - 0.008-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild