3 %bcond_without prof # profiling library
5 Summary: splitmix: Fast Splittable PRNG
10 Group: Development/Languages
11 #Source0Download: http://hackage.haskell.org/package/splitmix
12 Source0: http://hackage.haskell.org/package/splitmix-%{version}/splitmix-%{version}.tar.gz
13 # Source0-md5: a6d7539078d2c88de87f73756939dee4
14 URL: http://hackage.haskell.org/package/splitmix
16 BuildRequires: ghc-random
18 BuildRequires: ghc-prof >= 6.12.3
19 BuildRequires: ghc-random-prof
21 BuildRequires: rpmbuild(macros) >= 1.608
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 # debuginfo is not useful for ghc
27 %define _enable_debug_packages 0
29 # don't compress haddock files
30 %define _noautocompressdoc *.haddock
33 Pure Haskell implementation of SplitMix described in
35 Guy L. Steele, Jr., Doug Lea, and Christine H. Flood. 2014.
36 Fast splittable pseudorandom number generators. In Proceedings of the
37 2014 ACM International Conference on Object Oriented Programming
38 Systems Languages & Applications (OOPSLA '14). ACM, New York, NY, USA,
39 453-472. DOI: https://doi.org/10.1145/2660193.2660195
42 Summary: Profiling splitmix library for GHC
43 Summary(pl.UTF-8): Biblioteka profilująca splitmix dla GHC
44 Group: Development/Libraries
45 Requires: %{name} = %{version}-%{release}
46 Requires: ghc-random-prof
49 Profiling splitmix library for GHC. Should be installed when
50 GHC's profiling subsystem is needed.
52 %description prof -l pl.UTF-8
53 Biblioteka profilująca splitmix dla GHC. Powinna być zainstalowana
54 kiedy potrzebujemy systemu profilującego z GHC.
57 %setup -q -n splitmix-%{version}
60 runhaskell Setup.hs configure -v2 \
61 %{?with_prof:--enable-library-profiling} \
64 --libexecdir=%{_libexecdir} \
65 --docdir=%{_docdir}/%{name}-%{version}
67 runhaskell Setup.hs build
68 runhaskell Setup.hs haddock --executables
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
74 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
76 # work around automatic haddock docs installation
77 rm -rf %{name}-%{version}-doc
78 %{__mv} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
80 runhaskell Setup.hs register \
81 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/splitmix.conf
84 rm -rf $RPM_BUILD_ROOT
93 %defattr(644,root,root,755)
94 %doc Changelog.md LICENSE README.md %{name}-%{version}-doc/html
95 %{_libdir}/%{ghcdir}/package.conf.d/splitmix.conf
96 %dir %{_libdir}/%{ghcdir}/splitmix-%{version}
97 %{_libdir}/%{ghcdir}/splitmix-%{version}/libHSsplitmix-%{version}-*.so
98 %{_libdir}/%{ghcdir}/splitmix-%{version}/libHSsplitmix-%{version}-*.a
99 %exclude %{_libdir}/%{ghcdir}/splitmix-%{version}/libHSsplitmix-%{version}-*_p.a
100 %dir %{_libdir}/%{ghcdir}/splitmix-%{version}/Data
101 %dir %{_libdir}/%{ghcdir}/splitmix-%{version}/Data/Bits
102 %{_libdir}/%{ghcdir}/splitmix-%{version}/Data/Bits/*.hi
103 %{_libdir}/%{ghcdir}/splitmix-%{version}/Data/Bits/*.dyn_hi
104 %dir %{_libdir}/%{ghcdir}/splitmix-%{version}/System
105 %dir %{_libdir}/%{ghcdir}/splitmix-%{version}/System/Random
106 %{_libdir}/%{ghcdir}/splitmix-%{version}/System/Random/*.hi
107 %{_libdir}/%{ghcdir}/splitmix-%{version}/System/Random/*.dyn_hi
111 %defattr(644,root,root,755)
112 %{_libdir}/%{ghcdir}/splitmix-%{version}/libHSsplitmix-%{version}-*_p.a
113 %{_libdir}/%{ghcdir}/splitmix-%{version}/Data/Bits/*.p_hi
114 %{_libdir}/%{ghcdir}/splitmix-%{version}/System/Random/*.p_hi