3 %bcond_with tests # test target [fails, some files are missing]
4 %bcond_without doc # don't build doc
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 %define module M2Crypto
10 Summary: Python interface to OpenSSL
11 Summary(pl.UTF-8): Interfejs Pythona do OpenSSL
16 Group: Libraries/Python
17 #Source0Download: https://pypi.python.org/simple/m2crypto/
18 Source0: https://pypi.debian.net/M2Crypto/M2Crypto-%{version}.tar.gz
19 # Source0-md5: 7fce3cbf85eb84a669682892b935746b
20 Patch0: %{name}-store2ssl.patch
21 Patch1: %{name}-swig.patch
22 URL: https://gitlab.com/m2crypto/m2crypto
23 BuildRequires: openssl-devel >= 1.0.1e
25 BuildRequires: python-devel >= 1:2.6
26 BuildRequires: python-modules >= 1:2.6
27 BuildRequires: python-setuptools
30 BuildRequires: python3-devel
31 BuildRequires: python3-modules
32 BuildRequires: python3-setuptools
34 BuildRequires: rpm-pythonprov
35 BuildRequires: rpmbuild(macros) >= 1.710
36 BuildRequires: swig-python >= 2.0
38 Requires: openssl >= 1.0.1e
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 M2Crypto makes accessible to the Python programmer the following:
44 - DH, RSA, DSA, symmetric ciphers, message digests, HMACs.
45 - SSL functionality to implement clients and servers.
48 M2Crypto is released under a very liberal BSD-like licence. See
51 %description -l pl.UTF-8
52 M2Crypto udostępnia z poziomu Pythona następujące funkcje:
53 - DH, RSA, DSA, szyfry symetryczne, skróty, HMAC
54 - SSL do implementacji klientów i serwerów
57 M2Crypto jest wydane na bardzo liberalnej licencji BSD - szczegóły w
60 %package -n python3-%{module}
61 Summary: Python interface to OpenSSL
62 Summary(pl.UTF-8): Interfejs Pythona do OpenSSL
63 Group: Libraries/Python
64 Requires: openssl >= 1.0.1
65 Requires: python3-libs
66 Requires: python3-modules
68 %description -n python3-%{module}
69 M2Crypto makes accessible to the Python programmer the following:
70 - DH, RSA, DSA, symmetric ciphers, message digests, HMACs.
71 - SSL functionality to implement clients and servers.
74 M2Crypto is released under a very liberal BSD-like licence. See
77 %description -n python3-%{module} -l pl.UTF-8
78 M2Crypto udostępnia z poziomu Pythona następujące funkcje:
79 - DH, RSA, DSA, szyfry symetryczne, skróty, HMAC
80 - SSL do implementacji klientów i serwerów
83 M2Crypto jest wydane na bardzo liberalnej licencji BSD - szczegóły w
87 %setup -q -n M2Crypto-%{version}
93 %py_build %{?with_tests:test}
97 %py3_build %{?with_tests:test}
101 rm -rf $RPM_BUILD_ROOT
113 rm -rf $RPM_BUILD_ROOT
117 %defattr(644,root,root,755)
118 %doc CHANGES LICENCE README.rst
119 %dir %{py_sitedir}/M2Crypto
120 %attr(755,root,root) %{py_sitedir}/M2Crypto/_m2crypto.so
121 %{py_sitedir}/M2Crypto/*.py[co]
122 %dir %{py_sitedir}/M2Crypto/SSL
123 %{py_sitedir}/M2Crypto/SSL/*.py[co]
124 %{py_sitedir}/M2Crypto-*.egg-info
128 %files -n python3-%{module}
129 %defattr(644,root,root,755)
130 %doc CHANGES LICENCE README.rst
131 %dir %{py3_sitedir}/%{module}
132 %{py3_sitedir}/%{module}/*.py
133 %attr(755,root,root) %{py3_sitedir}/%{module}/*.so
134 %{py3_sitedir}/%{module}/__pycache__
135 %dir %{py3_sitedir}/%{module}/SSL
136 %{py3_sitedir}/%{module}/SSL/*.py
137 %{py3_sitedir}/%{module}/SSL/__pycache__
138 %{py3_sitedir}/%{module}-%{version}-py*.egg-info