7465c5
# We need to patch the test suite if we have an old version of Test::More
7465c5
%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.88) ? 1 : 0);' 2>/dev/null || echo 0)
7465c5
7465c5
Name:		perl-Sub-Exporter
7465c5
Version:	0.986
3646af
Release:	2%{?dist}
7465c5
Summary:	Sophisticated exporter for custom-built routines
7465c5
License:	GPL+ or Artistic
7465c5
Group:		Development/Libraries
7465c5
URL:		https://metacpan.org/release/Sub-Exporter
7465c5
Source0:	http://cpan.metacpan.org/authors/id/R/RJ/RJBS/Sub-Exporter-%{version}.tar.gz
7465c5
Patch1:		Sub-Exporter-0.986-old-Test::More.patch
7465c5
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
7465c5
BuildArch:	noarch
7465c5
# Build
7465c5
BuildRequires:	perl(ExtUtils::MakeMaker)
7465c5
# Module
7465c5
BuildRequires:	perl(Carp)
7465c5
BuildRequires:	perl(Data::OptList) >= 0.1
7465c5
BuildRequires:	perl(Package::Generator)
7465c5
BuildRequires:	perl(Params::Util) >= 0.14
7465c5
BuildRequires:	perl(Sub::Install) >= 0.92
7465c5
# Test suite
7465c5
BuildRequires:	perl(base)
7465c5
BuildRequires:	perl(Exporter)
7465c5
BuildRequires:	perl(File::Find)
7465c5
BuildRequires:	perl(File::Temp)
7465c5
BuildRequires:	perl(lib)
7465c5
BuildRequires:	perl(subs)
7465c5
BuildRequires:	perl(Test::More)
7465c5
# Extra tests
7465c5
BuildRequires:	perl(Test::Pod)
7465c5
# Runtime
7465c5
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
7465c5
Requires:	perl(Package::Generator)
7465c5
7465c5
# Don't want doc-file provides or dependencies
7465c5
%global __provides_exclude_from ^%{_datadir}/doc/%{name}-%{version}/
7465c5
%global __requires_exclude_from ^%{_datadir}/doc/%{name}-%{version}/
7465c5
7465c5
%description
7465c5
Sub::Exporter provides a sophisticated alternative to Exporter.pm. It allows
7465c5
for renaming, currying/sub-generation, and other cool stuff.
7465c5
7465c5
ACHTUNG! If you're not familiar with Exporter or exporting, read
7465c5
Sub::Exporter::Tutorial first!
7465c5
7465c5
%prep
7465c5
%setup -q -n Sub-Exporter-%{version}
7465c5
7465c5
# We need to patch the test suite if we have an old version of Test::More
7465c5
%if %{old_test_more}
7465c5
%patch1
7465c5
%endif
7465c5
7465c5
# Fix shellbangs
7465c5
find t/ -type f -exec sed -i -e 's|^#!perl|#!/usr/bin/perl|' {} \;
7465c5
7465c5
# Filter bogus provides/requires if we don't have rpm ≥ 4.9
7465c5
%global provfilt /bin/sh -c "%{__perl_provides} | grep -Ev '^perl[(]Test::SubExporter.*[)]'"
7465c5
%define __perl_provides %{provfilt}
7465c5
%global reqfilt /bin/sh -c "%{__perl_requires} | grep -Ev '^perl[(](base|Test::SubExporter.*)[)]'"
7465c5
%define __perl_requires %{reqfilt}
7465c5
7465c5
%build
7465c5
perl Makefile.PL INSTALLDIRS=vendor
7465c5
make %{?_smp_mflags}
7465c5
7465c5
%install
7465c5
rm -rf %{buildroot}
7465c5
make pure_install DESTDIR=%{buildroot}
7465c5
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
7465c5
%{_fixperms} %{buildroot}
7465c5
7465c5
%check
7465c5
make test
7465c5
make test TEST_FILES="$(echo $(find xt/ -name '*.t'))"
7465c5
7465c5
%clean
7465c5
rm -rf %{buildroot}
7465c5
7465c5
%files
7465c5
%doc Changes README t/
7465c5
%dir %{perl_vendorlib}/Sub/
7465c5
%dir %{perl_vendorlib}/Sub/Exporter/
7465c5
%{perl_vendorlib}/Sub/Exporter.pm
7465c5
%{perl_vendorlib}/Sub/Exporter/Util.pm
7465c5
%doc %{perl_vendorlib}/Sub/Exporter/Cookbook.pod
7465c5
%doc %{perl_vendorlib}/Sub/Exporter/Tutorial.pod
7465c5
%{_mandir}/man3/Sub::Exporter.3pm*
7465c5
%{_mandir}/man3/Sub::Exporter::Cookbook.3pm*
7465c5
%{_mandir}/man3/Sub::Exporter::Tutorial.3pm*
7465c5
%{_mandir}/man3/Sub::Exporter::Util.3pm*
7465c5
7465c5
%changelog
3646af
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.986-2
3646af
- Mass rebuild 2013-12-27
3646af
7465c5
* Sat Jun 15 2013 Paul Howarth <paul@city-fan.org> - 0.986-1
7465c5
- Update to 0.986 (typo fixes in docs)
7465c5
- Use metacpan URLs
7465c5
7465c5
* Thu Feb 21 2013 Paul Howarth <paul@city-fan.org> - 0.985-1
7465c5
- Update to 0.985 (documentation fixes)
7465c5
- Add patch to support building with Test::More < 0.88
7465c5
- Run the extra tests too
7465c5
- BR: perl(File::Find) and perl(File::Temp) for test suite
7465c5
- BR: perl(Test::Pod) for the extra tests
7465c5
7465c5
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.984-5
7465c5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
7465c5
7465c5
* Mon Oct 29 2012 Petr Pisar <ppisar@redhat.com> - 0.984-4
7465c5
- Specify all dependencies
7465c5
7465c5
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.984-3
7465c5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
7465c5
7465c5
* Wed Jun 13 2012 Petr Pisar <ppisar@redhat.com> - 0.984-2
7465c5
- Perl 5.16 rebuild
7465c5
7465c5
* Tue Jun  5 2012 Paul Howarth <paul@city-fan.org> - 0.984-1
7465c5
- Update to 0.984 (documentation fixes)
7465c5
- Add filters for provides/requires from the test suite
7465c5
- BR: perl(base) and perl(Exporter) for the test suite
7465c5
7465c5
* Sun Mar 18 2012 Paul Howarth <paul@city-fan.org> - 0.982-11
7465c5
- Drop %%defattr, redundant since rpm 4.4
7465c5
7465c5
* Sat Mar  3 2012 Paul Howarth <paul@city-fan.org> - 0.982-10
7465c5
- Explicitly require perl(Package::Generator)
7465c5
- Make %%files list more explicit
7465c5
- Mark POD files as %%doc
7465c5
- Use DESTDIR rather than PERL_INSTALL_ROOT
7465c5
- Don't need to remove empty directories from buildroot
7465c5
- Don't use macros for commands
7465c5
- Use tabs
7465c5
7465c5
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.982-9
7465c5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
7465c5
7465c5
* Wed Jun 29 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.982-8
7465c5
- Perl mass rebuild
7465c5
7465c5
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.982-7
7465c5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
7465c5
7465c5
* Wed Dec 22 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.982-6
7465c5
- Rebuild to fix problems with vendorarch/lib (#661697)
7465c5
7465c5
* Thu May 06 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.982-5
7465c5
- Mass rebuild with perl-5.12.0
7465c5
7465c5
* Mon Dec  7 2009 Stepan Kasal <skasal@redhat.com> - 0.982-4
7465c5
- Rebuild against perl 5.10.1
7465c5
7465c5
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.982-3
7465c5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
7465c5
7465c5
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.982-2
7465c5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
7465c5
7465c5
* Wed Feb 11 2009 Chris Weyl <cweyl@alumni.drew.edu> - 0.982-1
7465c5
- Update to 0.982
7465c5
7465c5
* Sun Oct 26 2008 Chris Weyl <cweyl@alumni.drew.edu> - 0.981-1
7465c5
- Update to 0.981
7465c5
7465c5
* Thu Oct 23 2008 Chris Weyl <cweyl@alumni.drew.edu> - 0.980-1
7465c5
- Update to 0.980
7465c5
7465c5
* Mon Jun 30 2008 Chris Weyl <cweyl@alumni.drew.edu> - 0.979-1
7465c5
- Update to 0.979
7465c5
- Drop BR's on: perl(Test::Pod::Coverage), perl(Test::Pod)
7465c5
7465c5
* Wed Feb 27 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.978-2
7465c5
- Rebuild for perl 5.10 (again)
7465c5
7465c5
* Thu Jan 24 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.978-1
7465c5
- Update to 0.978
7465c5
- Fix license tag
7465c5
- Rebuild for new perl
7465c5
7465c5
* Thu Aug 09 2007 Chris Weyl <cweyl@alumni.drew.edu> - 0.975-1
7465c5
- Update to 0.975
7465c5
7465c5
* Fri Jun 01 2007 Chris Weyl <cweyl@alumni.drew.edu> - 0.974-1
7465c5
- Update to 0.974
7465c5
7465c5
* Sat Dec 09 2006 Chris Weyl <cweyl@alumni.drew.edu> - 0.972-1
7465c5
- Update to 0.972
7465c5
7465c5
* Thu Sep 07 2006 Chris Weyl <cweyl@alumni.drew.edu> - 0.970-2
7465c5
- Bump
7465c5
7465c5
* Sat Sep 02 2006 Chris Weyl <cweyl@alumni.drew.edu> - 0.970-1
7465c5
- Specfile autogenerated by cpanspec 1.69.1