3 %bcond_without prof # profiling library
6 Summary: Implementations of the SHA suite of message digest functions
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/SHA
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: f2a26839057b5e4fd53b8f6a41b88553
15 URL: http://hackage.haskell.org/package/SHA
16 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-prof
20 BuildRequires: rpmbuild(macros) >= 1.608
22 Requires(post,postun): /usr/bin/ghc-pkg
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 # debuginfo is not useful for ghc
26 %define _enable_debug_packages 0
28 # don't compress haddock files
29 %define _noautocompressdoc *.haddock
32 This library implements the SHA suite of message digest functions,
33 according to NIST FIPS 180-2 (with the SHA-224 addendum), as well as
34 the SHA-based HMAC routines. The functions have been tested against
35 most of the NIST and RFC test vectors for the various functions.
36 While some attention has been paid to performance, these do not
37 presently reach the speed of well-tuned libraries, like OpenSSL.
40 Summary: Profiling %{pkgname} library for GHC
41 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
42 Group: Development/Libraries
43 Requires: %{name} = %{version}-%{release}
46 Profiling %{pkgname} library for GHC. Should be installed when
47 GHC's profiling subsystem is needed.
49 %description prof -l pl.UTF-8
50 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
51 kiedy potrzebujemy systemu profilującego z GHC.
54 %setup -q -n %{pkgname}-%{version}
57 runhaskell Setup.hs configure -v2 \
58 %{?with_prof:--enable-library-profiling} \
61 --libexecdir=%{_libexecdir} \
62 --docdir=%{_docdir}/%{name}-%{version}
64 runhaskell Setup.hs build
65 runhaskell Setup.hs haddock --executables
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
71 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
73 # work around automatic haddock docs installation
74 %{__rm} -rf %{name}-%{version}-doc
75 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
76 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
78 runhaskell Setup.hs register \
79 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
82 rm -rf $RPM_BUILD_ROOT
91 %defattr(644,root,root,755)
92 %doc %{name}-%{version}-doc/*
93 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
94 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
95 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
96 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
97 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
99 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
100 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest
101 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest/Pure
102 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest/Pure/*.hi
103 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest/Pure/*.dyn_hi
107 %defattr(644,root,root,755)
108 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
109 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest/Pure/*.p_hi