]> git.pld-linux.org Git - packages/cryptlib.git/blobdiff - cryptlib.spec
- updated to 3.3.2
[packages/cryptlib.git] / cryptlib.spec
index 068852aa7a9ecb8f0245335d9f5549884843631a..d97e0240315cc64d86a6abade6429e154e9d713a 100644 (file)
@@ -1,15 +1,25 @@
+#
+%define                libver  3.3.2
+#
 Summary:       Peter Gutmann's general purpose encryption library
 Summary(pl.UTF-8):     Biblioteka kryptograficzna ogólnego przeznaczenia Petera Gutmanna
 Name:          cryptlib
-Version:       3.2.2
-Release:       1
+Version:       3.3.2
+%define                _ver    %(echo %{version} | tr -d .)
+Release:       0.1
 License:       sleepycat
 Group:         Libraries
-Source0:       ftp://ftp.franken.de/pub/crypt/cryptlib/cl322.zip
-# Source0-md5: 0944963faae4566f54aeb45c6e803142
+Source0:       ftp://ftp.franken.de/pub/crypt/cryptlib/cl%{_ver}.zip
+# Source0-md5: 8736e8a78eb35a4abd3b057420357527
+Patch0:                %{name}-rdtsc.patch
+Patch1:                %{name}-soname.patch
 URL:           http://www.cs.auckland.ac.nz/~pgut001/cryptlib/
+BuildRequires: python-devel >= 1:2.5
+BuildRequires: python-setuptools
+BuildRequires: rpm-pythonprov
 BuildRequires: sed >= 4.0
 BuildRequires: unzip
+%pyrequires_eq  python-modules
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -56,9 +66,23 @@ Static cryptlib library.
 %description static -l pl.UTF-8
 Statyczna biblioteka cryptlib.
 
+%package -n python-cryptlib
+Summary:       Python bindings for cryptlib
+Summary(pl.UTF-8):     Wiązania języka Python do biblioteki cryptlib
+Group:         Libraries/Python
+Requires:      python >= 1:2.4
+
+%description -n python-cryptlib
+Python bindings for cryptlib library.
+
+%description -n python-cryptlib -l pl.UTF-8
+Wiązania języka Python do biblioteki cryptlib.
+
 %prep
 %setup -q -T -c
-unzip -L -a %{SOURCE0}
+unzip -q -L -a %{SOURCE0}
+%patch0 -p1
+%patch1 -p1
 
 sed -i -e 's/ -O3 / %{rpmcflags} /' makefile
 
@@ -69,14 +93,25 @@ sed -i -e 's/ -O3 / %{rpmcflags} /' makefile
 %{__make} shared \
        CC="%{__cc}"
 
+ln -sf libcl.so.%{libver} libcl.so
+
+cd bindings
+python setup.py build
+
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}}
+install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{py_sitedir}}
 
 install cryptlib.h $RPM_BUILD_ROOT%{_includedir}
 install libcl.a $RPM_BUILD_ROOT%{_libdir}
-install libcl.so.3.2.2 $RPM_BUILD_ROOT%{_libdir}
-ln -sf libcl.so.3.2.2 $RPM_BUILD_ROOT%{_libdir}/libcl.so
+install libcl.so.%{libver} $RPM_BUILD_ROOT%{_libdir}
+ln -s libcl.so.%{libver} $RPM_BUILD_ROOT%{_libdir}/libcl.so.3
+ln -s libcl.so.%{libver} $RPM_BUILD_ROOT%{_libdir}/libcl.so
+
+cd bindings
+python setup.py install        \
+       --optimize=2    \
+       --root=$RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -86,7 +121,8 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libcl.so.3.2.2
+%attr(755,root,root) %{_libdir}/libcl.so.%{libver}
+%attr(755,root,root) %ghost %{_libdir}/libcl.so.3
 
 %files devel
 %defattr(644,root,root,755)
@@ -96,3 +132,8 @@ rm -rf $RPM_BUILD_ROOT
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libcl.a
+
+%files -n python-cryptlib
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py_sitedir}/cryptlib_py.so
+%{py_sitedir}/cryptlib_py-*.egg-info
This page took 0.10914 seconds and 4 git commands to generate.