Name: perl-Test-MockTime-HiRes Version: 0.08 Release: 6%{?dist} Summary: Replaces actual time with simulated high resolution time License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/Test-MockTime-HiRes Source0: https://cpan.metacpan.org/authors/id/T/TA/TARAO/Test-MockTime-HiRes-%{version}.tar.gz BuildArch: noarch BuildRequires: coreutils BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(Config) BuildRequires: perl(Module::Build::Tiny) >= 0.035 BuildRequires: perl(strict) # Run-time BuildRequires: perl(Exporter) BuildRequires: perl(Test::MockTime) BuildRequires: perl(Test::More) BuildRequires: perl(Time::HiRes) BuildRequires: perl(warnings) # Tests BuildRequires: perl(AnyEvent) BuildRequires: perl(AnyEvent::Impl::Perl) BuildRequires: perl(parent) BuildRequires: perl(Test::Class) BuildRequires: perl(Test::Requires) %description Test::MockTime::HiRes is a Time::HiRes compatible version of Test::MockTime. You can wait milliseconds in simulated time. %package tests Summary: Tests for %{name} Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: perl-Test-Harness %description tests Tests from %{name}. Execute them with "%{_libexecdir}/%{name}/test". %prep %setup -q -n Test-MockTime-HiRes-%{version} # Help generators to recognize Perl scripts for F in t/*.t; do perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F" chmod +x "$F" done %build perl Build.PL --installdirs=vendor ./Build %install ./Build install --destdir=%{buildroot} --create_packlist=0 %{_fixperms} %{buildroot}/* # Install tests mkdir -p %{buildroot}%{_libexecdir}/%{name} cp -a t %{buildroot}%{_libexecdir}/%{name} 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}') ./Build test %files %license LICENSE %doc Changes README.md %dir %{perl_vendorlib}/Test %{perl_vendorlib}/Test/MockTime %{_mandir}/man3/Test::MockTime::* %files tests %{_libexecdir}/%{name} %changelog * Fri Jul 19 2024 Fedora Release Engineering - 0.08-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Thu Jan 25 2024 Fedora Release Engineering - 0.08-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Jan 21 2024 Fedora Release Engineering - 0.08-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jul 21 2023 Fedora Release Engineering - 0.08-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Fri Jan 20 2023 Fedora Release Engineering - 0.08-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Mon Jan 02 2023 Jitka Plesnikova 0.08-1 - Specfile autogenerated by cpanspec 1.78. - Package tests