[perl-Sub-Exporter] Spec clean up

Paul Howarth pghmcfc at fedoraproject.org
Sat Mar 3 19:37:02 UTC 2012


commit 77b0c446237d187ffeb2fbdfc8aa39d7b6284249
Author: Paul Howarth <paul at city-fan.org>
Date:   Sat Mar 3 19:35:55 2012 +0000

    Spec clean up
    
    - Explicitly require perl(Package::Generator)
    - Make %files list more explicit
    - Mark POD files as %doc
    - Use DESTDIR rather than PERL_INSTALL_ROOT
    - Don't need to remove empty directories from buildroot
    - Don't use macros for commands
    - Use tabs

 .gitignore             |    2 +-
 perl-Sub-Exporter.spec |  129 +++++++++++++++++++++++++++---------------------
 2 files changed, 74 insertions(+), 57 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e3e0101..d19119d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-Sub-Exporter-0.982.tar.gz
+/Sub-Exporter-[0-9.]*.tar.gz
diff --git a/perl-Sub-Exporter.spec b/perl-Sub-Exporter.spec
index 0a22604..a5534ca 100644
--- a/perl-Sub-Exporter.spec
+++ b/perl-Sub-Exporter.spec
@@ -1,23 +1,26 @@
-Name:           perl-Sub-Exporter
-Version:        0.982
-Release:        9%{?dist}
-Summary:        Sophisticated exporter for custom-built routines
-License:        GPL+ or Artistic
-Group:          Development/Libraries
-URL:            http://search.cpan.org/dist/Sub-Exporter/
-Source0:        http://www.cpan.org/authors/id/R/RJ/RJBS/Sub-Exporter-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildArch:      noarch
-Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
-
-BuildRequires:  perl(ExtUtils::MakeMaker)
-BuildRequires:  perl(Test::More)
-BuildRequires:  perl(Data::OptList) >= 0.1
-BuildRequires:  perl(Params::Util) >= 0.14
-BuildRequires:  perl(Sub::Install) >= 0.92
-# testing...
-BuildRequires:  perl(Package::Generator)
-
+Name:		perl-Sub-Exporter
+Version:	0.982
+Release:	10%{?dist}
+Summary:	Sophisticated exporter for custom-built routines
+License:	GPL+ or Artistic
+Group:		Development/Libraries
+URL:		http://search.cpan.org/dist/Sub-Exporter/
+Source0:	http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Sub-Exporter-%{version}.tar.gz
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
+BuildArch:	noarch
+# Build
+BuildRequires:	perl(ExtUtils::MakeMaker)
+# Module
+BuildRequires:	perl(Carp)
+BuildRequires:	perl(Data::OptList) >= 0.1
+BuildRequires:	perl(Package::Generator)
+BuildRequires:	perl(Params::Util) >= 0.14
+BuildRequires:	perl(Sub::Install) >= 0.92
+# Test suite
+BuildRequires:	perl(Test::More)
+# Runtime
+Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+Requires:	perl(Package::Generator)
 
 %description
 Sub::Exporter provides a sophisticated alternative to Exporter.pm. It allows
@@ -29,21 +32,18 @@ Sub::Exporter::Tutorial first!
 %prep
 %setup -q -n Sub-Exporter-%{version}
 
-find t/ -type f -exec perl -pi -e 's|^#!perl|#!/usr/bin/perl|' {} +
+# Fix shellbangs
+find t/ -type f -exec sed -i -e 's|^#!perl|#!/usr/bin/perl|' {} \;
 
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
+perl Makefile.PL INSTALLDIRS=vendor
 make %{?_smp_mflags}
 
 %install
 rm -rf %{buildroot}
