]> git.pld-linux.org Git - SPECS.git/blob - ghc-Crypto.spec
SPECS updated Sat 31 Jul 20:26:02 CEST 2021
[SPECS.git] / ghc-Crypto.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname Crypto
6 Summary:        Collects together existing Haskell cryptographic functions into a package
7 Summary(pl.UTF-8):      Zebranie istniejących funkcji kryptograficznych Haskella w pakiet
8 Name:           ghc-%{pkgname}
9 Version:        4.2.5.1
10 Release:        4
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-pretty
23 BuildRequires:  ghc-random
24 %if %{with prof}
25 BuildRequires:  ghc-prof >= 6.12.3
26 BuildRequires:  ghc-HUnit-prof
27 BuildRequires:  ghc-QuickCheck-prof >= 2.4.0.1
28 BuildRequires:  ghc-array-prof
29 BuildRequires:  ghc-base-prof >= 3
30 BuildRequires:  ghc-pretty-prof
31 BuildRequires:  ghc-random-prof
32 %endif
33 BuildRequires:  latex2html
34 BuildRequires:  texlive-format-pdflatex
35 BuildRequires:  texlive-latex
36 BuildRequires:  rpmbuild(macros) >= 1.608
37 Requires(post,postun):  /usr/bin/ghc-pkg
38 %requires_eq    ghc
39 Requires:       ghc-array
40 Requires:       ghc-base >= 3
41 Requires:       ghc-pretty
42 Requires:       ghc-random
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 # debuginfo is not useful for ghc
46 %define         _enable_debug_packages  0
47
48 # don't compress haddock files
49 %define         _noautocompressdoc      *.haddock
50
51 %description
52 DES, Blowfish, AES, TEA, SHA1, MD5, RSA, BubbleBabble, Hexdump,
53 support for Word128, Word192 and Word256 and beyond, PKCS5 padding,
54 various encryption modes e.g. Cipher Block Chaining all in one
55 package, with HUnit and QuickCheck tests, and examples.
56
57 %description -l pl.UTF-8
58 DES, Blowfish, AES, TEA, SHA1, MD5, RSA, BubbleBabble, Hexdump,
59 obsługa typów Word128, Word192, Word256 i dalszych, opakowania PKCS5,
60 różnych trybów szyfrowania, jak CBC (Cipher Block Chaining) - wszystko
61 w jednym pakiecie, wraz z testami HUnit i QuickCheck oraz przykładami.
62
63 %package prof
64 Summary:        Profiling %{pkgname} library for GHC
65 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC.
66 Group:          Development/Libraries
67 Requires:       %{name} = %{version}-%{release}
68 Requires:       ghc-array-prof
69 Requires:       ghc-base-prof >= 3
70 Requires:       ghc-pretty-prof
71 Requires:       ghc-random-prof
72
73 %description prof
74 Profiling %{pkgname} library for GHC. Should be installed when GHC's
75 profiling subsystem is needed.
76
77 %description prof -l pl.UTF-8
78 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
79 kiedy potrzebujemy systemu profilującego z GHC.
80
81 %prep
82 %setup -q -n %{pkgname}-%{version}
83
84 %build
85 runhaskell Setup.hs configure -v2 \
86         %{?with_prof:--enable-library-profiling} \
87         --prefix=%{_prefix} \
88         --libdir=%{_libdir} \
89         --libexecdir=%{_libexecdir} \
90         --docdir=%{_docdir}/%{name}-%{version}
91
92 runhaskell Setup.hs build
93 runhaskell Setup.hs haddock --executables
94
95 pdflatex ReadMe.tex
96
97 cd dist/build
98 for f in *Test ; do
99         $f/$f
100 done
101
102 %install
103 rm -rf $RPM_BUILD_ROOT
104 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
105
106 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
107
108 # work around automatic haddock docs installation
109 %{__rm} -rf %{name}-%{version}-doc
110 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
111 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
112
113 runhaskell Setup.hs register \
114         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
115
116 %{__rm} $RPM_BUILD_ROOT%{_bindir}/{HMAC,Quick,RSA,SHA1,Symmetric,WordList}Test
117 %{__rm} $RPM_BUILD_ROOT%{_datadir}/Crypto-%{version}/CryptoHomePage.html
118
119 %clean
120 rm -rf $RPM_BUILD_ROOT
121
122 %post
123 %ghc_pkg_recache
124
125 %postun
126 %ghc_pkg_recache
127
128 %files
129 %defattr(644,root,root,755)
130 %doc CryptoHomePage.html ReadMe.pdf %{name}-%{version}-doc/*
131 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
132 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
133 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSCrypto-%{version}-*.so
134 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSCrypto-%{version}-*.a
135 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSCrypto-%{version}-*_p.a
136 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec
137 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/*.hi
138 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/*.dyn_hi
139 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Binary
140 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Binary/*.hi
141 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Binary/*.dyn_hi
142 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Encryption
143 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Encryption/*.hi
144 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Encryption/*.dyn_hi
145 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Encryption/RSA
146 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Encryption/RSA/*.hi
147 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Encryption/RSA/*.dyn_hi
148 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Text
149 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Text/*.hi
150 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Text/*.dyn_hi
151 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
152 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.hi
153 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.dyn_hi
154 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest
155 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest/*.hi
156 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest/*.dyn_hi
157
158 %files prof
159 %defattr(644,root,root,755)
160 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSCrypto-%{version}-*_p.a
161 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/*.p_hi
162 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Binary/*.p_hi
163 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Encryption/*.p_hi
164 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Encryption/RSA/*.p_hi
165 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Codec/Text/*.p_hi
166 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.p_hi
167 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Digest/*.p_hi
This page took 0.332111 seconds and 3 git commands to generate.