Name: perl-Test-MockRandom Version: 1.01 Release: 1%{?org_tag}%{?dist} Summary: Replaces random number generation with non-random number generation License: Apache Software License Group: Development/Libraries URL: http://search.cpan.org/dist/Test-MockRandom/ Source0: http://localhost/cpan/authors/id/D/DA/DAGOLDEN/Test-MockRandom-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: perl-interpreter BuildRequires: perl-devel BuildRequires: perl-generators BuildRequires: perl >= 0:5.006 BuildRequires: perl(Carp) BuildRequires: perl(CPAN::Meta) BuildRequires: perl(CPAN::Meta::Requirements) BuildRequires: perl(ExtUtils::MakeMaker) >= 6.17 BuildRequires: perl(ExtUtils::Manifest) BuildRequires: perl(File::Spec::Functions) BuildRequires: perl(List::Util) BuildRequires: perl(Pod::Man) BuildRequires: perl(Test::More) BuildRequires: perl(version) Requires: perl(Carp) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Autoreq: no %if %{rhel} >= 8 Provides: perl(Test::MockRandom) = %{version} %endif %description This perhaps ridiculous-seeming module was created to test routines that manipulate random numbers by providing a known output from rand. Given a list of seeds with srand, it will return each in turn. After seeded random numbers are exhausted, it will always return 0. Seed numbers must be of a form that meets the expected output from rand as called with no arguments -- i.e. they must be between 0 (inclusive) and 1 (exclusive). In order to facilitate generating and testing a nearly-one number, this module exports the function oneish, which returns a number just fractionally less than one. %prep %setup -q -n Test-MockRandom-%{version} %build %{__perl} Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install rm -rf %{buildroot} make pure_install PERL_INSTALL_ROOT=%{buildroot} find %{buildroot} -type f -name .packlist -exec rm -f {} \; find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \; %{_fixperms} %{buildroot}/* %check make test %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc Changes CONTRIBUTING cpanfile dist.ini LICENSE META.json perlcritic.rc README tidyall.ini %{perl_vendorlib}/* %{_mandir}/man3/* %changelog * Tue Dec 15 2015 Gavin Carr 1.01-1 - Specfile autogenerated by cpanspec 1.79.