-
-make pure_install PERL_INSTALL_ROOT=%{buildroot}
-
-find %{buildroot} -type f -name .packlist -exec rm -f {} + 
-find %{buildroot} -depth -type d -exec rmdir --ignore-fail-on-non-empty {} + 
-
-%{_fixperms} %{buildroot}/*
+make pure_install DESTDIR=%{buildroot}
+find %{buildroot} -type f -name .packlist -exec rm -f {} \;
+%{_fixperms} %{buildroot}
 
 %check
 make test
@@ -54,10 +54,27 @@ rm -rf %{buildroot}
 %files
 %defattr(-,root,root,-)
 %doc Changes README t/
-%{perl_vendorlib}/*
-%{_mandir}/man3/*
+%dir %{perl_vendorlib}/Sub/
+%dir %{perl_vendorlib}/Sub/Exporter/
+%{perl_vendorlib}/Sub/Exporter.pm
+%{perl_vendorlib}/Sub/Exporter/Util.pm
+%doc %{perl_vendorlib}/Sub/Exporter/Cookbook.pod
+%doc %{perl_vendorlib}/Sub/Exporter/Tutorial.pod
+%{_mandir}/man3/Sub::Exporter.3pm*
+%{_mandir}/man3/Sub::Exporter::Cookbook.3pm*
+%{_mandir}/man3/Sub::Exporter::Tutorial.3pm*
+%{_mandir}/man3/Sub::Exporter::Util.3pm*
 
 %changelog
+* Sat Mar  3 2012 Paul Howarth <paul at city-fan.org> - 0.982-10
+- Explicitly require perl(Package::Generator)
+- Make %%files list more explicit
+- Mark POD files as %%doc
+- Use DESTDIR rather than PERL_INSTALL_ROOT
+- Don't need to remove empty directories from buildroot
+- Don't use macros for commands
+- Use tabs
+
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.982-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 
@@ -68,13 +85,13 @@ rm -rf %{buildroot}
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 
 * Wed Dec 22 2010 Marcela Maslanova <mmaslano at redhat.com> - 0.982-6
-- 661697 rebuild for fixing problems with vendorach/lib
+- Rebuild to fix problems with vendorarch/lib (#661697)
 
 * Thu May 06 2010 Marcela Maslanova <mmaslano at redhat.com> - 0.982-5
 - Mass rebuild with perl-5.12.0
 
 * Mon Dec  7 2009 Stepan Kasal <skasal at redhat.com> - 0.982-4
-- rebuild against perl 5.10.1
+- Rebuild against perl 5.10.1
 
 * Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.982-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
@@ -82,38 +99,38 @@ rm -rf %{buildroot}
 * Thu Feb 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.982-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
 
-* Wed Feb 11 2009 Chris Weyl <cweyl at alumni.drew.edu> 0.982-1
-- update to 0.982
+* Wed Feb 11 2009 Chris Weyl <cweyl at alumni.drew.edu> - 0.982-1
+- Update to 0.982
 
-* Sun Oct 26 2008 Chris Weyl <cweyl at alumni.drew.edu> 0.981-1
-- update to 0.981
+* Sun Oct 26 2008 Chris Weyl <cweyl at alumni.drew.edu> - 0.981-1
+- Update to 0.981
 
-* Thu Oct 23 2008 Chris Weyl <cweyl at alumni.drew.edu> 0.980-1
-- update to 0.980
+* Thu Oct 23 2008 Chris Weyl <cweyl at alumni.drew.edu> - 0.980-1
+- Update to 0.980
 
-* Mon Jun 30 2008 Chris Weyl <cweyl at alumni.drew.edu> 0.979-1
-- update to 0.979
-- drop BR's on:  perl(Test::Pod::Coverage), perl(Test::Pod)
+* Mon Jun 30 2008 Chris Weyl <cweyl at alumni.drew.edu> - 0.979-1
+- Update to 0.979
+- Drop BR's on: perl(Test::Pod::Coverage), perl(Test::Pod)
 
 * Wed Feb 27 2008 Tom "spot" Callaway <tcallawa at redhat.com> - 0.978-2
 - Rebuild for perl 5.10 (again)
 
-* Thu Jan 24 2008 Tom "spot" Callaway <tcallawa at redhat.com> 0.978-1
-- update to 0.978
-- fix license tag
-- rebuild for new perl
+* Thu Jan 24 2008 Tom "spot" Callaway <tcallawa at redhat.com> - 0.978-1
+- Update to 0.978
+- Fix license tag
+- Rebuild for new perl
 
-* Thu Aug 09 2007 Chris Weyl <cweyl at alumni.drew.edu> 0.975-1
-- update to 0.975
+* Thu Aug 09 2007 Chris Weyl <cweyl at alumni.drew.edu> - 0.975-1
+- Update to 0.975
 
-* Fri Jun 01 2007 Chris Weyl <cweyl at alumni.drew.edu> 0.974-1
-- update to 0.974
+* Fri Jun 01 2007 Chris Weyl <cweyl at alumni.drew.edu> - 0.974-1
+- Update to 0.974
 
-* Sat Dec 09 2006 Chris Weyl <cweyl at alumni.drew.edu> 0.972-1
-- update to 0.972
+* Sat Dec 09 2006 Chris Weyl <cweyl at alumni.drew.edu> - 0.972-1
+- Update to 0.972
 
-* Thu Sep 07 2006 Chris Weyl <cweyl at alumni.drew.edu> 0.970-2
-- bump
+* Thu Sep 07 2006 Chris Weyl <cweyl at alumni.drew.edu> - 0.970-2
+- Bump
 
-* Sat Sep 02 2006 Chris Weyl <cweyl at alumni.drew.edu> 0.970-1
-- Specfile autogenerated by cpanspec 1.69.1.
+* Sat Sep 02 2006 Chris Weyl <cweyl at alumni.drew.edu> - 0.970-1
+- Specfile autogenerated by cpanspec 1.69.1



More information about the perl-devel mailing list