263c83
# Run extra test
263c83
%bcond_without perl_Test_Requires_enables_extra_test
263c83
263c83
# Only need manual requires for "use base XXX;" prior to rpm 4.9
263c83
%global rpm49 0%(rpm --version | perl -p -e 's/^.* (\\d+)\\.(\\d+).*/sprintf("%d.%03d",$1,$2) ge 4.009 ? 1 : 0/e')
263c83
263c83
Name:		perl-Test-Requires
263c83
Summary:	Checks to see if a given module can be loaded
263c83
Version:	0.10
263c83
Release:	10%{?dist}
263c83
License:	GPL+ or Artistic
263c83
Group:		Development/Libraries
263c83
URL:		http://search.cpan.org/dist/Test-Requires
263c83
Source0:	http://search.cpan.org/CPAN/authors/id/T/TO/TOKUHIROM/Test-Requires-%{version}.tar.gz
263c83
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
263c83
BuildArch:	noarch
263c83
# Module Build
263c83
BuildRequires:	coreutils
263c83
BuildRequires:	findutils
263c83
BuildRequires:	make
263c83
BuildRequires:	perl-interpreter
263c83
BuildRequires:	perl-generators
263c83
BuildRequires:	perl(ExtUtils::MakeMaker) >= 6.64
263c83
# Module
263c83
BuildRequires:	perl(base)
263c83
BuildRequires:	perl(strict)
263c83
BuildRequires:	perl(Test::Builder::Module)
263c83
BuildRequires:	perl(warnings)
263c83
# Test Suite
263c83
BuildRequires:	perl(Data::Dumper)
263c83
BuildRequires:	perl(Test::More) >= 0.47
263c83
%if %{with perl_Test_Requires_enables_extra_test}
263c83
# Extra Tests
263c83
%if 0%{!?perl_bootstrap:1} && 0%{!?rhel:1}
263c83
# Test::Perl::Critic -> Perl::Critic -> PPIx::Regexp -> Test::Kwalitee ->
263c83
#   Module::CPANTS::Analyse -> Test::Warn -> Sub::Uplevel -> Pod::Wordlist::hanekomu -> Test::Requires
263c83
BuildRequires:	perl(Test::Perl::Critic)
263c83
%endif
263c83
%endif
263c83
# Runtime
263c83
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
263c83
%if ! %{rpm49}
263c83
Requires:	perl(Test::Builder::Module)
263c83
%endif
263c83
263c83
%description
263c83
Test::Requires checks to see if the module can be loaded.
263c83
263c83
If this fails, rather than failing tests this skips all tests.
263c83
263c83
%prep
263c83
%setup -q -n Test-Requires-%{version}
263c83
263c83
%build
263c83
perl Makefile.PL INSTALLDIRS=vendor
263c83
make %{?_smp_mflags}
263c83
263c83
%install
263c83
rm -rf %{buildroot}
263c83
make pure_install DESTDIR=%{buildroot}
263c83
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
263c83
%{_fixperms} %{buildroot}
263c83
263c83
%check
263c83
# note the "skipped" warnings indicate success :)
263c83
make test
263c83
%if %{with perl_Test_Requires_enables_extra_test}
263c83
make test TEST_FILES="xt/*.t"
263c83
%endif
263c83
263c83
%clean
263c83
rm -rf %{buildroot}
263c83
263c83
%files
263c83
%if 0%{?_licensedir:1}
263c83
%license LICENSE
263c83
%else
263c83
%doc LICENSE
263c83
%endif
263c83
%doc Changes README.md t/ xt/
263c83
%{perl_vendorlib}/Test/
263c83
%{_mandir}/man3/Test::Requires.3*
263c83
263c83
%changelog
263c83
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.10-10
263c83
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
263c83
263c83
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.10-9
263c83
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
263c83
263c83
* Wed Jun 07 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.10-8
263c83
- Perl 5.26 re-rebuild of bootstrapped packages
263c83
263c83
* Sun Jun 04 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.10-7
263c83
- Perl 5.26 rebuild
263c83
263c83
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.10-6
263c83
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
263c83
263c83
* Fri Jul 22 2016 Petr Pisar <ppisar@redhat.com> - 0.10-5
263c83
- Adapt RPM version detection to SRPM build root without perl
263c83
263c83
* Wed May 18 2016 Jitka Plesnikova <jplesnik@redhat.com> - 0.10-4
263c83
- Perl 5.24 re-rebuild of bootstrapped packages
263c83
263c83
* Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 0.10-3
263c83
- Perl 5.24 rebuild
263c83
263c83
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.10-2
263c83
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
263c83
263c83
* Tue Jul 21 2015 Paul Howarth <paul@city-fan.org> - 0.10-1
263c83
- Update to 0.10
263c83
  - Support 5.6 again
263c83
263c83
* Tue Jul 21 2015 Paul Howarth <paul@city-fan.org> - 0.09-1
263c83
- Update to 0.09
263c83
  - Requires 5.8.1
