8876c0
# Provides/Requires filtering is different from rpm 4.9 onwards
8876c0
%global rpm49 %(rpm --version | perl -p -e 's/^.* (\\d+)\\.(\\d+).*/sprintf("%d.%03d",$1,$2) ge 4.009 ? 1 : 0/e' 2>/dev/null || echo 0)
8876c0
8876c0
# Run extra test
8876c0
%if ! (0%{?rhel})
8876c0
%bcond_without perl_Sub_Exporter_enables_extra_test
8876c0
%else
8876c0
%bcond_with perl_Sub_Exporter_enables_extra_test
8876c0
%endif
8876c0
8876c0
Name:		perl-Sub-Exporter
8876c0
Version:	0.987
8876c0
Release:	16%{?dist}
8876c0
Summary:	Sophisticated exporter for custom-built routines
8876c0
License:	GPL+ or Artistic
8876c0
URL:		https://metacpan.org/release/Sub-Exporter
8876c0
Source0:	http://cpan.metacpan.org/authors/id/R/RJ/RJBS/Sub-Exporter-%{version}.tar.gz
8876c0
BuildArch:	noarch
8876c0
# Build
8876c0
BuildRequires:	coreutils
8876c0
BuildRequires:	findutils
8876c0
BuildRequires:	make
8876c0
BuildRequires:	perl-generators
8876c0
BuildRequires:	perl-interpreter
8876c0
BuildRequires:	perl(ExtUtils::MakeMaker) >= 6.30
8876c0
# Module
8876c0
BuildRequires:	perl(Carp)
8876c0
BuildRequires:	perl(Data::OptList) >= 0.1
8876c0
BuildRequires:	perl(Package::Generator)
8876c0
BuildRequires:	perl(Params::Util) >= 0.14
8876c0
BuildRequires:	perl(Sub::Install) >= 0.92
8876c0
# Test suite
8876c0
BuildRequires:	perl(base)
8876c0
BuildRequires:	perl(Exporter)
8876c0
BuildRequires:	perl(File::Spec)
8876c0
BuildRequires:	perl(IO::Handle)
8876c0
BuildRequires:	perl(IPC::Open3)
8876c0
BuildRequires:	perl(lib)
8876c0
BuildRequires:	perl(subs)
8876c0
BuildRequires:	perl(Test::More) >= 0.94
8876c0
# Extra tests
8876c0
%if %{with perl_Sub_Exporter_enables_extra_test}
8876c0
BuildRequires:	perl(Test::Pod) >= 1.41
8876c0
%endif
8876c0
# Runtime
8876c0
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
8876c0
Requires:	perl(Package::Generator)
8876c0
8876c0
# Don't want doc-file provides or dependencies
8876c0
%global our_docdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
8876c0
%global __provides_exclude_from ^%{our_docdir}/
8876c0
%global __requires_exclude_from ^%{our_docdir}/
8876c0
8876c0
%description
8876c0
Sub::Exporter provides a sophisticated alternative to Exporter.pm. It allows
8876c0
for renaming, currying/sub-generation, and other cool stuff.
8876c0
8876c0
ACHTUNG! If you're not familiar with Exporter or exporting, read
8876c0
Sub::Exporter::Tutorial first!
8876c0
8876c0
%prep
8876c0
%setup -q -n Sub-Exporter-%{version}
8876c0
8876c0
# Fix shellbangs
8876c0
find t/ -type f -exec \
8876c0
	perl -MExtUtils::MakeMaker -e 'ExtUtils::MM_Unix->fixin(qw{{}})' \;
