]>
Commit | Line | Data |
---|---|---|
c2789b23 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # test target [fails, some files are missing] | |
1ddc714e AM |
4 | %bcond_without doc # don't build doc |
5 | %bcond_without python2 # CPython 2.x module | |
6 | %bcond_without python3 # CPython 3.x module | |
7 | ||
8 | %define module M2Crypto | |
c2789b23 | 9 | |
0dc1620e | 10 | Summary: Python interface to OpenSSL |
f3256f05 | 11 | Summary(pl.UTF-8): Interfejs Pythona do OpenSSL |
2917fb4e | 12 | Name: python-M2Crypto |
1ddc714e | 13 | Version: 0.30.1 |
1ccac09c | 14 | Release: 4 |
db5bbf78 | 15 | License: BSD-like |
4988ab36 | 16 | Group: Libraries/Python |
c2789b23 | 17 | #Source0Download: https://pypi.python.org/simple/m2crypto/ |
1ddc714e AM |
18 | Source0: https://pypi.debian.net/M2Crypto/M2Crypto-%{version}.tar.gz |
19 | # Source0-md5: 7fce3cbf85eb84a669682892b935746b | |
c8750eea JB |
20 | Patch0: %{name}-store2ssl.patch |
21 | Patch1: %{name}-swig.patch | |
085d7304 | 22 | URL: https://gitlab.com/m2crypto/m2crypto |
c2789b23 | 23 | BuildRequires: openssl-devel >= 1.0.1e |
1ddc714e | 24 | %if %{with python2} |
c8750eea | 25 | BuildRequires: python-devel >= 1:2.6 |
c2789b23 JB |
26 | BuildRequires: python-modules >= 1:2.6 |
27 | BuildRequires: python-setuptools | |
c2789b23 | 28 | %endif |
1ddc714e AM |
29 | %if %{with python3} |
30 | BuildRequires: python3-devel | |
31 | BuildRequires: python3-modules | |
32 | BuildRequires: python3-setuptools | |
c2789b23 | 33 | %endif |
44aff576 | 34 | BuildRequires: rpm-pythonprov |
cf5fa816 | 35 | BuildRequires: rpmbuild(macros) >= 1.710 |
c8750eea | 36 | BuildRequires: swig-python >= 2.0 |
8a818010 | 37 | BuildRequires: unzip |
c2789b23 | 38 | Requires: openssl >= 1.0.1e |
1ddc714e | 39 | Requires: python-libs |
2917fb4e | 40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
41 | ||
2917fb4e | 42 | %description |
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. | |
46 | - S/MIME v2. | |
47 | ||
db5bbf78 | 48 | M2Crypto is released under a very liberal BSD-like licence. See |
2917fb4e | 49 | LICENCE for details. |
50 | ||
12a04f9d JR |
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 | |
e60c4f73 JB |
55 | - S/MIME v2. |
56 | ||
c2789b23 JB |
57 | M2Crypto jest wydane na bardzo liberalnej licencji BSD - szczegóły w |
58 | pliku LICENCE. | |
59 | ||
1ddc714e AM |
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 | |
67 | ||
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. | |
72 | - S/MIME v2. | |
73 | ||
74 | M2Crypto is released under a very liberal BSD-like licence. See | |
75 | LICENCE for details. | |
76 | ||
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 | |
81 | - S/MIME v2. | |
82 | ||
83 | M2Crypto jest wydane na bardzo liberalnej licencji BSD - szczegóły w | |
84 | pliku LICENCE. | |
85 | ||
2917fb4e | 86 | %prep |
e03c4abe | 87 | %setup -q -n M2Crypto-%{version} |
63fb16de | 88 | %patch0 -p1 |
60daa667 | 89 | %patch1 -p1 |
8be7ac7c | 90 | |
2917fb4e | 91 | %build |
1ddc714e | 92 | %if %{with python2} |
c2789b23 | 93 | %py_build %{?with_tests:test} |
1ddc714e AM |
94 | %endif |
95 | ||
96 | %if %{with python3} | |
97 | %py3_build %{?with_tests:test} | |
98 | %endif | |
2917fb4e | 99 | |
100 | %install | |
101 | rm -rf $RPM_BUILD_ROOT | |
84c63765 | 102 | |
1ddc714e | 103 | %if %{with python2} |
35ec8f26 | 104 | %py_install |
4988ab36 | 105 | %py_postclean |
1ddc714e AM |
106 | %endif |
107 | ||
108 | %if %{with python3} | |
109 | %py3_install | |
110 | %endif | |
24ac6e9a | 111 | |
2917fb4e | 112 | %clean |
113 | rm -rf $RPM_BUILD_ROOT | |
114 | ||
1ddc714e | 115 | %if %{with python2} |
2917fb4e | 116 | %files |
117 | %defattr(644,root,root,755) | |
c2789b23 | 118 | %doc CHANGES LICENCE README.rst |
24b30991 | 119 | %dir %{py_sitedir}/M2Crypto |
cb38e235 | 120 | %attr(755,root,root) %{py_sitedir}/M2Crypto/_m2crypto.so |
c8750eea | 121 | %{py_sitedir}/M2Crypto/*.py[co] |
5d2d2a18 | 122 | %dir %{py_sitedir}/M2Crypto/SSL |
c8750eea | 123 | %{py_sitedir}/M2Crypto/SSL/*.py[co] |
7662b057 | 124 | %{py_sitedir}/M2Crypto-*.egg-info |
1ddc714e AM |
125 | %endif |
126 | ||
127 | %if %{with python3} | |
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 | |
139 | %endif | |
140 |