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