3 %bcond_without prof # profiling library
6 Summary: Various cryptographic hashes for bytestrings; CRC32 and Adler32 for now
7 Summary(pl.UTF-8): Różne kryptograficzne skróty łańcuchów bajtów: CRC32 i Adler32
12 Group: Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/digest
14 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5: 83ed3d8c10d24c88d5ddf4f3914507ac
16 URL: http://hackage.haskell.org/package/digest
17 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-base >= 2.2
19 BuildRequires: ghc-base < 5
20 BuildRequires: ghc-bytestring >= 0.9
22 BuildRequires: ghc-prof >= 6.12.3
23 BuildRequires: ghc-base-prof >= 2.2
24 BuildRequires: ghc-base-prof < 5
25 BuildRequires: ghc-bytestring-prof >= 0.9
27 BuildRequires: rpmbuild(macros) >= 1.608
28 BuildRequires: zlib-devel
29 Requires(post,postun): /usr/bin/ghc-pkg
31 Requires: ghc-base >= 2.2
32 Requires: ghc-base < 5
33 Requires: ghc-bytestring >= 0.9
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 # debuginfo is not useful for ghc
37 %define _enable_debug_packages 0
39 # don't compress haddock files
40 %define _noautocompressdoc *.haddock
43 This package provides efficient cryptographic hash implementations for
44 strict and lazy bytestrings. For now, CRC32 and Adler32 are supported;
45 they are implemented as FFI bindings to efficient code from zlib.
47 %description -l pl.UTF-8
48 Ten pakiet dostarcza wydajne implementacje skrótów kryptograficznych
49 dla łańcuchów bajtów (bytestringów) ścisłych i leniwych. Na razie
50 obsługiwane są CRC32 i Adler32; są zaimplementowane jako wiązania FFI
51 do wydajnego kodu z biblioteki zlib.
54 Summary: Profiling %{pkgname} library for GHC
55 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
56 Group: Development/Libraries
57 Requires: %{name} = %{version}-%{release}
58 Requires: ghc-base-prof >= 2.2
59 Requires: ghc-base-prof < 5
60 Requires: ghc-bytestring-prof >= 0.9
63 Profiling %{pkgname} library for GHC. Should be installed when
64 GHC's profiling subsystem is needed.
66 %description prof -l pl.UTF-8
67 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
68 kiedy potrzebujemy systemu profilującego z GHC.
71 Summary: HTML documentation for ghc %{pkgname} package
72 Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
76 HTML documentation for ghc %{pkgname} package.
78 %description doc -l pl.UTF-8
79 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
82 %setup -q -n %{pkgname}-%{version}
85 runhaskell Setup.hs configure -v2 \
86 %{?with_prof:--enable-library-profiling} \
89 --libexecdir=%{_libexecdir} \
90 --docdir=%{_docdir}/%{name}-%{version}
92 runhaskell Setup.hs build
93 runhaskell Setup.hs haddock --executables
96 rm -rf $RPM_BUILD_ROOT
97 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
99 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
101 # work around automatic haddock docs installation
102 %{__rm} -rf %{name}-%{version}-doc
103 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
104 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
106 runhaskell Setup.hs register \
107 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
110 rm -rf $RPM_BUILD_ROOT
119 %defattr(644,root,root,755)
121 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
122 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
123 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdigest-%{version}-*.so
124 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdigest-%{version}-*.a
125 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdigest-%{version}-*_p.a
126 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
127 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest
128 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest/*.hi
129 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest/*.dyn_hi
133 %defattr(644,root,root,755)
134 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdigest-%{version}-*_p.a
135 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest/*.p_hi
139 %defattr(644,root,root,755)
140 %doc %{name}-%{version}-doc/*