]> git.pld-linux.org Git - packages/cryptlib.git/blob - cryptlib.spec
- release 5 (by relup.sh)
[packages/cryptlib.git] / cryptlib.spec
1 #
2 %define         libver  3.3.3
3 #
4 %define         _ver    %(echo %{version} | tr -d .)
5 Summary:        Peter Gutmann's general purpose encryption library
6 Summary(pl.UTF-8):      Biblioteka kryptograficzna ogólnego przeznaczenia Petera Gutmanna
7 Name:           cryptlib
8 Version:        3.3.3
9 Release:        5
10 License:        sleepycat
11 Group:          Libraries
12 Source0:        ftp://ftp.franken.de/pub/crypt/cryptlib/cl%{_ver}.zip
13 # Source0-md5:  afdb94894f7f798702703f4a95a2e7ac
14 Patch0:         %{name}-rdtsc.patch
15 Patch1:         %{name}-soname.patch
16 Patch2:         optflags.patch
17 Patch3:         x32.patch
18 Patch4:         format-security.patch
19 URL:            http://www.cs.auckland.ac.nz/~pgut001/cryptlib/
20 BuildRequires:  rpmbuild(macros) >= 1.710
21 BuildRequires:  python-devel >= 1:2.5
22 BuildRequires:  python-setuptools
23 BuildRequires:  rpm-pythonprov
24 BuildRequires:  sed >= 4.0
25 BuildRequires:  unzip
26 BuildRequires:  which
27 %pyrequires_eq  python-modules
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
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
43 uwierzytelnienia. Biblioteka zawiera szyfry konwencjonalne DES, 3DES,
44 IDEA, MDC/SHS, RC2, RC4, RC5, SAFER, SAFER-SK, Blowfish i Blowfish-SK,
45 algorytmy skrótu MD2, MD4, MD5, RIPEMD-160 i SHA oraz szyfry klucza
46 publicznego Diffie-Hellmana, DSA i RSA.
47
48 %package devel
49 Summary:        Header file for cryptlib library
50 Summary(pl.UTF-8):      Plik nagłówkowy biblioteki cryptlib
51 Group:          Development/Libraries
52 Requires:       %{name} = %{version}-%{release}
53
54 %description devel
55 The header file for developing applications that use the cryptlib
56 cryptography library.
57
58 %description devel -l pl.UTF-8
59 Plik nagłówkowy do tworzenia aplikacji korzystających z biblioteki
60 kryptograficznej cryptlib.
61
62 %package static
63 Summary:        Static cryptlib library
64 Summary(pl.UTF-8):      Statyczna biblioteka cryptlib
65 Group:          Development/Libraries
66 Requires:       %{name}-devel = %{version}-%{release}
67
68 %description static
69 Static cryptlib library.
70
71 %description static -l pl.UTF-8
72 Statyczna biblioteka cryptlib.
73
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
86 %prep
87 %setup -q -T -c
88 unzip -q -L -a %{SOURCE0}
89 %patch0 -p1
90 %patch1 -p1
91 %patch2 -p1
92 %patch3 -p1
93 %patch4 -p1
94
95 %build
96 %{__make} \
97 %ifarch x32
98         OPTFLAGS="%{rpmcflags} -DOPENSSL_NO_ASM" \
99 %else
100 %ifarch %{ix86}
101         OPTFLAGS="%{rpmcflags} -DUSE_ASM" \
102 %else
103         OPTFLAGS="%{rpmcflags}" \
104 %endif
105 %endif
106         CC="%{__cc}"
107
108 %{__make} shared \
109 %ifarch x32
110         OPTFLAGS="%{rpmcflags} -DOPENSSL_NO_ASM" \
111 %else
112 %ifarch %{ix86}
113         OPTFLAGS="%{rpmcflags} -DUSE_ASM" \
114 %else
115         OPTFLAGS="%{rpmcflags}" \
116 %endif
117 %endif
118         CC="%{__cc}"
119
120 ln -sf libcl.so.%{libver} libcl.so
121
122 cd bindings
123 %py_build
124
125 %install
126 rm -rf $RPM_BUILD_ROOT
127 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{py_sitedir}}
128
129 install cryptlib.h $RPM_BUILD_ROOT%{_includedir}
130 install libcl.a $RPM_BUILD_ROOT%{_libdir}
131 install libcl.so.%{libver} $RPM_BUILD_ROOT%{_libdir}
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
134
135 cd bindings
136 %py_install
137
138 %clean
139 rm -rf $RPM_BUILD_ROOT
140
141 %post   -p /sbin/ldconfig
142 %postun -p /sbin/ldconfig
143
144 %files
145 %defattr(644,root,root,755)
146 %attr(755,root,root) %{_libdir}/libcl.so.%{libver}
147 %attr(755,root,root) %ghost %{_libdir}/libcl.so.3
148
149 %files devel
150 %defattr(644,root,root,755)
151 %attr(755,root,root) %{_libdir}/libcl.so
152 %{_includedir}/cryptlib.h
153
154 %files static
155 %defattr(644,root,root,755)
156 %{_libdir}/libcl.a
157
158 %files -n python-cryptlib
159 %defattr(644,root,root,755)
160 %attr(755,root,root) %{py_sitedir}/cryptlib_py.so
161 %{py_sitedir}/cryptlib_py-*.egg-info
This page took 0.078632 seconds and 4 git commands to generate.