[perl-SUPER: 11/11] Spec clean-up
Paul Howarth
pghmcfc at fedoraproject.org
Tue Mar 6 11:56:58 UTC 2012
commit 2a0b790122ade04a085bccecf37bf38b49535729
Author: Paul Howarth <paul at city-fan.org>
Date: Tue Mar 6 11:39:02 2012 +0000
Spec clean-up
- Add provides filters that work with all supported distributions
- BR: perl(Carp) and perl(Exporter)
- Make %files list more explicit
- Drop explicit requires of perl(Exporter) since it's auto-detected by rpm
4.9 onwards, and is bundled with perl on all older distributions
- Don't need to remove empty directories from buildroot
- Don't use macros for commands
- %defattr redundant since rpm 4.4
- Use tabs
perl-SUPER.spec | 76 ++++++++++++++++++++++++++++++------------------------
1 files changed, 42 insertions(+), 34 deletions(-)
---
diff --git a/perl-SUPER.spec b/perl-SUPER.spec
index 8a0424b..077c8f3 100644
--- a/perl-SUPER.spec
+++ b/perl-SUPER.spec
@@ -1,49 +1,47 @@
-Name: perl-SUPER
-Version: 1.17
-Release: 6%{?dist}
-Summary: Sane superclass method dispatcher
-License: GPL+ or Artistic
-Group: Development/Libraries
-URL: http://search.cpan.org/dist/SUPER/
-Source0: http://search.cpan.org/CPAN/authors/id/C/CH/CHROMATIC/SUPER-%{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(Module::Build)
-BuildRequires: perl(Test::Simple) >= 0.61
-BuildRequires: perl(Sub::Identify) >= 0.03
-BuildRequires: perl(Scalar::Util) >= 1.20
-
-Requires: perl(Exporter)
-Requires: perl(Scalar::Util) >= 1.20
-Requires: perl(Sub::Identify) >= 0.03
-
-%{?perl_default_filter:
-%filter_from_provides /perl(UNIVERSAL)/d; /perl(DB)/d
-%perl_default_filter
-}
+Name: perl-SUPER
+Version: 1.17
+Release: 7%{?dist}
+Summary: Sane superclass method dispatcher
+License: GPL+ or Artistic
+Group: Development/Libraries
+URL: http://search.cpan.org/dist/SUPER/
+Source0: http://search.cpan.org/CPAN/authors/id/C/CH/CHROMATIC/SUPER-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
+BuildArch: noarch
+BuildRequires: perl(Carp)
+BuildRequires: perl(Exporter)
+BuildRequires: perl(Module::Build)
+BuildRequires: perl(Scalar::Util) >= 1.20
+BuildRequires: perl(Sub::Identify) >= 0.03
+BuildRequires: perl(Test::Simple) >= 0.61
+Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+Requires: perl(Scalar::Util) >= 1.20
+Requires: perl(Sub::Identify) >= 0.03
+
+# Filter out bogus provides (rpm 4.9 onwards)
+%global __provides_exclude ^perl\\((DB|UNIVERSAL)\\)
%description
When subclassing a class, you occasionally want to dispatch control to the
-superclass -- at least conditionally and temporarily. This module provides
+superclass - at least conditionally and temporarily. This module provides
an easier, cleaner way for class methods to access their ancestor's
implementation.
%prep
%setup -q -n SUPER-%{version}
+# Filter out bogus provides (prior to rpm 4.9)
+%global provfilt /bin/sh -c "%{__perl_provides} | grep -Evx 'perl[(](DB|UNIVERSAL)[)]'"
+%define __perl_provides %{provfilt}
+
%build
-%{__perl} Build.PL installdirs=vendor
+perl Build.PL installdirs=vendor
./Build
%install
rm -rf %{buildroot}
-
./Build install destdir=%{buildroot} create_packlist=0
-find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
-
-%{_fixperms} %{buildroot}/*
+%{_fixperms} %{buildroot}
%check
./Build test
@@ -52,12 +50,22 @@ find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
rm -rf %{buildroot}
%files
-%defattr(-,root,root,-)
%doc Changes README
-%{perl_vendorlib}/*
-%{_mandir}/man3/*
+%{perl_vendorlib}/SUPER.pm
+%{_mandir}/man3/SUPER.3pm*
%changelog
+* Tue Mar 6 2012 Paul Howarth <paul at city-fan.org> - 1.17-7
+- Add provides filters that work with all supported distributions
+- BR: perl(Carp) and perl(Exporter)
+- Make %%files list more explicit
+- Drop explicit requires of perl(Exporter) since it's auto-detected by rpm
+ 4.9 onwards, and is bundled with perl on all older distributions
+- Don't need to remove empty directories from buildroot
+- Don't use macros for commands
+- %%defattr redundant since rpm 4.4
+- Use tabs
+
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.17-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
More information about the perl-devel
mailing list