From 57da03e599dd793d59dcbb68cb825c367e8c6b7d Mon Sep 17 00:00:00 2001
From: Paul Howarth <p...@city-fan.org>
Date: Wed, 27 Jan 2016 12:03:35 +0000
Subject: Spec clean-up

- Patch code to hide private module and avoid need for provides filter
- Classify buildreqs by usage
- Drop %defattr, redundant since rpm 4.4
- No need to remove empty directories from the buildroot
- Drop Group and BuildRoot tags, redundant since rpm 4.6
- Drop buildroot cleaning, redundant since rpm 4.8
---
 File-Comments-0.08-provides.patch | 12 +++++++
 perl-File-Comments.spec           | 71 ++++++++++++++++++++-------------------
 2 files changed, 49 insertions(+), 34 deletions(-)
 create mode 100644 File-Comments-0.08-provides.patch

diff --git a/File-Comments-0.08-provides.patch 
b/File-Comments-0.08-provides.patch
new file mode 100644
index 0000000..4156a63
--- /dev/null
+++ b/File-Comments-0.08-provides.patch
@@ -0,0 +1,12 @@
+--- lib/File/Comments/Plugin/Perl.pm
++++ lib/File/Comments/Plugin/Perl.pm
+@@ -146,7 +146,8 @@ sub comments_parse_simple {
+ }
+ 
+ ###########################################
+-package PodExtractor;
++package # Hide from rpm
++    PodExtractor;
+ use Log::Log4perl qw(:easy);
+ our @ISA = qw(Pod::Parser);
+ ###########################################
diff --git a/perl-File-Comments.spec b/perl-File-Comments.spec
index b5b9dd6..3b1ed1b 100644
--- a/perl-File-Comments.spec
+++ b/perl-File-Comments.spec
@@ -1,31 +1,36 @@
-# Need to tweak provides filter differently if we have rpm 4.9 onwards
-%global rpm49 %(rpm --version | perl -p -e 's/^.* 
(\\d+)\\.(\\d+)\\.(\\d+).*/sprintf("%d.%03d%03d",$1,$2,$3) ge 4.009 ? 1 : 0/e')
-
 Summary:       Recognizes file formats and extracts format-specific comments
 Name:          perl-File-Comments
 Version:       0.08
-Release:       14%{?dist}
+Release:       15%{?dist}
 License:       GPL+ or Artistic
-Group:         Development/Libraries
 Url:           http://search.cpan.org/dist/File-Comments/
 Source0:       
http://search.cpan.org/CPAN/authors/id/M/MS/MSCHILLI/File-Comments-%{version}.tar.gz
-BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
+Patch0:                File-Comments-0.08-provides.patch
 BuildArch:     noarch
-BuildRequires: perl(Archive::Tar) >= 1.22
+# Module Build
+BuildRequires: coreutils
+BuildRequires: findutils
+BuildRequires: make
+BuildRequires: perl
 BuildRequires: perl(ExtUtils::MakeMaker)
+# Module Runtime
+BuildRequires: perl(File::Basename)
 BuildRequires: perl(HTML::TokeParser) >= 2.28
 BuildRequires: perl(HTML::TreeBuilder)
 BuildRequires: perl(Log::Log4perl) >= 0.50
 BuildRequires: perl(Module::Pluggable) >= 2.4
 BuildRequires: perl(Pod::Parser) >= 1.14
 BuildRequires: perl(PPI) >= 1.115
+BuildRequires: perl(strict)
 BuildRequires: perl(Sysadm::Install) >= 0.11
-# For test suite
+BuildRequires: perl(warnings)
+# Examples
+BuildRequires: perl(Getopt::Std)
+# Test Suite
 BuildRequires: perl(Test::More)
-# Runtime requirements not automatically picked up
+# Dependencies
 Requires:      perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
 Requires:      perl(HTML::TreeBuilder)
-Requires:      perl(Module::Pluggable) >= 2.4
 Requires:      perl(Pod::Parser) >= 1.14
 Requires:      perl(PPI) >= 1.115
 
@@ -46,47 +51,45 @@ JavaScript, Python and PHP.
 # are not satisfied by packages that are already required)
 
 # Remove provide for local package not in regular search path
-%if %{rpm49}
-%global __provides_exclude ^perl\\(PodExtractor\\)
-%else
-%global provfilt /bin/sh -c "%{__perl_provides} | grep -Fvx 
'perl(PodExtractor)'"
-%define __perl_provides %{provfilt}
-%endif
+%patch0
 
 %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 {} ';'
-find %{buildroot} -depth -type d -exec rmdir {} ';' 2>/dev/null
 %{_fixperms} %{buildroot}
 
 %check
 make test TEST_VERBOSE=1
 
-%clean
-rm -rf %{buildroot}
-
 %files
-%defattr(-,root,root,-)
-%doc Changes README eg
+%doc Changes README eg/
 %{perl_vendorlib}/File/
-%{_mandir}/man3/File::Comments.3pm*
-%{_mandir}/man3/File::Comments::Plugin.3pm*
-%{_mandir}/man3/File::Comments::Plugin::C.3pm*
-%{_mandir}/man3/File::Comments::Plugin::HTML.3pm*
-%{_mandir}/man3/File::Comments::Plugin::Java.3pm*
-%{_mandir}/man3/File::Comments::Plugin::JavaScript.3pm*
-%{_mandir}/man3/File::Comments::Plugin::Makefile.3pm*
-%{_mandir}/man3/File::Comments::Plugin::PHP.3pm*
-%{_mandir}/man3/File::Comments::Plugin::Perl.3pm*
-%{_mandir}/man3/File::Comments::Plugin::Python.3pm*
-%{_mandir}/man3/File::Comments::Plugin::Shell.3pm*
+%{_mandir}/man3/File::Comments.3*
+%{_mandir}/man3/File::Comments::Plugin.3*
+%{_mandir}/man3/File::Comments::Plugin::C.3*
+%{_mandir}/man3/File::Comments::Plugin::HTML.3*
+%{_mandir}/man3/File::Comments::Plugin::Java.3*
+%{_mandir}/man3/File::Comments::Plugin::JavaScript.3*
+%{_mandir}/man3/File::Comments::Plugin::Makefile.3*
+%{_mandir}/man3/File::Comments::Plugin::PHP.3*
+%{_mandir}/man3/File::Comments::Plugin::Perl.3*
+%{_mandir}/man3/File::Comments::Plugin::Python.3*
+%{_mandir}/man3/File::Comments::Plugin::Shell.3*
 
 %changelog
+* Wed Jan 27 2016 Paul Howarth <p...@city-fan.org> - 0.08-15
+- Spec clean-up
+  - Patch code to hide private module and avoid need for provides filter
+  - Classify buildreqs by usage
+  - Drop %%defattr, redundant since rpm 4.4
+  - No need to remove empty directories from the buildroot
+  - Drop Group and BuildRoot tags, redundant since rpm 4.6
+  - Drop buildroot cleaning, redundant since rpm 4.8
+
 * Thu Jun 18 2015 Fedora Release Engineering <rel-...@lists.fedoraproject.org> 
- 0.08-14
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
 
-- 
cgit v0.11.2


        
http://pkgs.fedoraproject.org/cgit/perl-File-Comments.git/commit/?h=master&id=57da03e599dd793d59dcbb68cb825c367e8c6b7d
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Reply via email to