3 %bcond_without prof # profiling library
6 Summary: Collects together existing Haskell cryptographic functions into a package
7 Summary(pl.UTF-8): Zebranie istniejących funkcji kryptograficznych Haskella w pakiet
11 License: BSD, GPL v2+ (depending on module)
12 Group: Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/Crypto
14 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5: e1ec7d91e888107f2544064456f8eb36
16 URL: http://hackage.haskell.org/package/Crypto
17 BuildRequires: ghc >= 6.12.3
18 BuildRequires: ghc-HUnit
19 BuildRequires: ghc-QuickCheck >= 2.4.0.1
20 BuildRequires: ghc-array
21 BuildRequires: ghc-base >= 3
22 BuildRequires: ghc-base < 5
23 BuildRequires: ghc-pretty
24 BuildRequires: ghc-random
26 BuildRequires: ghc-prof >= 6.12.3
27 BuildRequires: ghc-HUnit-prof
28 BuildRequires: ghc-QuickCheck-prof >= 2.4.0.1
29 BuildRequires: ghc-array-prof
30 BuildRequires: ghc-base-prof >= 3
31 BuildRequires: ghc-base-prof < 5
32 BuildRequires: ghc-pretty-prof
33 BuildRequires: ghc-random-prof
35 BuildRequires: latex2html
36 BuildRequires: texlive-format-pdflatex
37 BuildRequires: texlive-latex
38 BuildRequires: rpmbuild(macros) >= 1.608
39 Requires(post,postun): /usr/bin/ghc-pkg
42 Requires: ghc-base >= 3
43 Requires: ghc-base < 5
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 # debuginfo is not useful for ghc
49 %define _enable_debug_packages 0
51 # don't compress haddock files
52 %define _noautocompressdoc *.haddock
55 DES, Blowfish, AES, TEA, SHA1, MD5, RSA, BubbleBabble, Hexdump,
56 support for Word128, Word192 and Word256 and beyond, PKCS5 padding,
57 various encryption modes e.g. Cipher Block Chaining all in one
58 package, with HUnit and QuickCheck tests, and examples.
60 %description -l pl.UTF-8
61 DES, Blowfish, AES, TEA, SHA1, MD5, RSA, BubbleBabble, Hexdump,
62 obsługa typów Word128, Word192, Word256 i dalszych, opakowania PKCS5,
63 różnych trybów szyfrowania, jak CBC (Cipher Block Chaining) - wszystko
64 w jednym pakiecie, wraz z testami HUnit i QuickCheck oraz przykładami.
67 Summary: Profiling %{pkgname} library for GHC
68 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC.
69 Group: Development/Libraries
70 Requires: %{name} = %{version}-%{release}
71 Requires: ghc-array-prof
72 Requires: ghc-base-prof >= 3
73 Requires: ghc-base-prof < 5
74 Requires: ghc-pretty-prof
75 Requires: ghc-random-prof
78 Profiling %{pkgname} library for GHC. Should be installed when GHC's
79 profiling subsystem is needed.
81 %description prof -l pl.UTF-8
82 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
83 kiedy potrzebujemy systemu profilującego z GHC.
86 %setup -q -n %{pkgname}-%{version}
89 runhaskell Setup.hs configure -v2 \
90 %{?with_prof:--enable-library-profiling} \
93 --libexecdir=%{_libexecdir} \
94 --docdir=%{_docdir}/%{name}-%{version}
96 runhaskell Setup.hs build
97 runhaskell Setup.hs haddock --executables
107 rm -rf $RPM_BUILD_ROOT
108 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
110 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
112 # work around automatic haddock docs installation
113 %{__rm} -rf %{name}-%{version}-doc
114 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
115 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
117 runhaskell Setup.hs register \
118 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
120 %{__rm} $RPM_BUILD_ROOT%{_bindir}/{HMAC,Quick,RSA,SHA1,Symmetric,WordList}Test
121 %{__rm} $RPM_BUILD_ROOT%{_datadir}/Crypto-%{version}/CryptoHomePage.html
124 rm -rf $RPM_BUILD_ROOT
133 %defattr(644,root,root,755)
134 %doc CryptoHomePage.html ReadMe.pdf %{name}-%{version}-doc/*
135 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
136 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
137 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSCrypto-%{version}.o
138 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSCrypto-%{version}.a
139 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec
140 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/*.hi
141 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Binary
142 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Binary/*.hi
143 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Encryption
144 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Encryption/*.hi
145 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Encryption/RSA
146 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Encryption/RSA/*.hi
147 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Text
148 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Text/*.hi
149 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
150 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.hi
151 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest
152 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest/*.hi
155 %defattr(644,root,root,755)
156 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSCrypto-%{version}_p.a
157 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/*.p_hi
158 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Binary/*.p_hi
159 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Encryption/*.p_hi
160 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Encryption/RSA/*.p_hi
161 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Text/*.p_hi
162 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.p_hi
163 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest/*.p_hi