]>
Commit | Line | Data |
---|---|---|
6d278238 | 1 | # |
2f5cd112 | 2 | %define libver 3.3.3 |
6d278238 | 3 | # |
2157ce5e | 4 | %define _ver %(echo %{version} | tr -d .) |
cdb4650b | 5 | Summary: Peter Gutmann's general purpose encryption library |
a23f1eac | 6 | Summary(pl.UTF-8): Biblioteka kryptograficzna ogólnego przeznaczenia Petera Gutmanna |
cdb4650b | 7 | Name: cryptlib |
2f5cd112 | 8 | Version: 3.3.3 |
264e1f79 | 9 | Release: 5 |
cdb4650b | 10 | License: sleepycat |
313eb19f | 11 | Group: Libraries |
c04feed4 | 12 | Source0: ftp://ftp.franken.de/pub/crypt/cryptlib/cl%{_ver}.zip |
2f5cd112 | 13 | # Source0-md5: afdb94894f7f798702703f4a95a2e7ac |
33c869a9 JB |
14 | Patch0: %{name}-rdtsc.patch |
15 | Patch1: %{name}-soname.patch | |
cc59b979 JR |
16 | Patch2: optflags.patch |
17 | Patch3: x32.patch | |
bcc40a80 | 18 | Patch4: format-security.patch |
313eb19f | 19 | URL: http://www.cs.auckland.ac.nz/~pgut001/cryptlib/ |
9b22cd96 | 20 | BuildRequires: rpmbuild(macros) >= 1.710 |
33c869a9 JB |
21 | BuildRequires: python-devel >= 1:2.5 |
22 | BuildRequires: python-setuptools | |
23 | BuildRequires: rpm-pythonprov | |
015ece3d | 24 | BuildRequires: sed >= 4.0 |
cdb4650b | 25 | BuildRequires: unzip |
2157ce5e | 26 | BuildRequires: which |
6d278238 | 27 | %pyrequires_eq python-modules |
cdb4650b | 28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
30 | %description | |
31 | The cryptlib encryption library provides an easy-to-use interface | |
32 | which allows even inexperienced crypto programmers to easily add | |
33 | strong encryption and authentication services to their software. The | |
34 | library contains DES, triple DES, IDEA, MDC/SHS, RC2, RC4, RC5, SAFER, | |
35 | SAFER-SK, Blowfish, and Blowfish-SK conventional encryption, MD2, MD4, | |
36 | MD5, RIPEMD-160 and SHA hash algorithms, and Diffie-Hellman, DSA, and | |
37 | RSA public-key encryption. | |
38 | ||
de8d3220 JR |
39 | %description -l pl.UTF-8 |
40 | Biblioteka kryptograficzna cryptlib udostępnia łatwy w użyciu | |
41 | interfejs pozwalający nawet niedoświaczonym programistom kryptografii | |
42 | łatwo dodawać do swoich programów usługi kryptograficzne i | |
313eb19f JB |
43 | uwierzytelnienia. Biblioteka zawiera szyfry konwencjonalne DES, 3DES, |
44 | IDEA, MDC/SHS, RC2, RC4, RC5, SAFER, SAFER-SK, Blowfish i Blowfish-SK, | |
de8d3220 | 45 | algorytmy skrótu MD2, MD4, MD5, RIPEMD-160 i SHA oraz szyfry klucza |
313eb19f | 46 | publicznego Diffie-Hellmana, DSA i RSA. |
cdb4650b | 47 | |
48 | %package devel | |
313eb19f | 49 | Summary: Header file for cryptlib library |
a23f1eac | 50 | Summary(pl.UTF-8): Plik nagłówkowy biblioteki cryptlib |
cdb4650b | 51 | Group: Development/Libraries |
313eb19f | 52 | Requires: %{name} = %{version}-%{release} |
cdb4650b | 53 | |
54 | %description devel | |
313eb19f JB |
55 | The header file for developing applications that use the cryptlib |
56 | cryptography library. | |
57 | ||
de8d3220 JR |
58 | %description devel -l pl.UTF-8 |
59 | Plik nagłówkowy do tworzenia aplikacji korzystających z biblioteki | |
313eb19f JB |
60 | kryptograficznej cryptlib. |
61 | ||
62 | %package static | |
63 | Summary: Static cryptlib library | |
a23f1eac | 64 | Summary(pl.UTF-8): Statyczna biblioteka cryptlib |
313eb19f JB |
65 | Group: Development/Libraries |
66 | Requires: %{name}-devel = %{version}-%{release} | |
67 | ||
68 | %description static | |
69 | Static cryptlib library. | |
70 | ||
de8d3220 | 71 | %description static -l pl.UTF-8 |
313eb19f | 72 | Statyczna biblioteka cryptlib. |
cdb4650b | 73 | |
6d278238 | 74 | %package -n python-cryptlib |
75 | Summary: Python bindings for cryptlib | |
76 | Summary(pl.UTF-8): Wiązania języka Python do biblioteki cryptlib | |
77 | Group: Libraries/Python | |
78 | Requires: python >= 1:2.4 | |
79 | ||
80 | %description -n python-cryptlib | |
81 | Python bindings for cryptlib library. | |
82 | ||
83 | %description -n python-cryptlib -l pl.UTF-8 | |
84 | Wiązania języka Python do biblioteki cryptlib. | |
85 | ||
cdb4650b | 86 | %prep |
87 | %setup -q -T -c | |
33c869a9 JB |
88 | unzip -q -L -a %{SOURCE0} |
89 | %patch0 -p1 | |
90 | %patch1 -p1 | |
cc59b979 JR |
91 | %patch2 -p1 |
92 | %patch3 -p1 | |
bcc40a80 | 93 | %patch4 -p1 |
015ece3d | 94 | |
cdb4650b | 95 | %build |
313eb19f | 96 | %{__make} \ |
cc59b979 JR |
97 | %ifarch x32 |
98 | OPTFLAGS="%{rpmcflags} -DOPENSSL_NO_ASM" \ | |
50bad583 JR |
99 | %else |
100 | %ifarch %{ix86} | |
74426785 | 101 | OPTFLAGS="%{rpmcflags} -DUSE_ASM" \ |
cc59b979 JR |
102 | %else |
103 | OPTFLAGS="%{rpmcflags}" \ | |
50bad583 | 104 | %endif |
cc59b979 | 105 | %endif |
015ece3d JB |
106 | CC="%{__cc}" |
107 | ||
313eb19f | 108 | %{__make} shared \ |
cc59b979 JR |
109 | %ifarch x32 |
110 | OPTFLAGS="%{rpmcflags} -DOPENSSL_NO_ASM" \ | |
50bad583 JR |
111 | %else |
112 | %ifarch %{ix86} | |
74426785 | 113 | OPTFLAGS="%{rpmcflags} -DUSE_ASM" \ |
cc59b979 JR |
114 | %else |
115 | OPTFLAGS="%{rpmcflags}" \ | |
50bad583 | 116 | %endif |
cc59b979 | 117 | %endif |
015ece3d | 118 | CC="%{__cc}" |
cdb4650b | 119 | |
6d278238 | 120 | ln -sf libcl.so.%{libver} libcl.so |
121 | ||
122 | cd bindings | |
2728fbb5 | 123 | %py_build |
6d278238 | 124 | |
cdb4650b | 125 | %install |
126 | rm -rf $RPM_BUILD_ROOT | |
6d278238 | 127 | install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{py_sitedir}} |
313eb19f | 128 | |
cdb4650b | 129 | install cryptlib.h $RPM_BUILD_ROOT%{_includedir} |
313eb19f | 130 | install libcl.a $RPM_BUILD_ROOT%{_libdir} |
6d278238 | 131 | install libcl.so.%{libver} $RPM_BUILD_ROOT%{_libdir} |
33c869a9 JB |
132 | ln -s libcl.so.%{libver} $RPM_BUILD_ROOT%{_libdir}/libcl.so.3 |
133 | ln -s libcl.so.%{libver} $RPM_BUILD_ROOT%{_libdir}/libcl.so | |
6d278238 | 134 | |
135 | cd bindings | |
2728fbb5 | 136 | %py_install |
313eb19f JB |
137 | |
138 | %clean | |
139 | rm -rf $RPM_BUILD_ROOT | |
140 | ||
141 | %post -p /sbin/ldconfig | |
142 | %postun -p /sbin/ldconfig | |
cdb4650b | 143 | |
144 | %files | |
145 | %defattr(644,root,root,755) | |
6d278238 | 146 | %attr(755,root,root) %{_libdir}/libcl.so.%{libver} |
33c869a9 | 147 | %attr(755,root,root) %ghost %{_libdir}/libcl.so.3 |
cdb4650b | 148 | |
149 | %files devel | |
150 | %defattr(644,root,root,755) | |
33c869a9 | 151 | %attr(755,root,root) %{_libdir}/libcl.so |
cdb4650b | 152 | %{_includedir}/cryptlib.h |
153 | ||
313eb19f JB |
154 | %files static |
155 | %defattr(644,root,root,755) | |
156 | %{_libdir}/libcl.a | |
6d278238 | 157 | |
158 | %files -n python-cryptlib | |
159 | %defattr(644,root,root,755) | |
33c869a9 JB |
160 | %attr(755,root,root) %{py_sitedir}/cryptlib_py.so |
161 | %{py_sitedir}/cryptlib_py-*.egg-info |