From f0b1cbe24336ca6fc9f886390028def075c74fdc Mon Sep 17 00:00:00 2001 From: Chris Weyl Date: Sat, 15 May 2010 19:47:45 +0000 Subject: [PATCH] - install c3.pm as well; drop opt/ from doc - conditionalise --- perl-Class-C3.spec | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/perl-Class-C3.spec b/perl-Class-C3.spec index 0ab4ea4..8267c4c 100644 --- a/perl-Class-C3.spec +++ b/perl-Class-C3.spec @@ -1,6 +1,8 @@ +%global older_perl %(%{__perl} -e '$] < 5.009_005 ? print 1 : print 0') + Name: perl-Class-C3 Version: 0.22 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Pragma to use the C3 method resolution order algorithm License: GPL+ or Artistic Group: Development/Libraries @@ -13,23 +15,25 @@ Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $versi # 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(Algorithm::C3) >= 0.06 -BuildRequires: perl(Class::C3::XS) >= 0.07 BuildRequires: perl(Test::Exception) >= 0.15 -BuildRequires: perl(Scalar::Util) >= 1.10 # testing... BuildRequires: perl(Test::Pod) BuildRequires: perl(Test::Pod::Coverage) -BuildRequires: perl(Class::C3) 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(Scalar::Util) >= 1.10 -# strictly speaking, this is optional. However, speed is always nice :) Requires: perl(Class::C3::XS) >= 0.07 +Requires: perl(Scalar::Util) >= 1.10 +%endif %{?perl_default_filter} %{?perl_default_subpackage_tests} @@ -43,6 +47,7 @@ method resolution order. %setup -q -n Class-C3-%{version} %build +%{?perl_ext_env_unset} %{__perl} Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} @@ -52,6 +57,7 @@ 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}/* @@ -63,11 +69,15 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) -%doc ChangeLog README opt/ util/ +%doc ChangeLog README util/ %{perl_vendorlib}/* %{_mandir}/man3/* %changelog +* Sat May 15 2010 Chris Weyl 0.22-3 +- install c3.pm as well; drop opt/ from doc +- conditionalise + * Fri Apr 30 2010 Marcela Maslanova - 0.22-2 - Mass rebuild with perl-5.12.0