Blame SPECS/perl-Module-Implementation.spec

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