4ada0c
%if ! (0%{?rhel})
4ada0c
# Run extra test
4ada0c
%bcond_without perl_Module_Implementation_enables_extra_test
4ada0c
# Run optional test
4ada0c
%bcond_without perl_Module_Implementation_enables_optional_test
4ada0c
%else
4ada0c
%bcond_with perl_Module_Implementation_enables_extra_test
4ada0c
%bcond_with perl_Module_Implementation_enables_optional_test
4ada0c
%endif
4ada0c
4ada0c
Name:		perl-Module-Implementation
4ada0c
Version:	0.09
4ada0c
Release:	15%{?dist}
4ada0c
Summary:	Loads one of several alternate underlying implementations for a module
4ada0c
Group:		Development/Libraries
4ada0c
License:	Artistic 2.0
4ada0c
URL:		http://search.cpan.org/dist/perl-Module-Implementation/
4ada0c
Source0:	http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Module-Implementation-%{version}.tar.gz
4ada0c
BuildArch:	noarch
4ada0c
# ===================================================================
4ada0c
# Build requirements
4ada0c
# ===================================================================
4ada0c
BuildRequires:	coreutils
4ada0c
BuildRequires:	findutils
4ada0c
BuildRequires:	make
4ada0c
BuildRequires:	perl-interpreter
4ada0c
BuildRequires:	perl-generators
4ada0c
BuildRequires:	perl(ExtUtils::MakeMaker)
4ada0c
# ===================================================================
4ada0c
# Module requirements
4ada0c
# ===================================================================
4ada0c
BuildRequires:	perl(Carp)
4ada0c
BuildRequires:	perl(Module::Runtime) >= 0.012
4ada0c
BuildRequires:	perl(Try::Tiny)
4ada0c
BuildRequires:	perl(strict)
4ada0c
BuildRequires:	perl(warnings)
4ada0c
# ===================================================================
4ada0c
# Test suite requirements
4ada0c
# ===================================================================
4ada0c
BuildRequires:	perl(File::Spec)
4ada0c
BuildRequires:	perl(IO::Handle)
4ada0c
BuildRequires:	perl(IPC::Open3)
4ada0c
BuildRequires:	perl(lib)
4ada0c
BuildRequires:	perl(Test::Fatal) >= 0.006
4ada0c
BuildRequires:	perl(Test::More) >= 0.96
4ada0c
BuildRequires:	perl(Test::Requires)
4ada0c
%if %{with perl_Module_Implementation_enables_optional_test}
4ada0c
# ===================================================================
4ada0c
# Optional test requirements
4ada0c
# ===================================================================
4ada0c
BuildRequires:	perl(CPAN::Meta) >= 2.120900
4ada0c
%if ! %{defined perl_bootstrap}
4ada0c
# Build cycle: Test::CleanNamespaces → Package::Stash → Module::Implementation
4ada0c
BuildRequires:	perl(Test::CleanNamespaces)
4ada0c
%endif
4ada0c
BuildRequires:	perl(Test::Taint)
4ada0c
%endif
4ada0c
%if %{with perl_Module_Implementation_enables_extra_test}
4ada0c
# ===================================================================
4ada0c
# Author/Release test requirements
4ada0c
# ===================================================================
4ada0c
# Release tests include circular dependencies, so don't do them when bootstrapping:
4ada0c
%if ! %{defined perl_bootstrap}
4ada0c
BuildRequires:	perl(Pod::Coverage::TrustPod)
4ada0c
BuildRequires:	perl(Test::CPAN::Changes) >= 0.19
4ada0c
BuildRequires:	perl(Test::EOL)
4ada0c
BuildRequires:	perl(Test::NoTabs)
4ada0c
BuildRequires:	perl(Test::Pod) >= 1.41
4ada0c
BuildRequires:	perl(Test::Pod::Coverage) >= 1.08
4ada0c
BuildRequires:	perl(Test::Portability::Files)
4ada0c
# Can't use EPEL packages as BR: for RHEL package
4ada0c
%if ! 0%{?rhel}
4ada0c
BuildRequires:	aspell-en
4ada0c
BuildRequires:	perl(Pod::Wordlist)
4ada0c
BuildRequires:	perl(Test::Pod::LinkCheck)
4ada0c
BuildRequires:	perl(Test::Pod::No404s)
4ada0c
BuildRequires:	perl(Test::Spelling) >= 0.12
4ada0c
%endif
4ada0c
%endif
4ada0c
%endif
4ada0c
# ===================================================================
4ada0c
# Runtime requirements
4ada0c
# ===================================================================
4ada0c
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
4ada0c
Requires:	perl(Carp)
4ada0c
4ada0c
%description
4ada0c
This module abstracts out the process of choosing one of several underlying
4ada0c
implementations for a module. This can be used to provide XS and pure Perl
4ada0c
implementations of a module, or it could be used to load an implementation
4ada0c
for a given OS or any other case of needing to provide multiple
4ada0c
implementations.
4ada0c
4ada0c
This module is only useful when you know all the implementations ahead of
4ada0c
time. If you want to load arbitrary implementations then you probably want
4ada0c
something like a plugin system, not this module.
4ada0c
4ada0c
%prep
4ada0c
%setup -q -n Module-Implementation-%{version}
4ada0c
4ada0c
%build
4ada0c
perl Makefile.PL INSTALLDIRS=vendor
4ada0c
make %{?_smp_mflags}
4ada0c
4ada0c
%install
4ada0c
make pure_install DESTDIR=%{buildroot}
4ada0c
find %{buildroot} -type f -name .packlist -delete
4ada0c
%{_fixperms} %{buildroot}
4ada0c
4ada0c
%check
4ada0c
%if %{defined perl_bootstrap}
4ada0c
make test
4ada0c
%else
4ada0c
%if %{with perl_Module_Implementation_enables_extra_test}
4ada0c
# Don't run the author tests for EL builds (see above)
4ada0c
%if ! 0%{?rhel}
4ada0c
make test AUTHOR_TESTING=1 RELEASE_TESTING=1
4ada0c
%else
4ada0c
make test RELEASE_TESTING=1
4ada0c
%endif
4ada0c
%else
4ada0c
make test
4ada0c
%endif
4ada0c
%endif
4ada0c
4ada0c
%files
4ada0c
%license LICENSE
4ada0c
%doc Changes README.md
4ada0c
%{perl_vendorlib}/Module/
4ada0c
%{_mandir}/man3/Module::Implementation.3*
4ada0c
4ada0c
%changelog
4ada0c
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.09-15
4ada0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
4ada0c
4ada0c
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.09-14
4ada0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
4ada0c
4ada0c
* Wed Jun 07 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.09-13
4ada0c
- Perl 5.26 re-rebuild of bootstrapped packages
4ada0c
4ada0c
* Mon Jun 05 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.09-12
4ada0c
- Perl 5.26 rebuild
4ada0c
4ada0c
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.09-11
4ada0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
4ada0c
4ada0c
* Wed Oct 12 2016 Petr Pisar <ppisar@redhat.com> - 0.09-10
4ada0c
- Break build cycle when bootstrapping (Test::CleanNamespaces →
4ada0c
  Package::Stash → Module::Implementation)
