]>
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 |
183127c6 JR |
13 | Version: 0.38.0 |
14 | Release: 1 | |
db5bbf78 | 15 | License: BSD-like |
4988ab36 | 16 | Group: Libraries/Python |
c2789b23 | 17 | #Source0Download: https://pypi.python.org/simple/m2crypto/ |
1ddc714e | 18 | Source0: https://pypi.debian.net/M2Crypto/M2Crypto-%{version}.tar.gz |
183127c6 | 19 | # Source0-md5: 8f39bfac730b6567e0c2179d15318c60 |
085d7304 | 20 | URL: https://gitlab.com/m2crypto/m2crypto |
c2789b23 | 21 | BuildRequires: openssl-devel >= 1.0.1e |
1ddc714e | 22 | %if %{with python2} |
c8750eea | 23 | BuildRequires: python-devel >= 1:2.6 |
c2789b23 JB |
24 | BuildRequires: python-modules >= 1:2.6 |
25 | BuildRequires: python-setuptools | |
c2789b23 | 26 | %endif |
1ddc714e AM |
27 | %if %{with python3} |
28 | BuildRequires: python3-devel | |
29 | BuildRequires: python3-modules | |
30 | BuildRequires: python3-setuptools | |
c2789b23 | 31 | %endif |
44aff576 | 32 | BuildRequires: rpm-pythonprov |
cf5fa816 | 33 | BuildRequires: rpmbuild(macros) >= 1.710 |
c8750eea | 34 | BuildRequires: swig-python >= 2.0 |
8a818010 | 35 | BuildRequires: unzip |
c2789b23 | 36 | Requires: openssl >= 1.0.1e |
1ddc714e | 37 | Requires: python-libs |
2917fb4e | 38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
2917fb4e | 40 | %description |
41 | M2Crypto makes accessible to the Python programmer the following: | |
42 | - DH, RSA, DSA, symmetric ciphers, message digests, HMACs. | |
43 | - SSL functionality to implement clients and servers. | |
44 | - S/MIME v2. | |
45 | ||
db5bbf78 | 46 | M2Crypto is released under a very liberal BSD-like licence. See |
2917fb4e | 47 | LICENCE for details. |
48 | ||
12a04f9d JR |
49 | %description -l pl.UTF-8 |
50 | M2Crypto udostępnia z poziomu Pythona następujące funkcje: | |
51 | - DH, RSA, DSA, szyfry symetryczne, skróty, HMAC | |
52 | - SSL do implementacji klientów i serwerów | |
e60c4f73 JB |
53 | - S/MIME v2. |
54 | ||
c2789b23 JB |
55 | M2Crypto jest wydane na bardzo liberalnej licencji BSD - szczegóły w |
56 | pliku LICENCE. | |
57 | ||
1ddc714e AM |
58 | %package -n python3-%{module} |
59 | Summary: Python interface to OpenSSL | |
60 | Summary(pl.UTF-8): Interfejs Pythona do OpenSSL | |
61 | Group: Libraries/Python | |
62 | Requires: openssl >= 1.0.1 | |
63 | Requires: python3-libs | |
64 | Requires: python3-modules | |
65 | ||
66 | %description -n python3-%{module} | |
67 | M2Crypto makes accessible to the Python programmer the following: | |
68 | - DH, RSA, DSA, symmetric ciphers, message digests, HMACs. | |
69 | - SSL functionality to implement clients and servers. | |
70 | - S/MIME v2. | |
71 | ||
72 | M2Crypto is released under a very liberal BSD-like licence. See | |
73 | LICENCE for details. | |
74 | ||
75 | %description -n python3-%{module} -l pl.UTF-8 | |
76 | M2Crypto udostępnia z poziomu Pythona następujące funkcje: | |
77 | - DH, RSA, DSA, szyfry symetryczne, skróty, HMAC | |
78 | - SSL do implementacji klientów i serwerów | |
79 | - S/MIME v2. | |
80 | ||
81 | M2Crypto jest wydane na bardzo liberalnej licencji BSD - szczegóły w | |
82 | pliku LICENCE. | |
83 | ||
2917fb4e | 84 | %prep |
e03c4abe | 85 | %setup -q -n M2Crypto-%{version} |
8be7ac7c | 86 | |
2917fb4e | 87 | %build |
1ddc714e | 88 | %if %{with python2} |
c2789b23 | 89 | %py_build %{?with_tests:test} |
1ddc714e AM |
90 | %endif |
91 | ||
92 | %if %{with python3} | |
93 | %py3_build %{?with_tests:test} | |
94 | %endif | |
2917fb4e | 95 | |
96 | %install | |
97 | rm -rf $RPM_BUILD_ROOT | |
84c63765 | 98 | |
1ddc714e | 99 | %if %{with python2} |
35ec8f26 | 100 | %py_install |
4988ab36 | 101 | %py_postclean |
1ddc714e AM |
102 | %endif |
103 | ||
104 | %if %{with python3} | |
105 | %py3_install | |
106 | %endif | |
24ac6e9a | 107 | |
2917fb4e | 108 | %clean |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
1ddc714e | 111 | %if %{with python2} |
2917fb4e | 112 | %files |
113 | %defattr(644,root,root,755) | |
c2789b23 | 114 | %doc CHANGES LICENCE README.rst |
24b30991 | 115 | %dir %{py_sitedir}/M2Crypto |
cb38e235 | 116 | %attr(755,root,root) %{py_sitedir}/M2Crypto/_m2crypto.so |
c8750eea | 117 | %{py_sitedir}/M2Crypto/*.py[co] |
5d2d2a18 | 118 | %dir %{py_sitedir}/M2Crypto/SSL |
c8750eea | 119 | %{py_sitedir}/M2Crypto/SSL/*.py[co] |
7662b057 | 120 | %{py_sitedir}/M2Crypto-*.egg-info |
1ddc714e AM |
121 | %endif |
122 | ||
123 | %if %{with python3} | |
124 | %files -n python3-%{module} | |
125 | %defattr(644,root,root,755) | |
126 | %doc CHANGES LICENCE README.rst | |
127 | %dir %{py3_sitedir}/%{module} | |
128 | %{py3_sitedir}/%{module}/*.py | |
129 | %attr(755,root,root) %{py3_sitedir}/%{module}/*.so | |
130 | %{py3_sitedir}/%{module}/__pycache__ | |
131 | %dir %{py3_sitedir}/%{module}/SSL | |
132 | %{py3_sitedir}/%{module}/SSL/*.py | |
133 | %{py3_sitedir}/%{module}/SSL/__pycache__ | |
134 | %{py3_sitedir}/%{module}-%{version}-py*.egg-info | |
135 | %endif | |
136 |