]> git.pld-linux.org Git - packages/ghc-splitmix.git/blob - ghc-splitmix.spec
82aa278e47b96a09bbd9c8d42d87a5f05f9d86b2
[packages/ghc-splitmix.git] / ghc-splitmix.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 Summary:        splitmix: Fast Splittable PRNG
6 Name:           ghc-splitmix
7 Version:        0.0.4
8 Release:        2
9 License:        BSD
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
15 BuildRequires:  ghc
16 BuildRequires:  ghc-random
17 %if %{with prof}
18 BuildRequires:  ghc-prof >= 6.12.3
19 BuildRequires:  ghc-random-prof
20 %endif
21 BuildRequires:  rpmbuild(macros) >= 1.608
22 %requires_eq    ghc
23 Requires:       ghc-random
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 # debuginfo is not useful for ghc
27 %define         _enable_debug_packages  0
28
29 # don't compress haddock files
30 %define         _noautocompressdoc      *.haddock
31
32 %description
33 Pure Haskell implementation of SplitMix described in
34
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
40
41 %package prof
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
47
48 %description prof
49 Profiling splitmix library for GHC.  Should be installed when
50 GHC's profiling subsystem is needed.
51
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.
55
56 %prep
57 %setup -q -n splitmix-%{version}
58
59 %build
60 runhaskell Setup.hs configure -v2 \
61         %{?with_prof:--enable-library-profiling} \
62         --prefix=%{_prefix} \
63         --libdir=%{_libdir} \
64         --libexecdir=%{_libexecdir} \
65         --docdir=%{_docdir}/%{name}-%{version}
66
67 runhaskell Setup.hs build
68 runhaskell Setup.hs haddock --executables
69
70 %install
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
73
74 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
75
76 # work around automatic haddock docs installation
77 rm -rf %{name}-%{version}-doc
78 %{__mv} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
79
80 runhaskell Setup.hs register \
81         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/splitmix.conf
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %post
87 %ghc_pkg_recache
88
89 %postun
90 %ghc_pkg_recache
91
92 %files
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
108
109 %if %{with prof}
110 %files prof
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
115 %endif
This page took 0.072327 seconds and 2 git commands to generate.