]> git.pld-linux.org Git - packages/cryptlib.git/blob - cryptlib.spec
- release 2
[packages/cryptlib.git] / cryptlib.spec
1 #
2 %define         libver  3.3.3
3 #
4 Summary:        Peter Gutmann's general purpose encryption library
5 Summary(pl.UTF-8):      Biblioteka kryptograficzna ogólnego przeznaczenia Petera Gutmanna
6 Name:           cryptlib
7 Version:        3.3.3
8 %define         _ver    %(echo %{version} | tr -d .)
9 Release:        2
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 URL:            http://www.cs.auckland.ac.nz/~pgut001/cryptlib/
17 BuildRequires:  python-devel >= 1:2.5
18 BuildRequires:  python-setuptools
19 BuildRequires:  rpm-pythonprov
20 BuildRequires:  sed >= 4.0
21 BuildRequires:  unzip
22 %pyrequires_eq  python-modules
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 The cryptlib encryption library provides an easy-to-use interface
27 which allows even inexperienced crypto programmers to easily add
28 strong encryption and authentication services to their software. The
29 library contains DES, triple DES, IDEA, MDC/SHS, RC2, RC4, RC5, SAFER,
30 SAFER-SK, Blowfish, and Blowfish-SK conventional encryption, MD2, MD4,
31 MD5, RIPEMD-160 and SHA hash algorithms, and Diffie-Hellman, DSA, and
32 RSA public-key encryption.
33
34 %description -l pl.UTF-8
35 Biblioteka kryptograficzna cryptlib udostępnia łatwy w użyciu
36 interfejs pozwalający nawet niedoświaczonym programistom kryptografii
37 łatwo dodawać do swoich programów usługi kryptograficzne i
38 uwierzytelnienia. Biblioteka zawiera szyfry konwencjonalne DES, 3DES,
39 IDEA, MDC/SHS, RC2, RC4, RC5, SAFER, SAFER-SK, Blowfish i Blowfish-SK,
40 algorytmy skrótu MD2, MD4, MD5, RIPEMD-160 i SHA oraz szyfry klucza
41 publicznego Diffie-Hellmana, DSA i RSA.
42
43 %package devel
44 Summary:        Header file for cryptlib library
45 Summary(pl.UTF-8):      Plik nagłówkowy biblioteki cryptlib
46 Group:          Development/Libraries
47 Requires:       %{name} = %{version}-%{release}
48
49 %description devel
50 The header file for developing applications that use the cryptlib
51 cryptography library.
52
53 %description devel -l pl.UTF-8
54 Plik nagłówkowy do tworzenia aplikacji korzystających z biblioteki
55 kryptograficznej cryptlib.
56
57 %package static
58 Summary:        Static cryptlib library
59 Summary(pl.UTF-8):      Statyczna biblioteka cryptlib
60 Group:          Development/Libraries
61 Requires:       %{name}-devel = %{version}-%{release}
62
63 %description static
64 Static cryptlib library.
65
66 %description static -l pl.UTF-8
67 Statyczna biblioteka cryptlib.
68
69 %package -n python-cryptlib
70 Summary:        Python bindings for cryptlib
71 Summary(pl.UTF-8):      Wiązania języka Python do biblioteki cryptlib
72 Group:          Libraries/Python
73 Requires:       python >= 1:2.4
74
75 %description -n python-cryptlib
76 Python bindings for cryptlib library.
77
78 %description -n python-cryptlib -l pl.UTF-8
79 Wiązania języka Python do biblioteki cryptlib.
80
81 %prep
82 %setup -q -T -c
83 unzip -q -L -a %{SOURCE0}
84 %patch0 -p1
85 %patch1 -p1
86
87 sed -i -e 's/ -O3 / %{rpmcflags} /' makefile
88
89 %build
90 %{__make} \
91         CC="%{__cc}"
92
93 %{__make} shared \
94         CC="%{__cc}"
95
96 ln -sf libcl.so.%{libver} libcl.so
97
98 cd bindings
99 python setup.py build
100
101 %install
102 rm -rf $RPM_BUILD_ROOT
103 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{py_sitedir}}
104
105 install cryptlib.h $RPM_BUILD_ROOT%{_includedir}
106 install libcl.a $RPM_BUILD_ROOT%{_libdir}
107 install libcl.so.%{libver} $RPM_BUILD_ROOT%{_libdir}
108 ln -s libcl.so.%{libver} $RPM_BUILD_ROOT%{_libdir}/libcl.so.3
109 ln -s libcl.so.%{libver} $RPM_BUILD_ROOT%{_libdir}/libcl.so
110
111 cd bindings
112 python setup.py install \
113         --optimize=2    \
114         --root=$RPM_BUILD_ROOT
115
116 %clean
117 rm -rf $RPM_BUILD_ROOT
118
119 %post   -p /sbin/ldconfig
120 %postun -p /sbin/ldconfig
121
122 %files
123 %defattr(644,root,root,755)
124 %attr(755,root,root) %{_libdir}/libcl.so.%{libver}
125 %attr(755,root,root) %ghost %{_libdir}/libcl.so.3
126
127 %files devel
128 %defattr(644,root,root,755)
129 %attr(755,root,root) %{_libdir}/libcl.so
130 %{_includedir}/cryptlib.h
131
132 %files static
133 %defattr(644,root,root,755)
134 %{_libdir}/libcl.a
135
136 %files -n python-cryptlib
137 %defattr(644,root,root,755)
138 %attr(755,root,root) %{py_sitedir}/cryptlib_py.so
139 %{py_sitedir}/cryptlib_py-*.egg-info
This page took 0.083302 seconds and 3 git commands to generate.