@ -1,32 +1,29 @@
# MRO is part of the Perl core since 5.9.5
%global mro_in_core %(perl -e 'print $] > 5.009005 ? 1 : 0;')
Name: perl-Class-C3
Version: 0.25
Release: 4 %{?dist}
Version: 0.26
Release: 1%{?dist}
Summary: Pragma to use the C3 method resolution order algorithm
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/Class-C3/
Source0: http://search.cpan.org/CPAN/authors/id/M/MS/MSTROUT/Class-C3-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
Source0: http://search.cpan.org/CPAN/authors/id/H/HA/HAARG/Class-C3-%{version}.tar.gz
BuildArch: noarch
# Build
BuildRequires: perl(ExtUtils::CBuilder)
BuildRequires: perl(ExtUtils::CBuilder) >= 0.27
BuildRequires: perl(ExtUtils::MakeMaker)
# Module
BuildRequires: perl(Algorithm::C3) >= 0.07
BuildRequires: perl(Scalar::Util) >= 1.10
# Test suite
BuildRequires: perl(base)
BuildRequires: perl(lib)
BuildRequires: perl(NEXT)
BuildRequires: perl(File::Glob)
BuildRequires: perl(Sub::Name)
BuildRequires: perl(Test::Exception) >= 0.15
BuildRequires: perl(Test::More) >= 0.47
BuildRequires: perl(Test::More) >= 0.88
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Pod::Coverage)
# MRO::Compat itself requires Class::C3
# The test that uses the module is skipped unless MRO is part of the Perl core
%if 0%{!?perl_bootstrap:1} && %{mro_in_core}
%if 0%{!?perl_bootstrap:1}
BuildRequires: perl(MRO::Compat)
%endif
# Runtime
@ -34,19 +31,9 @@ Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires: perl(Algorithm::C3) >= 0.07
Requires: perl(Scalar::Util) >= 1.10
# Requirements for older distributions with Perl < 5.9.5
%if ! %{mro_in_core}
BuildRequires: perl(Class::C3::XS) >= 0.13
Requires: perl(Class::C3::XS) >= 0.13
%endif
# Let people "use c3;"
Provides: perl(c3) = %{version}
# Obsolete/provide old -tests subpackage (can be removed in F19 development cycle)
Obsoletes: %{name}-tests < %{version}-%{release}
Provides: %{name}-tests = %{version}-%{release}
# Filter out bogus dependencies and provides (rpm 4.9 onwards)
%global __requires_exclude ^perl\\((c3|base)\\)
%global __provides_exclude ^perl\\(t::lib::
@ -66,12 +53,10 @@ method resolution order.
%define __perl_provides %{provfilt}
%build
%{?perl_ext_env_unset}
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 {} \;
cp -p opt/c3.pm %{buildroot}%{perl_vendorlib}/
@ -80,11 +65,7 @@ cp -p opt/c3.pm %{buildroot}%{perl_vendorlib}/
%check
make test
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc ChangeLog README util/ t/
%{perl_vendorlib}/c3.pm
%{perl_vendorlib}/Class/
@ -92,6 +73,16 @@ rm -rf %{buildroot}
%{_mandir}/man3/Class::C3::next.3pm*
%changelog
* Wed Mar 5 2014 Paul Howarth <paul@city-fan.org> - 0.26-1
- Update to 0.26:
- Fix bug in Makefile.PL when ExtUtils::CBuilder not available
- This release by HAARG -> update source URL
- Clean up for modern rpmbuild since build requirements are not available in
EL-5
- Drop obsoletes/provides for old tests sub-package
- Drop unnecessary %%perl_ext_env_unset macro usage
- Add optional test requirements
* Wed Aug 14 2013 Jitka Plesnikova <jplesnik@redhat.com> - 0.25-4
- Perl 5.18 re-rebuild of bootstrapped packages