# Perform optional tests %bcond_without perl_Math_Prime_XS_enables_optional_test Name: perl-Math-Prime-XS Version: 0.27 Release: 26%{?dist} Summary: Detect and calculate prime numbers with deterministic tests License: GPL+ or Artistic URL: https://metacpan.org/release/Math-Prime-XS Source0: https://cpan.metacpan.org/authors/id/K/KR/KRYDE/Math-Prime-XS-%{version}.tar.gz BuildRequires: coreutils BuildRequires: findutils BuildRequires: gcc BuildRequires: make BuildRequires: perl-devel BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 # Run-time: BuildRequires: perl(base) BuildRequires: perl(boolean) BuildRequires: perl(Carp) BuildRequires: perl(Exporter) BuildRequires: perl(Params::Validate) BuildRequires: perl(Scalar::Util) BuildRequires: perl(strict) BuildRequires: perl(warnings) BuildRequires: perl(XSLoader) # Tests: BuildRequires: perl(Config) BuildRequires: perl(POSIX) BuildRequires: perl(Test::More) %if %{with perl_Math_Prime_XS_enables_optional_test} # Optional tests: BuildRequires: perl(Test::Pod) >= 1.14 BuildRequires: perl(Test::Pod::Coverage) >= 1.04 %endif %description Math::Prime::XS detects and calculates prime numbers by either applying Modulo operator division, the Sieve of Eratosthenes, a Summation calculation or Trial division. %package tests Summary: Tests for %{name} BuildArch: noarch Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: perl-Test-Harness Requires: perl(Config) Requires: perl(POSIX) %description tests Tests from %{name}. Execute them with "%{_libexecdir}/%{name}/test". %prep %setup -q -n Math-Prime-XS-%{version} %if !%{with perl_Math_Prime_XS_enables_optional_test} for F in t/pod.t t/pod-coverage.t; do rm "$F" perl -i -ne 'print $_ unless m{\A\Q'"$F"'\E}' MANIFEST done %endif chmod +x t/*.t %build perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_OPT_FLAGS" %{make_build} %install %{make_install} find %{buildroot} -type f -name '*.bs' -size 0 -delete %{_fixperms} %{buildroot}/* # Install tests mkdir -p %{buildroot}%{_libexecdir}/%{name} cp -a t %{buildroot}%{_libexecdir}/%{name} %if %{with perl_Math_Prime_XS_enables_optional_test} for F in t/pod.t t/pod-coverage.t; do rm %{buildroot}%{_libexecdir}/%{name}/"$F" done %endif cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF' #!/bin/sh cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)" EOF chmod +x %{buildroot}%{_libexecdir}/%{name}/test %check export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}') make test %files %doc Changes devel README %{perl_vendorarch}/auto/* %{perl_vendorarch}/Math* %{_mandir}/man3/* %files tests %{_libexecdir}/%{name} %changelog * Thu Jan 25 2024 Fedora Release Engineering - 0.27-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Jan 21 2024 Fedora Release Engineering - 0.27-25 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Thu Jul 20 2023 Fedora Release Engineering - 0.27-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Tue Jul 11 2023 Jitka Plesnikova - 0.27-23 - Perl 5.38 rebuild * Fri Jan 20 2023 Fedora Release Engineering - 0.27-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 0.27-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Wed Jun 01 2022 Jitka Plesnikova - 0.27-20 - Perl 5.36 rebuild * Thu Mar 10 2022 Petr Pisar - 0.27-19 - Modernize a spec file - Package the tests * Fri Jan 21 2022 Fedora Release Engineering - 0.27-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Jul 22 2021 Fedora Release Engineering - 0.27-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri May 21 2021 Jitka Plesnikova - 0.27-16 - Perl 5.34 rebuild * Wed Jan 27 2021 Fedora Release Engineering - 0.27-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Tue Jul 28 2020 Fedora Release Engineering - 0.27-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue Jun 23 2020 Jitka Plesnikova - 0.27-13 - Perl 5.32 rebuild * Thu Jan 30 2020 Fedora Release Engineering - 0.27-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Fri Jul 26 2019 Fedora Release Engineering - 0.27-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Fri May 31 2019 Jitka Plesnikova - 0.27-10 - Perl 5.30 rebuild * Fri Feb 01 2019 Fedora Release Engineering - 0.27-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Fri Jul 13 2018 Fedora Release Engineering - 0.27-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Fri Jun 29 2018 Jitka Plesnikova - 0.27-7 - Perl 5.28 rebuild * Thu Feb 08 2018 Fedora Release Engineering - 0.27-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Aug 03 2017 Fedora Release Engineering - 0.27-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 0.27-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Mon Jun 05 2017 Jitka Plesnikova - 0.27-3 - Perl 5.26 rebuild * Sat Feb 11 2017 Fedora Release Engineering - 0.27-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Jitka Plesnikova - 0.27-1 - 0.27 bump * Sun May 15 2016 Jitka Plesnikova - 0.26-16 - Perl 5.24 rebuild * Thu Feb 04 2016 Fedora Release Engineering - 0.26-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Jun 18 2015 Fedora Release Engineering - 0.26-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 06 2015 Jitka Plesnikova - 0.26-13 - Perl 5.22 rebuild * Fri Aug 29 2014 Jitka Plesnikova - 0.26-12 - Perl 5.20 rebuild * Sun Aug 17 2014 Fedora Release Engineering - 0.26-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 0.26-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sat Aug 03 2013 Fedora Release Engineering - 0.26-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Jul 25 2013 Petr Pisar - 0.26-8 - Perl 5.18 rebuild * Thu Feb 14 2013 Fedora Release Engineering - 0.26-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Mon Dec 31 2012 Miro Hrončok - 0.26-6 - Removed xt from doc * Sun Dec 30 2012 Miro Hrončok - 0.26-5 - Removed deleting empty directories - Removed run-time Test Requires - Added previously removed BRs * Fri Nov 16 2012 Miro Hrončok - 0.26-4 - Removed BRs provided by perl package * Sun Oct 07 2012 Miro Hrončok 0.26-3 - Rebuilding for 32bit, no spec changes. * Sun Sep 23 2012 Miro Hrončok 0.26-2 - Removed useless require. * Sun Sep 23 2012 Miro Hrončok 0.26-1 - Specfile autogenerated by cpanspec 1.78 and revised.