File ghc-mersenne-random.spec of Package ghc-mersenne-random
#
# spec file for package ghc-mersenne-random
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%global pkg_name mersenne-random
Name: ghc-%{pkg_name}
Version: 1.0.0.1
Release: 0
Summary: Generate high quality pseudorandom numbers using a SIMD Fast Mersenne Twister
License: BSD-3-Clause
Group: Development/Libraries/Haskell
URL: https://hackage.haskell.org/package/%{pkg_name}
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-old-time-devel
BuildRequires: ghc-rpm-macros
%description
The Mersenne twister is a pseudorandom number generator developed by Makoto
Matsumoto and Takuji Nishimura that is based on a matrix linear recurrence over
a finite binary field. It provides for fast generation of very high quality
pseudorandom numbers
This library uses SFMT, the SIMD-oriented Fast Mersenne Twister, a variant of
Mersenne Twister that is much faster than the original. It is designed to be
fast when it runs on 128-bit SIMD. It can be compiled with either SSE2 and
PowerPC AltiVec support, to take advantage of these instructions.
> cabal install -fuse_sse2
On an x86 system, for performance win.
By default the period of the function is 2^19937-1, however, you can compile in
other defaults. Note that this algorithm on its own is not cryptographically
secure.
For more information about the algorithm and implementation, see the SFMT
homepage,
<http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html>
and, Mutsuo Saito and Makoto Matsumoto, /SIMD-oriented Fast Mersenne Twister: a
128-bit Pseudorandom Number Generator/, in the Proceedings of MCQMC2006, here:
<http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/ARTICLES/sfmt.pdf> .
%package devel
Summary: Haskell %{pkg_name} library development files
Group: Development/Libraries/Haskell
Requires: %{name} = %{version}-%{release}
Requires: ghc-compiler = %{ghc_version}
Requires(post): ghc-compiler = %{ghc_version}
Requires(postun): ghc-compiler = %{ghc_version}
%description devel
This package provides the Haskell %{pkg_name} library development
files.
%prep
%setup -q -n %{pkg_name}-%{version}
%build
%ghc_lib_build
%install
%ghc_lib_install
%post devel
%ghc_pkg_recache
%postun devel
%ghc_pkg_recache
%files -f %{name}.files
%doc LICENSE
%files devel -f %{name}-devel.files
%doc LICENSE.sfmt readme todo
%changelog