8876c0
8876c0
# Filter bogus provides/requires if we don't have rpm ≥ 4.9
8876c0
%if ! %{rpm49}
8876c0
%global provfilt /bin/sh -c "%{__perl_provides} | grep -Ev '^perl[(]Test::SubExporter.*[)]'"
8876c0
%global __perl_provides %{provfilt}
8876c0
%global reqfilt /bin/sh -c "%{__perl_requires} | grep -Ev '^perl[(](base|Test::SubExporter.*)[)]'"
8876c0
%global __perl_requires %{reqfilt}
8876c0
%endif
8876c0
8876c0
%build
8876c0
perl Makefile.PL INSTALLDIRS=vendor
8876c0
make %{?_smp_mflags}
8876c0
8876c0
%install
8876c0
make pure_install DESTDIR=%{buildroot}
8876c0
find %{buildroot} -type f -name .packlist -delete
8876c0
%{_fixperms} -c %{buildroot}
8876c0
8876c0
%check
8876c0
make test
8876c0
%if %{with perl_Sub_Exporter_enables_extra_test}
8876c0
make test TEST_FILES="$(echo $(find xt/ -name '*.t'))"
8876c0
%endif
8876c0
8876c0
%files
8876c0
%doc Changes README t/
8876c0
%dir %{perl_vendorlib}/Sub/
8876c0
%dir %{perl_vendorlib}/Sub/Exporter/
8876c0
%{perl_vendorlib}/Sub/Exporter.pm
8876c0
%{perl_vendorlib}/Sub/Exporter/Util.pm
8876c0
%doc %{perl_vendorlib}/Sub/Exporter/Cookbook.pod
8876c0
%doc %{perl_vendorlib}/Sub/Exporter/Tutorial.pod
8876c0
%{_mandir}/man3/Sub::Exporter.3*
8876c0
%{_mandir}/man3/Sub::Exporter::Cookbook.3*
8876c0
%{_mandir}/man3/Sub::Exporter::Tutorial.3*
8876c0
%{_mandir}/man3/Sub::Exporter::Util.3*
8876c0
8876c0
%changelog
8876c0
* Fri Mar 29 2019 Jitka Plesnikova <jplesnik@redhat.com> - 0.987-16
8876c0
- Rebuild with enable hardening (bug #1636329)
8876c0
8876c0
* Thu Apr 12 2018 Paul Howarth <paul@city-fan.org> - 0.987-15
8876c0
- Drop some support for older distributions
8876c0
  - Drop BuildRoot: and Group: tags
8876c0
  - Drop explicit buildroot cleaning in %%install section
8876c0
  - Drop explicit %%clean section
8876c0
  - Drop workarounds for building with Test::More < 0.94
8876c0
8876c0
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.987-14
8876c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
8876c0
8876c0
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.987-13
8876c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
8876c0
8876c0
* Sun Jun 04 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.987-12
8876c0
- Perl 5.26 rebuild
8876c0
8876c0
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.987-11
8876c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
8876c0
8876c0
* Fri Jul 22 2016 Petr Pisar <ppisar@redhat.com> - 0.987-10
8876c0
- Adjust RPM version detection to SRPM build root without perl
8876c0
8876c0
* Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 0.987-9
8876c0
- Perl 5.24 rebuild
8876c0
8876c0
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.987-8
8876c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
8876c0
8876c0
* Thu Jan  7 2016 Paul Howarth <paul@city-fan.org> - 0.987-7
8876c0
- Don't use %%define
8876c0
8876c0
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.987-6
8876c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
8876c0
8876c0
* Fri Jun 05 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.987-5
8876c0
- Perl 5.22 rebuild
8876c0
8876c0
* Fri Jan 16 2015 Petr Pisar <ppisar@redhat.com> - 0.987-4
8876c0
- Do not hard-code interpreter name
8876c0
8876c0
* Wed Aug 27 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.987-3
8876c0
- Perl 5.20 rebuild
8876c0
8876c0
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.987-2
8876c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
8876c0
8876c0
* Sat Oct 19 2013 Paul Howarth <paul@city-fan.org> - 0.987-1
8876c0
- Update to 0.987 (update bugtracker metadata)
8876c0
- Update patches as needed
8876c0
8876c0
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.986-4
8876c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
8876c0
8876c0
* Wed Jul 31 2013 Paul Howarth <paul@city-fan.org> - 0.986-3
8876c0
- Handle filtering of provides/requires from unversioned doc-dirs from F-20
8876c0
8876c0
* Sun Jul 21 2013 Petr Pisar <ppisar@redhat.com> - 0.986-2
8876c0
- Perl 5.18 rebuild
8876c0
8876c0
* Sat Jun 15 2013 Paul Howarth <paul@city-fan.org> - 0.986-1
8876c0
- Update to 0.986 (typo fixes in docs)
8876c0
- Use metacpan URLs
8876c0
8876c0
* Thu Feb 21 2013 Paul Howarth <paul@city-fan.org> - 0.985-1
8876c0
- Update to 0.985 (documentation fixes)
8876c0
- Add patch to support building with Test::More < 0.88
8876c0
- Run the extra tests too
8876c0
- BR: perl(File::Find) and perl(File::Temp) for test suite
8876c0
- BR: perl(Test::Pod) for the extra tests
8876c0
8876c0
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.984-5
8876c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
8876c0
8876c0
* Mon Oct 29 2012 Petr Pisar <ppisar@redhat.com> - 0.984-4
8876c0
- Specify all dependencies
8876c0
8876c0
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.984-3
8876c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
8876c0
8876c0
* Wed Jun 13 2012 Petr Pisar <ppisar@redhat.com> - 0.984-2
8876c0
- Perl 5.16 rebuild
8876c0
8876c0
* Tue Jun  5 2012 Paul Howarth <paul@city-fan.org> - 0.984-1
8876c0
- Update to 0.984 (documentation fixes)
8876c0
- Add filters for provides/requires from the test suite
8876c0
- BR: perl(base) and perl(Exporter) for the test suite
8876c0
8876c0
* Sun Mar 18 2012 Paul Howarth <paul@city-fan.org> - 0.982-11
8876c0
- Drop %%defattr, redundant since rpm 4.4
8876c0
8876c0
* Sat Mar  3 2012 Paul Howarth <paul@city-fan.org> - 0.982-10
8876c0
- Explicitly require perl(Package::Generator)
8876c0
- Make %%files list more explicit
8876c0
- Mark POD files as %%doc
8876c0
- Use DESTDIR rather than PERL_INSTALL_ROOT
8876c0
- Don't need to remove empty directories from buildroot
8876c0
- Don't use macros for commands
8876c0
- Use tabs
8876c0
8876c0
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.982-9
8876c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
8876c0
8876c0
* Wed Jun 29 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.982-8
8876c0
- Perl mass rebuild
8876c0
8876c0
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.982-7
8876c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
8876c0
8876c0
* Wed Dec 22 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.982-6
8876c0
- Rebuild to fix problems with vendorarch/lib (#661697)
8876c0
8876c0
* Thu May 06 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.982-5
8876c0
- Mass rebuild with perl-5.12.0
8876c0
8876c0
* Mon Dec  7 2009 Stepan Kasal <skasal@redhat.com> - 0.982-4
8876c0
- Rebuild against perl 5.10.1
8876c0
8876c0
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.982-3
8876c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
8876c0
8876c0
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.982-2
8876c0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
8876c0
8876c0
* Wed Feb 11 2009 Chris Weyl <cweyl@alumni.drew.edu> - 0.982-1
8876c0
- Update to 0.982
8876c0
8876c0
* Sun Oct 26 2008 Chris Weyl <cweyl@alumni.drew.edu> - 0.981-1
8876c0
- Update to 0.981
8876c0
8876c0
* Thu Oct 23 2008 Chris Weyl <cweyl@alumni.drew.edu> - 0.980-1
8876c0
- Update to 0.980
8876c0
8876c0
* Mon Jun 30 2008 Chris Weyl <cweyl@alumni.drew.edu> - 0.979-1
8876c0
- Update to 0.979
8876c0
- Drop BR's on: perl(Test::Pod::Coverage), perl(Test::Pod)
8876c0
8876c0
* Wed Feb 27 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.978-2
8876c0
- Rebuild for perl 5.10 (again)
8876c0
8876c0
* Thu Jan 24 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.978-1
8876c0
- Update to 0.978
8876c0
- Fix license tag
8876c0
- Rebuild for new perl
8876c0
8876c0
* Thu Aug 09 2007 Chris Weyl <cweyl@alumni.drew.edu> - 0.975-1
8876c0
- Update to 0.975
8876c0
8876c0
* Fri Jun 01 2007 Chris Weyl <cweyl@alumni.drew.edu> - 0.974-1
8876c0
- Update to 0.974
8876c0
8876c0
* Sat Dec 09 2006 Chris Weyl <cweyl@alumni.drew.edu> - 0.972-1
8876c0
- Update to 0.972
8876c0
8876c0
* Thu Sep 07 2006 Chris Weyl <cweyl@alumni.drew.edu> - 0.970-2
8876c0
- Bump
8876c0
8876c0
* Sat Sep 02 2006 Chris Weyl <cweyl@alumni.drew.edu> - 0.970-1
8876c0
- Specfile autogenerated by cpanspec 1.69.1