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