Blob Blame History Raw
%global older_perl %(%{__perl} -e '$] < 5.009_005 ? print 1 : print 0')

Name:           perl-Class-C3
Version:        0.22
Release:        5%{?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/F/FL/FLORA/Class-C3-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

# see rh#205081,rh#204800
%define         __perl_provides %{nil}
Provides:       perl(Class::C3) = %{version}
Provides:       perl(c3) = %{version}

BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.42
BuildRequires:  perl(Test::More) >= 0.47
BuildRequires:  perl(Test::Exception) >= 0.15
# testing...
BuildRequires:  perl(Test::Pod)
BuildRequires:  perl(Test::Pod::Coverage)
BuildRequires:  perl(Sub::Name)

# past 5.9.5 mro is in core
%if %{older_perl}
BuildRequires:  perl(Algorithm::C3) >= 0.06
BuildRequires:  perl(Class::C3::XS) >= 0.07
BuildRequires:  perl(Scalar::Util) >= 1.10
Requires:       perl(Algorithm::C3) >= 0.06
Requires:       perl(Class::C3::XS) >= 0.07
Requires:       perl(Scalar::Util) >= 1.10
%endif 

%{?perl_default_filter}
%{?perl_default_subpackage_tests}

%description
This is a pragma to change Perl 5's standard method resolution order from
depth-first left-to-right (a.k.a - pre-order) to the more sophisticated C3
method resolution order.

%prep
%setup -q -n Class-C3-%{version}

%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 {} \;
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
cp opt/c3.pm %{buildroot}%{perl_vendorlib}/

%{_fixperms} %{buildroot}/*

%check
make test

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc ChangeLog README util/
%{perl_vendorlib}/*
%{_mandir}/man3/*

%changelog
* Wed Dec 15 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.22-5
- 661697 rebuild for fixing problems with vendorach/lib

* Sat May 15 2010 Chris Weyl <cweyl@alumni.drew.edu> 0.22-4
- bump

* Sat May 15 2010 Chris Weyl <cweyl@alumni.drew.edu> 0.22-3
- install c3.pm as well; drop opt/ from doc
- conditionalise

* Fri Apr 30 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.22-2
- Mass rebuild with perl-5.12.0

* Sat Feb 06 2010 Chris Weyl <cweyl@alumni.drew.edu> 0.22-1
- PERL_INSTALL_ROOT => DESTDIR
- add perl_default_subpackage_tests, and drop t/ from doc
- add perl_default_filter (and update filtering)
- auto-update to 0.22 (by cpan-spec-update 0.01)
- altered br on perl(ExtUtils::MakeMaker) (0 => 6.42)
- added a new br on perl(Scalar::Util) (version 1.10)
- altered br on perl(Test::More) (0 => 0.47)
- added a new req on perl(Scalar::Util) (version 1.10)

* Mon Dec  7 2009 Stepan Kasal <skasal@redhat.com> - 0.21-3
- rebuild against perl 5.10.1

* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.21-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Apr 02 2009 Chris Weyl <cweyl@alumni.drew.edu> 0.21-1
- update to 0.21

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.20-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sun Jan 25 2009 Chris Weyl <cweyl@alumni.drew.edu> 0.20-1
- update to 0.20

* Tue Mar  4 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.19-2
- rebuild for new perl

* Wed Oct 10 2007 Chris Weyl <cweyl@alumni.drew.edu> 0.19-1
- update to 0.19

* Fri Jun 01 2007 Chris Weyl <cweyl@alumni.drew.edu> 0.18-1
- update to 0.18

* Wed May 09 2007 Chris Weyl <cweyl@alumni.drew.edu> 0.17-1
- update to 0.17
- BR Class::C3::XS

* Mon Sep 25 2006 Chris Weyl <cweyl@alumni.drew.edu> 0.14-1
- update to 0.14

* Tue Sep 19 2006 Chris Weyl <cweyl@alumni.drew.edu> 0.13-4
- fix autoprovides, see rh#205801

* Thu Sep 07 2006 Chris Weyl <cweyl@alumni.drew.edu> 0.13-3
- bump

* Thu Sep 07 2006 Chris Weyl <cweyl@alumni.drew.edu> 0.13-2
- additional br's, minor spec tweaks

* Tue Sep 05 2006 Chris Weyl <cweyl@alumni.drew.edu> 0.13-1
- Specfile autogenerated by cpanspec 1.69.1.