263c83
- Use %%license where possible
263c83
263c83
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.08-6
263c83
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
263c83
263c83
* Wed Jun 10 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.08-5
263c83
- Perl 5.22 re-rebuild of bootstrapped packages
263c83
263c83
* Wed Jun 03 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.08-4
263c83
- Perl 5.22 rebuild
263c83
263c83
* Sun Sep 07 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.08-3
263c83
- Perl 5.20 re-rebuild of bootstrapped packages
263c83
263c83
* Wed Aug 27 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.08-2
263c83
- Perl 5.20 rebuild
263c83
263c83
* Wed Jul 16 2014 Paul Howarth <paul@city-fan.org> - 0.08-1
263c83
- Update to 0.08
263c83
  - Switch to ExtUtils::MakeMaker
263c83
263c83
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.07-6
263c83
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
263c83
263c83
* Tue Feb 18 2014 Petr Pisar <ppisar@redhat.com> - 0.07-5
263c83
- Specify all dependencies (bug #1066077)
263c83
263c83
* Wed Aug 14 2013 Jitka Plesnikova <jplesnik@redhat.com> - 0.07-4
263c83
- Perl 5.18 re-rebuild of bootstrapped packages
263c83
263c83
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.07-3
263c83
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
263c83
263c83
* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 0.07-2
263c83
- Perl 5.18 rebuild
263c83
263c83
* Mon Jul  1 2013 Paul Howarth <paul@city-fan.org> - 0.07-1
263c83
- Update to 0.07
263c83
  - If the RELEASE_TESTING environment variable is true, then instead of
263c83
    skipping tests, Test::Requires bails out
263c83
  - Document that use Test::Requires "5.010" works
263c83
- Switch to Module::Build flow
263c83
- Classify buildreqs by usage
263c83
- Package upstream's new LICENSE and README.md files
263c83
- Drop obsoletes/provides of perl-Test-Requires-tests
263c83
263c83
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.06-10
263c83
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
263c83
263c83
* Sat Aug 25 2012 Paul Howarth <paul@city-fan.org> - 0.06-9
263c83
- BR: perl(base), perl(Cwd), perl(Data::Dumper)
263c83
- RHEL builds don't use Test::Spelling so they don't need dictionaries either
263c83
263c83
* Wed Aug 15 2012 Marcela Maslanova <mmaslano@redhat.com> - 0.06-8
263c83
- Conditionalize test packages
263c83
263c83
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.06-7
263c83
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
263c83
263c83
* Tue Jul 10 2012 Petr Pisar <ppisar@redhat.com> - 0.06-6
263c83
- Perl 5.16 re-rebuild of bootstrapped packages
263c83
263c83
* Tue Jun 12 2012 Petr Pisar <ppisar@redhat.com> - 0.06-5
263c83
- Perl 5.16 rebuild
263c83
263c83
* Thu Mar 22 2012 Paul Howarth <paul@city-fan.org> - 0.06-4
263c83
- Drop -tests subpackage (general lack of interest in this), but include
263c83
  them as documentation for the main package
263c83
- Don't need explicit runtime dependency on perl(Test::Builder::Module) if we
263c83
  have rpm ≥ 4.9 as it can auto-detect it
263c83
- BR: at least version 0.61 of perl(Test::More) as per upstream
263c83
- Drop unnecessary version requirement for perl(ExtUtils::MakeMaker)
263c83
- Drop redundant %%{?perl_default_filter}
263c83
- BR: aspell-en rather than hunspell-en on old distributions where
263c83
  Test::Spelling uses aspell instead of hunspell
263c83
- Don't BR: perl(Test::Perl::Critic) when bootstrapping
263c83
- Don't use macros for commands
263c83
- Don't need to remove empty directories from buildroot
263c83
- Make %%files list more explicit
263c83
- Drop %%defattr, redundant since rpm 4.4
263c83
- Use tabs
263c83
263c83
* Wed Aug 17 2011 Paul Howarth <paul@city-fan.org> - 0.06-3
263c83
- BR: hunspell-en rather than aspell-en (#731272)
263c83
263c83
* Thu Nov 18 2010 Paul Howarth <paul@city-fan.org> - 0.06-2
263c83
- Run release tests as well as standard test suite in %%check
263c83
- Drop no-longer-needed buildreq perl(Filter::Util::Call)
263c83
- New buildreqs perl(Test::Perl::Critic), perl(Test::Pod), perl(Test::Spelling)
263c83
263c83
* Tue Oct 05 2010 Iain Arnell <iarnell@gmail.com> - 0.06-1
263c83
- Update to latest upstream version
263c83
263c83
* Fri May 07 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.03-2
263c83
- Mass rebuild with perl-5.12.0
263c83
263c83
* Sat Mar 20 2010 Chris Weyl <cweyl@alumni.drew.edu> - 0.03-1
263c83
- Specfile by Fedora::App::MaintainerTools 0.006
263c83
263c83