# We need to patch the test suite if we have old versions of Test::More
%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.88) ? 1 : 0);' 2>/dev/null || echo 0)

Name:		perl-Sub-Exporter-Progressive
Version:	0.001013
Release:	2%{?_dist_release}
Summary:	Only use Sub::Exporter if you need it
Group:		programming
Vendor:		Project Vine
Distribution:	Vine Linux

License:	GPL+ or Artistic
URL:		https://metacpan.org/pod/Sub::Exporter::Progressive
Source0:	https://cpan.metacpan.org/authors/id/F/FR/FREW/Sub-Exporter-Progressive-%{version}.tar.gz
Patch1:		Sub-Exporter-Progressive-0.001010-old-Test::More.patch

BuildArch:	noarch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root
# =============== Module Build ======================
BuildRequires:	perl(ExtUtils::MakeMaker)
# =============== Module Runtime ====================
BuildRequires:	perl(Carp)
BuildRequires:	perl(Exporter)
BuildRequires:	perl(List::Util)
BuildRequires:	perl(Sub::Exporter)
# =============== Test Suite ========================
BuildRequires:	perl(lib)
BuildRequires:	perl(Test::More)
# =============== Module Runtime ====================
Requires:	perl >= 2:5.34.0
Requires:	perl(Exporter)
Requires:	perl(Sub::Exporter)

%description
Sub::Exporter is an incredibly powerful module, but with that power comes
great responsibility, er- as well as some runtime penalties. This module is a
Sub::Exporter wrapper that will let your users just use Exporter if all they
are doing is picking exports, but use Sub::Exporter if your users try to use
Sub::Exporter's more advanced features features, like renaming exports, if
they try to use them.

Note that this module will export @EXPORT and @EXPORT_OK package variables for
Exporter to work. Additionally, if your package uses advanced Sub::Exporter
features like currying, this module will only ever use Sub::Exporter, so you
might as well use it directly.


%prep
%setup -q -n Sub-Exporter-Progressive-%{version}

# We need to patch the test suite if we have old versions of Test::More
%if %{old_test_more}
%patch1
%endif


%build
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
make %{?_smp_mflags}

%install
rm -rf %{buildroot}
make pure_install DESTDIR=%{buildroot}
%{_fixperms} %{buildroot}


%check
make test


%clean
rm -rf %{buildroot}


%files
%doc Changes README
%{perl_vendorlib}/Sub/
%{_mandir}/man3/Sub::Exporter::Progressive.3pm*


%changelog
* Sun Nov 21 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 0.001013-2
- rebuilt with perl-5.34.0.

* Sun May 19 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net>- 0.001013-1
- new upstream release.
- rebuilt with perl-5.26.

* Tue Dec 23 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 0.001011-4
- initial build for Vine Linux
- built with perl 5.16.3

* Wed Aug 27 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.001011-3
- Perl 5.20 rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.001011-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Mon Oct 28 2013 Paul Howarth <paul@city-fan.org> - 0.001011-1
- Update to 0.001011
  - Fix in global destruction
  - Fix SYNOPSIS
  - Fix duplicate word in DESCRIPTION (CPAN RT#86072)

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.001010-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Sun Jul 21 2013 Petr Pisar <ppisar@redhat.com> - 0.001010-2
- Perl 5.18 rebuild

* Wed Mar 27 2013 Paul Howarth <paul@city-fan.org> - 0.001010-1
- Update to 0.001010
  - Fix module name in Makefile.PL (CPAN RT#83932)
  - Work around Exporter.pm not installable on perl < 5.8.0
- Update old Test::More patch

* Wed Mar 13 2013 Paul Howarth <paul@city-fan.org> - 0.001009-1
- Update to 0.001009
  - Disallow version names in random parts of the import list for consistency
    with Sub::Exporter (CPAN RT#83491)
- Update old Test::More patch, and apply if we have Test::More < 0.88

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.001008-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Tue Jan 22 2013 Paul Howarth <paul@city-fan.org> - 0.001008-1
- Update to 0.001008
  - Rewrite -tag to :tag for Exporter.pm
  - Fix prereqs
- Update old Test::More patch, and apply if we have Test::More < 0.96
- Bump perl(Exporter) version requirement to 5.58

* Mon Aug 27 2012 Paul Howarth <paul@city-fan.org> - 0.001006-1
- Update to 0.001006
  - Handle ':all' correctly
- Update old Test::More patch
- Drop redundant buildreq perl(Test::Pod)

* Sat Aug 25 2012 Paul Howarth <paul@city-fan.org> - 0.001005-1
- Update to 0.001005
  - Add support for tags
  - Warn if defaults are not in exports
  - Add explicit dependency on Test::More 0.89
- This release by LEONT -> update source URL
- Update old Test::More patch

* Thu Aug  9 2012 Paul Howarth <paul@city-fan.org> - 0.001004-1
- Update to 0.001004 (fix skipping when Sub::Exporter isn't installed)
- This release by MSTROUT -> update source URL
- No LICENSE file in this release
- Update old Test::More patch

* Wed Aug  1 2012 Paul Howarth <paul@city-fan.org> - 0.001003-1
- Update to 0.001003 (remove warning if there are no defaults)

* Wed Aug  1 2012 Paul Howarth <paul@city-fan.org> - 0.001002-2
- Sanitize for Fedora submission

* Wed Aug  1 2012 Paul Howarth <paul@city-fan.org> - 0.001002-1
- Initial RPM build
