From 93206d7448ea3b69401d4b01fbc92b0e467f0f83 Mon Sep 17 00:00:00 2001
From: Paul Howarth <paul(a)city-fan.org>
Date: Sun, 3 Jan 2016 15:10:39 +0000
Subject: Spec tidy-up
- Get rid of %define
- Drop %defattr, redundant since rpm 4.4
- Use %license where possible
- Classify buildreqs by usage
- Don't need to remove empty directories from the buildroot
- Use DESTDIR rather than PERL_INSTALL_ROOT
---
perl-Module-Extract-VERSION.spec | 51 +++++++++++++++++++++++++++++++---------
1 file changed, 40 insertions(+), 11 deletions(-)
diff --git a/perl-Module-Extract-VERSION.spec b/perl-Module-Extract-VERSION.spec
index 8e26453..22f45ab 100644
--- a/perl-Module-Extract-VERSION.spec
+++ b/perl-Module-Extract-VERSION.spec
@@ -1,6 +1,9 @@
+# Provides/Requires filtering is different from rpm 4.9 onwards
+%global rpm49 %(rpm --version | perl -p -e 's/^.*
(\\d+)\\.(\\d+).*/sprintf("%d.%03d",$1,$2) ge 4.009 ? 1 : 0/e')
+
Name: perl-Module-Extract-VERSION
Version: 1.01
-Release: 13%{?dist}
+Release: 14%{?dist}
Summary: Extract a module version without running code
License: GPL+ or Artistic
Group: Development/Libraries
@@ -8,14 +11,27 @@ URL:
http://search.cpan.org/dist/Module-Extract-VERSION/
Source0:
http://search.cpan.org/CPAN/authors/id/B/BD/BDFOY/Module-Extract-VERSION-...
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildArch: noarch
-BuildRequires: perl(Carp)
+# Module Build
+BuildRequires: coreutils
+BuildRequires: findutils
+BuildRequires: make
+BuildRequires: perl
BuildRequires: perl(ExtUtils::MakeMaker)
+# Module Runtime
+BuildRequires: perl(Carp)
+BuildRequires: perl(strict)
+BuildRequires: perl(subs)
+BuildRequires: perl(vars)
+BuildRequires: perl(warnings)
+# Test Suite
+BuildRequires: perl(File::Spec)
BuildRequires: perl(Test::More)
+# Optional Tests
+BuildRequires: perl(Test::Manifest) >= 1.21
BuildRequires: perl(Test::Pod) >= 1.00
BuildRequires: perl(Test::Pod::Coverage) >= 1.00
-%if "%{?rhel}" != "4"
-BuildRequires: perl(Test::Prereq)
-%endif
+# Test::Prereq not used in presence of Test::Manifest
+# Runtime
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
# Filter bogus provide for perl(ExtUtils::MakeMaker::_version) (rpm 4.9 onwards)
@@ -29,8 +45,10 @@ module. It assumes that there is only one $VERSION in the file.
%setup -q -n Module-Extract-VERSION-%{version}
# Filter bogus provide for perl(ExtUtils::MakeMaker::_version) (prior to rpm 4.9)
+%if ! %{rpm49}
%global provfilt /bin/sh -c "%{__perl_provides} | grep -Fvx
'perl(ExtUtils::MakeMaker::_version)'"
-%define __perl_provides %{provfilt}
+%global __perl_provides %{provfilt}
+%endif
%build
perl Makefile.PL INSTALLDIRS=vendor
@@ -38,9 +56,8 @@ make %{?_smp_mflags}
%install
rm -rf %{buildroot}
-make pure_install PERL_INSTALL_ROOT=%{buildroot}
+make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
-find %{buildroot} -depth -type d -exec rmdir {} \; 2>/dev/null
%{_fixperms} %{buildroot}
%check
@@ -50,12 +67,24 @@ make test
rm -rf %{buildroot}
%files
-%defattr(-,root,root,-)
-%doc Changes LICENSE README
+%if 0%{?_licensedir:1}
+%license LICENSE
+%else
+%doc LICENSE
+%endif
+%doc Changes README
%{perl_vendorlib}/Module/
-%{_mandir}/man3/Module::Extract::VERSION.3pm*
+%{_mandir}/man3/Module::Extract::VERSION.3*
%changelog
+* Sun Jan 3 2016 Paul Howarth <paul(a)city-fan.org> - 1.01-14
+- Get rid of %%define
+- Drop %%defattr, redundant since rpm 4.4
+- Use %%license where possible
+- Classify buildreqs by usage
+- Don't need to remove empty directories from the buildroot
+- Use DESTDIR rather than PERL_INSTALL_ROOT
+
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
1.01-13
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
--
cgit v0.11.2
http://pkgs.fedoraproject.org/cgit/perl-Module-Extract-VERSION.git/commit...