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