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
This commit is contained in:
Paul Howarth 2012-03-06 11:39:02 +00:00
parent 0995cf1650
commit 2a0b790122

View File

@ -1,49 +1,47 @@
Name: perl-SUPER Name: perl-SUPER
Version: 1.17 Version: 1.17
Release: 6%{?dist} Release: 7%{?dist}
Summary: Sane superclass method dispatcher Summary: Sane superclass method dispatcher
License: GPL+ or Artistic License: GPL+ or Artistic
Group: Development/Libraries Group: Development/Libraries
URL: http://search.cpan.org/dist/SUPER/ URL: http://search.cpan.org/dist/SUPER/
Source0: http://search.cpan.org/CPAN/authors/id/C/CH/CHROMATIC/SUPER-%{version}.tar.gz Source0: http://search.cpan.org/CPAN/authors/id/C/CH/CHROMATIC/SUPER-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildArch: noarch BuildArch: noarch
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) BuildRequires: perl(Carp)
BuildRequires: perl(Exporter)
BuildRequires: perl(Module::Build) BuildRequires: perl(Module::Build)
BuildRequires: perl(Test::Simple) >= 0.61
BuildRequires: perl(Sub::Identify) >= 0.03
BuildRequires: perl(Scalar::Util) >= 1.20 BuildRequires: perl(Scalar::Util) >= 1.20
BuildRequires: perl(Sub::Identify) >= 0.03
Requires: perl(Exporter) BuildRequires: perl(Test::Simple) >= 0.61
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires: perl(Scalar::Util) >= 1.20 Requires: perl(Scalar::Util) >= 1.20
Requires: perl(Sub::Identify) >= 0.03 Requires: perl(Sub::Identify) >= 0.03
%{?perl_default_filter: # Filter out bogus provides (rpm 4.9 onwards)
%filter_from_provides /perl(UNIVERSAL)/d; /perl(DB)/d %global __provides_exclude ^perl\\((DB|UNIVERSAL)\\)
%perl_default_filter
}
%description %description
When subclassing a class, you occasionally want to dispatch control to the 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 an easier, cleaner way for class methods to access their ancestor's
implementation. implementation.
%prep %prep
%setup -q -n SUPER-%{version} %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 %build
%{__perl} Build.PL installdirs=vendor perl Build.PL installdirs=vendor
./Build ./Build
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
./Build install destdir=%{buildroot} create_packlist=0 ./Build install destdir=%{buildroot} create_packlist=0
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \; %{_fixperms} %{buildroot}
%{_fixperms} %{buildroot}/*
%check %check
./Build test ./Build test
@ -52,12 +50,22 @@ find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
rm -rf %{buildroot} rm -rf %{buildroot}
%files %files
%defattr(-,root,root,-)
%doc Changes README %doc Changes README
%{perl_vendorlib}/* %{perl_vendorlib}/SUPER.pm
%{_mandir}/man3/* %{_mandir}/man3/SUPER.3pm*
%changelog %changelog
* Tue Mar 6 2012 Paul Howarth <paul@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@lists.fedoraproject.org> - 1.17-6 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.17-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild