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