Summary: Python interface to OpenSSL
-Summary(pl): Interfejs Pythona do OpenSSL
+Summary(pl.UTF-8): Interfejs Pythona do OpenSSL
Name: python-M2Crypto
-Version: 0.06
-Release: 2
+Version: 0.22.3
+Release: 3
License: BSD-like
-Source0: http://www.pobox.org.sg/home/ngps/m2/m2crypto-%{version}.zip
-URL: http://www.pobox.org.sg/home/ngps/m2/
-Group: Development/Languages/Python
-%pyrequires_eq python
-BuildRequires: python-devel >= 1.5.2
-BuildRequires: openssl-devel >= 0.9.6
-BuildRequires: swig
+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)
-%include /usr/lib/rpm/macros.python
-
%description
M2Crypto makes accessible to the Python programmer the following:
- DH, RSA, DSA, symmetric ciphers, message digests, HMACs.
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
-%{__make} -C swig INCLUDE="-I. -I%{py_incdir}"
+%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}}
-cp -a M2Crypto $RPM_BUILD_ROOT%{py_sitedir}
-%{py_comp} $RPM_BUILD_ROOT%{py_sitedir}
-%{py_ocomp} $RPM_BUILD_ROOT%{py_sitedir}
+%py_install
-gzip -9nf BUGS CHANGES INSTALL LICENCE README STORIES
+%py_postclean
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc *.gz doc/*.html demo
-%{py_sitedir}/M2Crypto
+%doc README
+%dir %{py_sitedir}/M2Crypto
+%attr(755,root,root) %{py_sitedir}/M2Crypto/*.so
+%{py_sitedir}/M2Crypto/*.py[co]
+%dir %{py_sitedir}/M2Crypto/SSL
+%{py_sitedir}/M2Crypto/SSL/*.py[co]
+%{py_sitedir}/M2Crypto-*.egg-info