-%include /usr/lib/rpm/macros.python
Summary: Python interface to OpenSSL
Summary(pl): Interfejs Pythona do OpenSSL
Name: python-M2Crypto
-Version: 0.11
-Release: 2
+Version: 0.13
+Release: 4
License: BSD-like
-Source0: http://www.pobox.org.sg/home/ngps/m2/m2crypto-%{version}.zip
-# Source0-md5: c018c94e00b33aac969fbbe02b244aba
-Patch0: M2Crypto-smime_callback.patch
-Patch1: M2Crypto-pkcs7_get0_signers.patch
+Source0: http://sandbox.rulemaker.net/ngps/Dist/m2crypto-%{version}.zip
+# Source0-md5: be2790a34349ab452dddbcfe4c95606a
+# http://sandbox.rulemaker.net/ngps/Dist/0.13p1.patch
+Patch0: %{name}-0.13p1.patch
+Patch1: %{name}-swig_sources.patch
URL: http://sandbox.rulemaker.net/ngps/m2/
Group: Development/Languages/Python
%pyrequires_eq python
BuildRequires: python-devel >= 2.2.1
-BuildRequires: openssl-devel >= 0.9.7c
+BuildRequires: openssl-devel >= 0.9.7d
BuildRequires: swig >= 1.3.17
BuildRequires: rpm-pythonprov
+BuildRequires: unzip
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
%prep
%setup -q -n m2crypto-%{version}
-%patch0 -p1
+%patch0 -p0
%patch1 -p1
%build
-# workaroud (no way to pass -ISWIG to swig invocation)
-cp SWIG/*.i SWIG/*.h .
python setup.py build
%install
%files
%defattr(644,root,root,755)
-%doc BUGS CHANGES INSTALL LICENCE README STORIES doc/*.html demo
+%doc BUGS CHANGES INSTALL LICENCE README doc/*.html demo
%attr(755,root,root) %{py_sitedir}/M2Crypto/*.so
%{py_sitedir}/M2Crypto/*.py[oc]
%dir %{py_sitedir}/M2Crypto/SSL