4ada0c
4ada0c
* Tue Sep  6 2016 Paul Howarth <paul@city-fan.org> - 0.09-9
4ada0c
- BR: perl(Test::CleanNamespaces)
4ada0c
- Simplify find command using -delete
4ada0c
4ada0c
* Wed May 18 2016 Jitka Plesnikova <jplesnik@redhat.com> - 0.09-8
4ada0c
- Perl 5.24 re-rebuild of bootstrapped packages
4ada0c
4ada0c
* Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 0.09-7
4ada0c
- Perl 5.24 rebuild
4ada0c
4ada0c
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.09-6
4ada0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
4ada0c
4ada0c
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.09-5
4ada0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
4ada0c
4ada0c
* Wed Jun 10 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.09-4
4ada0c
- Perl 5.22 re-rebuild of bootstrapped packages
4ada0c
4ada0c
* Sat Jun 06 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.09-3
4ada0c
- Perl 5.22 rebuild
4ada0c
4ada0c
* Tue Sep 09 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.09-2
4ada0c
- Perl 5.20 mass
4ada0c
4ada0c
* Mon Sep  8 2014 Paul Howarth <paul@city-fan.org> - 0.09-1
4ada0c
- Update to 0.09
4ada0c
  - Implemented and then reverted a change to use Sub::Name (CPAN RT#98097)
4ada0c
- Modernize spec
4ada0c
- Hack out references to currently-unavailable Test::CleanNamespaces
4ada0c
4ada0c
* Fri Aug 29 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.07-6
4ada0c
- Perl 5.20 rebuild
4ada0c
4ada0c
* Tue Aug 05 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.07-5
4ada0c
- Do not run release and author tests on bootstrap
4ada0c
4ada0c
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.07-4
4ada0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
4ada0c
4ada0c
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.07-3
4ada0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
4ada0c
4ada0c
* Wed Jul 24 2013 Petr Pisar <ppisar@redhat.com> - 0.07-2
4ada0c
- Perl 5.18 rebuild
4ada0c
4ada0c
* Mon Jul 15 2013 Paul Howarth <paul@city-fan.org> - 0.07-1
4ada0c
- Update to 0.07
4ada0c
  - Require Test::Fatal ≥ 0.006 to avoid test failures (CPAN RT#76809)
4ada0c
- Explicitly run author tests, except for EL builds
4ada0c
- Add buildreqs for new tests
4ada0c
- Apply old Test::More patch if we have Test::More < 0.96
4ada0c
4ada0c
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.06-6
4ada0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
4ada0c
4ada0c
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.06-5
4ada0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
4ada0c
4ada0c
* Wed Jun 13 2012 Petr Pisar <ppisar@redhat.com> - 0.06-4
4ada0c
- Perl 5.16 rebuild
4ada0c
4ada0c
* Thu Jun  7 2012 Paul Howarth <paul@city-fan.org> - 0.06-3
4ada0c
- Drop %%defattr, redundant since rpm 4.4
4ada0c
- Don't need to remove empty directories from buildroot
4ada0c
- Add commentary regarding conditionalized buildreqs
4ada0c
4ada0c
* Thu Jun  7 2012 Marcela Mašláňová <mmaslano@redhat.com> - 0.06-2
4ada0c
- Conditionalize aspell-en dependency
4ada0c
4ada0c
* Sun Feb 12 2012 Paul Howarth <paul@city-fan.org> - 0.06-1
4ada0c
- Update to 0.06
4ada0c
  - Require Module::Runtime 0.012, which has a number of useful bug fixes
4ada0c
4ada0c
* Fri Feb 10 2012 Paul Howarth <paul@city-fan.org> - 0.05-1
4ada0c
- Update to 0.05
4ada0c
  - Make Test::Taint an optional dependency; it requires XS, and requiring a
4ada0c
    compiler for Module::Implementation defeats its purpose (CPAN RT#74817)
4ada0c
- BR: perl(Test::Requires)
4ada0c
- Update patch for building with old Test::More versions
4ada0c
4ada0c
* Thu Feb  9 2012 Paul Howarth <paul@city-fan.org> - 0.04-1
4ada0c
- Update to 0.04
4ada0c
  - This module no longer installs an _implementation() subroutine in callers;
4ada0c
    instead, you can call Module::Implementation::implementation_for($package)
4ada0c
    to get the implementation used for a given package
4ada0c
- Update patch for building with old Test::More versions
4ada0c
4ada0c
* Wed Feb  8 2012 Paul Howarth <paul@city-fan.org> - 0.03-3
4ada0c
- Incorporate feedback from package review (#788258)
4ada0c
  - Correct License tag, which should be Artistic 2.0
4ada0c
  - BR: perl(lib) for test suite
4ada0c
  - Explicitly require perl(Carp), not automatically detected
4ada0c
4ada0c
* Tue Feb  7 2012 Paul Howarth <paul@city-fan.org> - 0.03-2
4ada0c
- Sanitize for Fedora submission
4ada0c
4ada0c
* Tue Feb  7 2012 Paul Howarth <paul@city-fan.org> - 0.03-1
4ada0c
- Initial RPM version