d407a78
# We need to patch the test suite if we have an old version of Test::More
d407a78
%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.88) ? 1 : 0);' 2>/dev/null || echo 0)
d407a78
d407a78
# Test::CPAN::Changes isn't available in EPEL < 7, due to requirement of perl(version) ≥ 0.79
d407a78
%global cpan_changes_available %(expr 0%{?fedora} + 0%{?rhel} '>' 6)
d407a78
d407a78
#TODO: BR: Test::Pod::No404s when available
d407a78
#TODO: BR: Test::Pod::LinkCheck when available
d407a78
d407a78
Name:		perl-Module-Implementation
3e734a0
Version:	0.06
6b40ecc
Release:	6%{?dist}
d407a78
Summary:	Loads one of several alternate underlying implementations for a module
d407a78
Group:		Development/Libraries
d407a78
License:	Artistic 2.0
d407a78
URL:		http://search.cpan.org/dist/perl-Module-Implementation/
d407a78
Source0:	http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Module-Implementation-%{version}.tar.gz
be51602
Patch1:		Module-Implementation-0.05-old-Test::More.patch
d407a78
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
d407a78
BuildArch:	noarch
d407a78
# ===================================================================
d407a78
# Build requirements
d407a78
# ===================================================================
d407a78
BuildRequires:	perl(ExtUtils::MakeMaker)
d407a78
# ===================================================================
d407a78
# Module requirements
d407a78
# ===================================================================
d407a78
BuildRequires:	perl(Carp)
3e734a0
BuildRequires:	perl(Module::Runtime) >= 0.012
d407a78
BuildRequires:	perl(Try::Tiny)
d407a78
BuildRequires:	perl(strict)
d407a78
BuildRequires:	perl(warnings)
d407a78
# ===================================================================
d407a78
# Test suite requirements
d407a78
# ===================================================================
d407a78
BuildRequires:	perl(lib)
d407a78
BuildRequires:	perl(Test::Fatal)
d407a78
BuildRequires:	perl(Test::More)
be51602
BuildRequires:	perl(Test::Requires)
d407a78
BuildRequires:	perl(Test::Taint)
d407a78
# ===================================================================
d407a78
# Author/Release test requirements
d407a78
# ===================================================================
d407a78
%if %{cpan_changes_available}
d407a78
BuildRequires:	perl(Test::CPAN::Changes)
d407a78
%endif
d407a78
BuildRequires:	perl(Test::EOL)
d407a78
BuildRequires:	perl(Test::NoTabs)
d407a78
BuildRequires:	perl(Test::Pod)
c8e1258
BuildRequires:	perl(Test::Spelling)
c0228b7
# Can't use aspell-en from EPEL-7 as BR: for RHEL-7 package so skip the spell
c0228b7
# check test there; test would fail rather than skip without Test::Spelling so
c0228b7
# we need to keep that as a buildreq
c8e1258
%if 0%{?rhel} < 7
c0228b7
BuildRequires:	aspell-en
c8e1258
%endif
d407a78
# ===================================================================
d407a78
# Runtime requirements
d407a78
# ===================================================================
d407a78
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
d407a78
Requires:	perl(Carp)
d407a78
d407a78
%description
d407a78
This module abstracts out the process of choosing one of several underlying
d407a78
implementations for a module. This can be used to provide XS and pure Perl
d407a78
implementations of a module, or it could be used to load an implementation
d407a78
for a given OS or any other case of needing to provide multiple
d407a78
implementations.
d407a78
d407a78
This module is only useful when you know all the implementations ahead of
d407a78
time. If you want to load arbitrary implementations then you probably want
d407a78
something like a plugin system, not this module.
d407a78
d407a78
%prep
d407a78
%setup -q -n Module-Implementation-%{version}
d407a78
d407a78
# We have to patch the test suite if we have an old Test::More
d407a78
%if %{old_test_more}
d407a78
%patch1 -p1
d407a78
%endif
d407a78
d407a78
%build
d407a78
perl Makefile.PL INSTALLDIRS=vendor
d407a78
make %{?_smp_mflags}
d407a78
d407a78
%install
d407a78
rm -rf %{buildroot}
d407a78
make pure_install DESTDIR=%{buildroot}
d407a78
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
d407a78
%{_fixperms} %{buildroot}
d407a78
d407a78
%check
d407a78
make test RELEASE_TESTING=1
d407a78
d407a78
%clean
d407a78
rm -rf %{buildroot}
d407a78
d407a78
%files
d407a78
%doc Changes LICENSE README
d407a78
%{perl_vendorlib}/Module/
d407a78
%{_mandir}/man3/Module::Implementation.3pm*
d407a78
d407a78
%changelog
6b40ecc
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.06-6
6b40ecc
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
6b40ecc
c8dcafa
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.06-5
c8dcafa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
c8dcafa
ad625b9
* Wed Jun 13 2012 Petr Pisar <ppisar@redhat.com> - 0.06-4
ad625b9
- Perl 5.16 rebuild
ad625b9
c0228b7
* Thu Jun  7 2012 Paul Howarth <paul@city-fan.org> - 0.06-3
c0228b7
- Drop %%defattr, redundant since rpm 4.4
c0228b7
- Don't need to remove empty directories from buildroot
c0228b7
- Add commentary regarding conditionalized buildreqs
c0228b7
c8e1258
* Thu Jun  7 2012 Marcela Mašláňová <mmaslano@redhat.com> - 0.06-2
c0228b7
- Conditionalize aspell-en dependency
c8e1258
3e734a0
* Sun Feb 12 2012 Paul Howarth <paul@city-fan.org> - 0.06-1
3e734a0
- Update to 0.06
3e734a0
  - Require Module::Runtime 0.012, which has a number of useful bug fixes
3e734a0
be51602
* Fri Feb 10 2012 Paul Howarth <paul@city-fan.org> - 0.05-1
be51602
- Update to 0.05
be51602
  - Make Test::Taint an optional dependency; it requires XS, and requiring a
be51602
    compiler for Module::Implementation defeats its purpose (CPAN RT#74817)
be51602
- BR: perl(Test::Requires)
be51602
- Update patch for building with old Test::More versions
be51602
f128b86
* Thu Feb  9 2012 Paul Howarth <paul@city-fan.org> - 0.04-1
f128b86
- Update to 0.04
f128b86
  - This module no longer installs an _implementation() subroutine in callers;
f128b86
    instead, you can call Module::Implementation::implementation_for($package)
f128b86
    to get the implementation used for a given package
f128b86
- Update patch for building with old Test::More versions
f128b86
d407a78
* Wed Feb  8 2012 Paul Howarth <paul@city-fan.org> - 0.03-3
d407a78
- Incorporate feedback from package review (#788258)
d407a78
  - Correct License tag, which should be Artistic 2.0
d407a78
  - BR: perl(lib) for test suite
d407a78
  - Explicitly require perl(Carp), not automatically detected
d407a78
d407a78
* Tue Feb  7 2012 Paul Howarth <paul@city-fan.org> - 0.03-2
d407a78
- Sanitize for Fedora submission
d407a78
d407a78
* Tue Feb  7 2012 Paul Howarth <paul@city-fan.org> - 0.03-1
d407a78
- Initial RPM version