]> git.pld-linux.org Git - packages/ghc-Crypto.git/blob - ghc-Crypto.spec
6978aed08d3fefb067d0b9f149f3434fa7bfdb1b
[packages/ghc-Crypto.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:        3
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
25 %if %{with prof}
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
34 %endif
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
40 %requires_releq ghc
41 Requires:       ghc-array
42 Requires:       ghc-base >= 3
43 Requires:       ghc-base < 5
44 Requires:       ghc-pretty
45 Requires:       ghc-random
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 # debuginfo is not useful for ghc
49 %define         _enable_debug_packages  0
50
51 # don't compress haddock files
52 %define         _noautocompressdoc      *.haddock
53
54 %description
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.
59
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.
65
66 %package prof
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
76
77 %description prof
78 Profiling %{pkgname} library for GHC. Should be installed when GHC's
79 profiling subsystem is needed.
80
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.
84
85 %prep
86 %setup -q -n %{pkgname}-%{version}
87
88 %build
89 runhaskell Setup.hs configure -v2 \
90         %{?with_prof:--enable-library-profiling} \
91         --prefix=%{_prefix} \
92         --libdir=%{_libdir} \
93         --libexecdir=%{_libexecdir} \
94         --docdir=%{_docdir}/%{name}-%{version}
95
96 runhaskell Setup.hs build
97 runhaskell Setup.hs haddock --executables
98
99 pdflatex ReadMe.tex
100
101 cd dist/build
102 for f in *Test ; do
103         $f/$f
104 done
105
106 %install
107 rm -rf $RPM_BUILD_ROOT
108 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
109
110 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
111
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}
116
117 runhaskell Setup.hs register \
118         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
119
120 %{__rm} $RPM_BUILD_ROOT%{_bindir}/{HMAC,Quick,RSA,SHA1,Symmetric,WordList}Test
121 %{__rm} $RPM_BUILD_ROOT%{_datadir}/Crypto-%{version}/CryptoHomePage.html
122
123 %clean
124 rm -rf $RPM_BUILD_ROOT
125
126 %post
127 %ghc_pkg_recache
128
129 %postun
130 %ghc_pkg_recache
131
132 %files
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
153
154 %files prof
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
This page took 0.075431 seconds and 2 git commands to generate.