efa546
# Only need manual requires for "use base XXX;" prior to rpm 4.9
efa546
%global rpm49 %(rpm --version | perl -pi -e 's/^.* (\\d+)\\.(\\d+).*/sprintf("%d.%03d",$1,$2) ge 4.009 ? 1 : 0/e')
efa546
efa546
Name:		perl-Test-Requires
efa546
Summary:	Checks to see if a given module can be loaded
efa546
Version:	0.06
98d18d
Release:	10%{?dist}
efa546
License:	GPL+ or Artistic
efa546
Group:		Development/Libraries
efa546
URL:		http://search.cpan.org/dist/Test-Requires
efa546
Source0:	http://search.cpan.org/CPAN/authors/id/T/TO/TOKUHIROM/Test-Requires-%{version}.tar.gz
efa546
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
efa546
BuildArch:	noarch
efa546
BuildRequires:	perl(base)
efa546
BuildRequires:	perl(Cwd)
efa546
BuildRequires:	perl(Data::Dumper)
efa546
BuildRequires:	perl(ExtUtils::MakeMaker)
efa546
BuildRequires:	perl(Test::Builder::Module)
efa546
BuildRequires:	perl(Test::More) >= 0.61
efa546
%if ! ( 0%{?rhel} )
efa546
# Test::Perl::Critic -> Perl::Critic -> PPIx::Regexp -> Test::Kwalitee ->
efa546
#   Module::CPANTS::Analyse -> Test::Warn -> Sub::Uplevel -> Pod::Wordlist::hanekomu -> Test::Requires
efa546
%if 0%{!?perl_bootstrap:1}
efa546
BuildRequires:	perl(Test::Perl::Critic)
efa546
%endif
efa546
BuildRequires:	perl(Test::Pod)
efa546
BuildRequires:	perl(Test::Spelling)
efa546
%if %(perl -e 'print $] >= 5.010 ? 1 : 0;')
efa546
BuildRequires:	hunspell-en
efa546
%else
efa546
BuildRequires:	aspell-en
efa546
%endif
efa546
%endif
efa546
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
efa546
%if ! %{rpm49}
efa546
Requires:	perl(Test::Builder::Module)
efa546
%endif
efa546
efa546
# Obsolete/provide old -tests subpackage (can be removed in F19 development cycle)
efa546
Obsoletes:	%{name}-tests < %{version}-%{release}
efa546
Provides:	%{name}-tests = %{version}-%{release}
efa546
efa546
%description
efa546
Test::Requires checks to see if the module can be loaded.
efa546
efa546
If this fails, rather than failing tests this skips all tests.
efa546
efa546
%prep
efa546
%setup -q -n Test-Requires-%{version}
efa546
efa546
%build
efa546
perl Makefile.PL INSTALLDIRS=vendor
efa546
make %{?_smp_mflags}
efa546
efa546
%install
efa546
rm -rf %{buildroot}
efa546
make pure_install DESTDIR=%{buildroot}
efa546
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
efa546
%{_fixperms} %{buildroot}
efa546
efa546
%check
efa546
# note the "skipped" warnings indicate success :)
efa546
make test
efa546
make test TEST_FILES="xt/*.t"
efa546
efa546
%clean
efa546
rm -rf %{buildroot}
efa546
efa546
%files
efa546
%doc Changes README t/ xt/
efa546
%{perl_vendorlib}/Test/
efa546
%{_mandir}/man3/Test::Requires.3pm*
efa546
efa546
%changelog
98d18d
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.06-10
98d18d
- Mass rebuild 2013-12-27
98d18d
efa546
* Sat Aug 25 2012 Paul Howarth <paul@city-fan.org> - 0.06-9
efa546
- BR: perl(base), perl(Cwd), perl(Data::Dumper)
efa546
- RHEL builds don't use Test::Spelling so they don't need dictionaries either
efa546
efa546
* Wed Aug 15 2012 Marcela Maslanova <mmaslano@redhat.com> - 0.06-8
efa546
- Conditionalize test packages
efa546
efa546
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.06-7
efa546
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
efa546
efa546
* Tue Jul 10 2012 Petr Pisar <ppisar@redhat.com> - 0.06-6
efa546
- Perl 5.16 re-rebuild of bootstrapped packages
efa546
efa546
* Tue Jun 12 2012 Petr Pisar <ppisar@redhat.com> - 0.06-5
efa546
- Perl 5.16 rebuild
efa546
efa546
* Thu Mar 22 2012 Paul Howarth <paul@city-fan.org> - 0.06-4
efa546
- Drop -tests subpackage (general lack of interest in this), but include
efa546
  them as documentation for the main package
efa546
- Don't need explicit runtime dependency on perl(Test::Builder::Module) if we
efa546
  have rpm ≥ 4.9 as it can auto-detect it
efa546
- BR: at least version 0.61 of perl(Test::More) as per upstream
efa546
- Drop unnecessary version requirement for perl(ExtUtils::MakeMaker)
efa546
- Drop redundant %%{?perl_default_filter}
efa546
- BR: aspell-en rather than hunspell-en on old distributions where
efa546
  Test::Spelling uses aspell instead of hunspell
efa546
- Don't BR: perl(Test::Perl::Critic) when bootstrapping
efa546
- Don't use macros for commands
efa546
- Don't need to remove empty directories from buildroot
efa546
- Make %%files list more explicit
efa546
- Drop %%defattr, redundant since rpm 4.4
efa546
- Use tabs
efa546
efa546
* Wed Aug 17 2011 Paul Howarth <paul@city-fan.org> - 0.06-3
efa546
- BR: hunspell-en rather than aspell-en (#731272)
efa546
efa546
* Thu Nov 18 2010 Paul Howarth <paul@city-fan.org> - 0.06-2
efa546
- Run release tests as well as standard test suite in %%check
efa546
- Drop no-longer-needed buildreq perl(Filter::Util::Call)
efa546
- New buildreqs perl(Test::Perl::Critic), perl(Test::Pod), perl(Test::Spelling)
efa546
efa546
* Tue Oct 05 2010 Iain Arnell <iarnell@gmail.com> - 0.06-1
efa546
- Update to latest upstream version
efa546
efa546
* Fri May 07 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.03-2
efa546
- Mass rebuild with perl-5.12.0
efa546
efa546
* Sat Mar 20 2010 Chris Weyl <cweyl@alumni.drew.edu> - 0.03-1
efa546
- Specfile by Fedora::App::MaintainerTools 0.006
efa546
efa546