-%include /usr/lib/rpm/macros.python
-
Summary: Python interface to OpenSSL
-Summary(pl): Interfejs Pythona do OpenSSL
+Summary(pl.UTF-8): Interfejs Pythona do OpenSSL
Name: python-M2Crypto
-Version: 0.11
-Release: 1
+Version: 0.22.3
+Release: 3
License: BSD-like
-Source0: http://www.pobox.org.sg/home/ngps/m2/m2crypto-%{version}.zip
-# Source0-md5: c018c94e00b33aac969fbbe02b244aba
-URL: http://www.pobox.org.sg/home/ngps/m2/
-Group: Development/Languages/Python
-%pyrequires_eq python
-BuildRequires: python-devel >= 2.2.1
-BuildRequires: openssl-devel >= 0.9.7
-BuildRequires: swig >= 1.3.17
+Group: Libraries/Python
+Source0: https://pypi.python.org/packages/source/M/M2Crypto/M2Crypto-%{version}.tar.gz
+# Source0-md5: 573f21aaac7d5c9549798e72ffcefedd
+Patch0: %{name}-store2ssl.patch
+Patch1: %{name}-swig.patch
+URL: http://chandlerproject.org/bin/view/Projects/MeTooCrypto
+BuildRequires: openssl-devel >= 0.9.8
+BuildRequires: python-devel >= 1:2.6
+BuildRequires: python-modules
BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.710
+BuildRequires: swig-python >= 2.0
+BuildRequires: unzip
+%pyrequires_eq python
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
M2Crypto is released under a very liberal BSD-like licence. See
LICENCE for details.
-%description -l pl
-M2Crypto udostêpnia z poziomu Pythona nastêpuj±ce funkcje:
-- DH, RSA, DSA, szyfry symetryczne, skróty, HMAC
-- SSL do implementacji klientów i serwerów
+%description -l pl.UTF-8
+M2Crypto udostępnia z poziomu Pythona następujące funkcje:
+- DH, RSA, DSA, szyfry symetryczne, skróty, HMAC
+- SSL do implementacji klientów i serwerów
- S/MIME v2.
%prep
-%setup -q -n m2crypto-%{version}
+%setup -q -n M2Crypto-%{version}
+%patch0 -p1
+%patch1 -p1
%build
-# workaroud (no way to pass -ISWIG to swig invocation)
-cp SWIG/*.i SWIG/*.h .
-python setup.py build
+%py_build
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{py_sitedir}
+install -d $RPM_BUILD_ROOT{%{py_sitedir},%{_examplesdir}/%{name}-%{version}}
+
+%py_install
-python setup.py install \
- --root=$RPM_BUILD_ROOT \
- --optimize=2
+%py_postclean
-# shutup check-files
-find $RPM_BUILD_ROOT/%{py_sitedir} -name \*.py \
- -exec rm {} \;
-
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc BUGS CHANGES INSTALL LICENCE README STORIES doc/*.html demo
+%doc README
+%dir %{py_sitedir}/M2Crypto
%attr(755,root,root) %{py_sitedir}/M2Crypto/*.so
-%{py_sitedir}/M2Crypto/*.py[oc]
+%{py_sitedir}/M2Crypto/*.py[co]
%dir %{py_sitedir}/M2Crypto/SSL
-%{py_sitedir}/M2Crypto/SSL/*.py[oc]
-%dir %{py_sitedir}/M2Crypto/PGP
-%{py_sitedir}/M2Crypto/PGP/*.py[oc]
+%{py_sitedir}/M2Crypto/SSL/*.py[co]
+%{py_sitedir}/M2Crypto-*.egg-info