]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
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 | |
7 | ||
8 | %define module M2Crypto | |
9 | ||
10 | Summary: Python interface to OpenSSL | |
11 | Summary(pl.UTF-8): Interfejs Pythona do OpenSSL | |
12 | Name: python-M2Crypto | |
13 | Version: 0.38.0 | |
14 | Release: 3 | |
15 | License: BSD-like | |
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: 8f39bfac730b6567e0c2179d15318c60 | |
20 | URL: https://gitlab.com/m2crypto/m2crypto | |
21 | BuildRequires: openssl-devel >= 1.0.1e | |
22 | %if %{with python2} | |
23 | BuildRequires: python-devel >= 1:2.6 | |
24 | BuildRequires: python-modules >= 1:2.6 | |
25 | BuildRequires: python-setuptools | |
26 | %endif | |
27 | %if %{with python3} | |
28 | BuildRequires: python3-devel | |
29 | BuildRequires: python3-modules | |
30 | BuildRequires: python3-setuptools | |
31 | %endif | |
32 | BuildRequires: rpm-pythonprov | |
33 | BuildRequires: rpmbuild(macros) >= 1.710 | |
34 | BuildRequires: swig-python >= 2.0 | |
35 | BuildRequires: unzip | |
36 | Requires: openssl >= 1.0.1e | |
37 | Requires: python-libs | |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
39 | ||
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 | ||
46 | M2Crypto is released under a very liberal BSD-like licence. See | |
47 | LICENCE for details. | |
48 | ||
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 | |
53 | - S/MIME v2. | |
54 | ||
55 | M2Crypto jest wydane na bardzo liberalnej licencji BSD - szczegóły w | |
56 | pliku LICENCE. | |
57 | ||
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 | ||
84 | %prep | |
85 | %setup -q -n M2Crypto-%{version} | |
86 | ||
87 | %build | |
88 | %if %{with python2} | |
89 | %py_build %{?with_tests:test} | |
90 | %endif | |
91 | ||
92 | %if %{with python3} | |
93 | %py3_build %{?with_tests:test} | |
94 | %endif | |
95 | ||
96 | %install | |
97 | rm -rf $RPM_BUILD_ROOT | |
98 | ||
99 | %if %{with python2} | |
100 | %py_install | |
101 | %py_postclean | |
102 | %endif | |
103 | ||
104 | %if %{with python3} | |
105 | %py3_install | |
106 | %endif | |
107 | ||
108 | %clean | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
111 | %if %{with python2} | |
112 | %files | |
113 | %defattr(644,root,root,755) | |
114 | %doc CHANGES LICENCE README.rst | |
115 | %dir %{py_sitedir}/M2Crypto | |
116 | %attr(755,root,root) %{py_sitedir}/M2Crypto/_m2crypto.so | |
117 | %{py_sitedir}/M2Crypto/*.py[co] | |
118 | %dir %{py_sitedir}/M2Crypto/SSL | |
119 | %{py_sitedir}/M2Crypto/SSL/*.py[co] | |
120 | %{py_sitedir}/M2Crypto-*.egg-info | |
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 |