diff --git a/.gitignore b/.gitignore index e69de29..82ddec4 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/Test-MockRandom-1.01.tar.gz diff --git a/perl-Test-MockRandom.spec b/perl-Test-MockRandom.spec new file mode 100644 index 0000000..46dc915 --- /dev/null +++ b/perl-Test-MockRandom.spec @@ -0,0 +1,58 @@ +Name: perl-Test-MockRandom +Version: 1.01 +Release: 1%{?dist} +Summary: Replaces random number generation with non-random number generation +License: ASL 2.0 +URL: http://search.cpan.org/dist/Test-MockRandom/ +Source0: http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Test-MockRandom-%{version}.tar.gz +BuildArch: noarch +BuildRequires: make +BuildRequires: perl +BuildRequires: perl-generators +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 +BuildRequires: perl(strict) +BuildRequires: perl(warnings) +# Run-time +BuildRequires: perl(Carp) +# Tests +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(lib) +BuildRequires: perl(List::Util) +BuildRequires: perl(Test::More) +BuildRequires: perl(version) +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) + +%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 NO_PACKLIST=1 +make %{?_smp_mflags} + +%install +make pure_install DESTDIR=$RPM_BUILD_ROOT +%{_fixperms} $RPM_BUILD_ROOT/* + +%check +make test + +%files +%doc CONTRIBUTING Changes examples README +%license LICENSE +%{perl_vendorlib}/* +%{_mandir}/man3/* + +%changelog +* Fri Aug 12 2016 Jitka Plesnikova - 1.01-1 +- Initial release diff --git a/sources b/sources index e69de29..48c6f76 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +5ea7e2ec70776129993721f7632d04da Test-MockRandom-1.01.tar.gz