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