|
|
f456730 |
# https://fedoraproject.org/wiki/Packaging:Haskell
|
|
|
f456730 |
|
|
|
f456730 |
%global pkg_name tf-random
|
|
|
f456730 |
|
|
|
f456730 |
Name: ghc-%{pkg_name}
|
|
|
f456730 |
Version: 0.5
|
|
|
e46de08 |
Release: 4%{?dist}
|
|
|
f456730 |
Summary: High-quality splittable pseudorandom number generator
|
|
|
f456730 |
|
|
|
f456730 |
# main license is BSD
|
|
|
f456730 |
# brg_types.h is BSD and optionally GPL+
|
|
|
f456730 |
# C code by Doug Whiting is Public Domain
|
|
|
f456730 |
License: BSD and Public Domain
|
|
|
f456730 |
Url: https://hackage.haskell.org/package/%{pkg_name}
|
|
|
f456730 |
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
|
|
|
f456730 |
|
|
|
f456730 |
BuildRequires: ghc-Cabal-devel
|
|
|
f456730 |
BuildRequires: ghc-rpm-macros
|
|
|
f456730 |
# Begin cabal-rpm deps:
|
|
|
f456730 |
BuildRequires: ghc-primitive-devel
|
|
|
f456730 |
BuildRequires: ghc-random-devel
|
|
|
f456730 |
BuildRequires: ghc-time-devel
|
|
|
f456730 |
# End cabal-rpm deps
|
|
|
f456730 |
|
|
|
f456730 |
%description
|
|
|
f456730 |
This package contains an implementation of a high-quality splittable
|
|
|
f456730 |
pseudorandom number generator. The generator is based on a cryptographic hash
|
|
|
f456730 |
function built on top of the ThreeFish block cipher. See the paper /Splittable
|
|
|
f456730 |
Pseudorandom Number Generators Using Cryptographic Hashing/ by Claessen, Pałka
|
|
|
f456730 |
for details and the rationale of the design.
|
|
|
f456730 |
|
|
|
f456730 |
The package provides the following:
|
|
|
f456730 |
|
|
|
f456730 |
* A splittable PRNG that implements the standard 'System.Random.RandomGen'
|
|
|
f456730 |
class.
|
|
|
f456730 |
|
|
|
f456730 |
* The generator also implements an alternative version of the
|
|
|
f456730 |
'System.Random.TF.Gen.RandomGen' class (exported from "System.Random.TF.Gen"),
|
|
|
f456730 |
which requires the generator to return pseudorandom integers from the full
|
|
|
f456730 |
32-bit range, and contains an n-way split function.
|
|
|
f456730 |
|
|
|
f456730 |
* An alternative version of the 'Random' class is provided, which is linked to
|
|
|
f456730 |
the new 'RandomGen' class, together with 'Random' instances for some integral
|
|
|
f456730 |
types.
|
|
|
f456730 |
|
|
|
f456730 |
* Two functions for initialising the generator with a non-deterministic seed:
|
|
|
f456730 |
one using the system time, and one using the '/dev/urandom' UNIX special file.
|
|
|
f456730 |
|
|
|
f456730 |
The package uses an adapted version of the reference C implementation of
|
|
|
f456730 |
ThreeFish from the reference package of the Skein hash function
|
|
|
f456730 |
(<https://www.schneier.com/skein.html>), originally written by Doug Whiting.
|
|
|
f456730 |
|
|
|
f456730 |
Please note that even though the generator provides very high-quality
|
|
|
f456730 |
pseudorandom numbers, it has not been designed with cryptographic applications
|
|
|
f456730 |
in mind.
|
|
|
f456730 |
|
|
|
f456730 |
|
|
|
f456730 |
%package devel
|
|
|
f456730 |
Summary: Haskell %{pkg_name} library development files
|
|
|
f456730 |
Provides: %{name}-static = %{version}-%{release}
|
|
|
f456730 |
Requires: ghc-compiler = %{ghc_version}
|
|
|
f456730 |
Requires(post): ghc-compiler = %{ghc_version}
|
|
|
f456730 |
Requires(postun): ghc-compiler = %{ghc_version}
|
|
|
f456730 |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
f456730 |
|
|
|
f456730 |
%description devel
|
|
|
f456730 |
This package provides the Haskell %{pkg_name} library development files.
|
|
|
f456730 |
|
|
|
f456730 |
|
|
|
f456730 |
%prep
|
|
|
f456730 |
%setup -q -n %{pkg_name}-%{version}
|
|
|
f456730 |
|
|
|
f456730 |
|
|
|
f456730 |
%build
|
|
|
f456730 |
# for haddock
|
|
|
f456730 |
export LANG=en_US.utf8
|
|
|
f456730 |
%ghc_lib_build
|
|
|
f456730 |
|
|
|
f456730 |
|
|
|
f456730 |
%install
|
|
|
f456730 |
%ghc_lib_install
|
|
|
f456730 |
|
|
|
fe87ac5 |
rm %{buildroot}/%{ghc_pkgdocdir}/LICENSE
|
|
|
f456730 |
|
|
|
f456730 |
|
|
|
f456730 |
%post devel
|
|
|
f456730 |
%ghc_pkg_recache
|
|
|
f456730 |
|
|
|
f456730 |
|
|
|
f456730 |
%postun devel
|
|
|
f456730 |
%ghc_pkg_recache
|
|
|
f456730 |
|
|
|
f456730 |
|
|
|
f456730 |
%files -f %{name}.files
|
|
|
f456730 |
%license LICENSE LICENSE.tf LICENSE.brg
|
|
|
f456730 |
|
|
|
f456730 |
|
|
|
f456730 |
%files devel -f %{name}-devel.files
|
|
|
f456730 |
%doc ChangeLog
|
|
|
f456730 |
|
|
|
f456730 |
|
|
|
f456730 |
%changelog
|
|
|
e46de08 |
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-4
|
|
|
e46de08 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
e46de08 |
|
|
|
63e866f |
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-3
|
|
|
63e866f |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
63e866f |
|
|
|
f456730 |
* Tue Mar 3 2015 Jens Petersen <petersen@redhat.com> - 0.5-2
|
|
|
f456730 |
- some of the C code is Public Domain (#1196960)
|
|
|
f456730 |
|
|
|
f456730 |
* Fri Feb 27 2015 Jens Petersen <petersen@redhat.com> - 0.5-1
|
|
|
f456730 |
- improve filelists
|
|
|
f456730 |
|
|
|
f456730 |
* Mon Feb 9 2015 Fedora Haskell SIG <haskell@lists.fedoraproject.org> - 0.5
|
|
|
f456730 |
- spec file generated by cabal-rpm-0.9.3
|