]> git.pld-linux.org Git - SPECS.git/blob - sip.spec
SPECS updated Sun 1 Aug 20:13:02 CEST 2021
[SPECS.git] / sip.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x modules
4 %bcond_without  python3 # CPython 3.x modules
5 %bcond_without  pyqt4   # PyQt4.sip module
6 %bcond_without  pyqt5   # PyQt5.sip module
7
8 Summary:        Python bindings generator for C++ class libraries
9 Summary(pl.UTF-8):      Generator powiązań Pythona z bibliotekami klas C++
10 Name:           sip
11 Version:        4.19.24
12 Release:        2
13 Epoch:          2
14 License:        SIP (redistributable, see LICENSE) or GPL v2 or GPL v3
15 Group:          Development/Languages/Python
16 Source0:        https://www.riverbankcomputing.com/static/Downloads/sip/%{version}/%{name}-%{version}.tar.gz
17 # Source0-md5:  595e9ad6bb0a4b3a6ea92c163a05d19c
18 URL:            http://www.riverbankcomputing.com/software/sip/
19 BuildRequires:  libstdc++-devel
20 BuildRequires:  python-devel >= 1:2.3
21 BuildRequires:  python3-devel >= 1:3.2
22 BuildRequires:  rpm-pythonprov
23 BuildRequires:  rpmbuild(macros) >= 1.167
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 %define         _sipfilesdir    %{_datadir}/sip
27
28 %description
29 SIP generates Python bindings for C++ class libraries from a set of
30 class specification files. It supports Python v2 and v3.
31
32 %description -l pl.UTF-8
33 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
34 plików ze specyfikacjami klas. Obsługiwany jest Python 2 i 3.
35
36 %package -n python-sip
37 Summary:        Python 2 module needed by SIP generated bindings
38 Summary(pl.UTF-8):      Moduł Pythona 2 wymagany przez wiązania wygenerowane przez SIP
39 Group:          Libraries/Python
40 Requires:       python-libs
41
42 %description -n python-sip
43 SIP generates Python bindings for C++ class libraries from a set of
44 class specification files. This package includes Python 2 runtime
45 library needed by all generated bindings.
46
47 %description -n python-sip -l pl.UTF-8
48 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
49 plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2
50 potrzebną do uruchomienia wszystkich wygenerowanych powiązań.
51
52 %package -n python-sip-devel
53 Summary:        Python 2 development files needed to build bindings using SIP
54 Summary(pl.UTF-8):      Pliki programistyczne Pythona 2 potrzebne do budowania wiązań przy użyciu SIP-a
55 Group:          Development/Libraries
56 Requires:       %{name} = %{epoch}:%{version}-%{release}
57 Requires:       python-devel >= 1:2.3
58
59 %description -n python-sip-devel
60 Python 2 development files needed to build bindings for C++ classes
61 using SIP.
62
63 %description -n python-sip-devel -l pl.UTF-8
64 Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla klas
65 C++ przy użyciu SIP-a.
66
67 %package -n python-PyQt4-sip
68 Summary:        Python 2 module needed by SIP generated bindings for PyQt4
69 Summary(pl.UTF-8):      Moduł Pythona 2 wymagany przez wiązania wygenerowane przez SIP dla PyQt4
70 Group:          Libraries/Python
71 Requires:       python-libs
72
73 %description -n python-PyQt4-sip
74 SIP generates Python bindings for C++ class libraries from a set of
75 class specification files. This package includes Python 2 runtime
76 library needed by all generated bindings for PyQt4.
77
78 %description -n python-PyQt4-sip -l pl.UTF-8
79 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
80 plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2
81 potrzebną do uruchomienia wszystkich wygenerowanych wiązań dla PyQt4.
82
83 %package -n python-PyQt4-sip-devel
84 Summary:        Python 2 development files needed to build bindings for PyQt4 using SIP
85 Summary(pl.UTF-8):      Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla PyQt4 przy użyciu SIP-a
86 Group:          Development/Libraries
87 Requires:       python-PyQt4-sip = %{epoch}:%{version}-%{release}
88 Requires:       python-sip-devel = %{epoch}:%{version}-%{release}
89
90 %description -n python-PyQt4-sip-devel
91 Python 2 development files needed to build bindings for C++ classes
92 for PyQt4 using SIP.
93
94 %description -n python-PyQt4-sip-devel -l pl.UTF-8
95 Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla klas
96 C++ dla PyQt4 przy użyciu SIP-a.
97
98 %package -n python-PyQt5-sip
99 Summary:        Python 2 module needed by SIP generated bindings for PyQt5
100 Summary(pl.UTF-8):      Moduł Pythona 2 wymagany przez wiązania wygenerowane przez SIP dla PyQt5
101 Group:          Libraries/Python
102 Requires:       python-libs
103
104 %description -n python-PyQt5-sip
105 SIP generates Python bindings for C++ class libraries from a set of
106 class specification files. This package includes Python 2 runtime
107 library needed by all generated bindings for PyQt5.
108
109 %description -n python-PyQt5-sip -l pl.UTF-8
110 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
111 plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2
112 potrzebną do uruchomienia wszystkich wygenerowanych wiązań dla PyQt5.
113
114 %package -n python-PyQt5-sip-devel
115 Summary:        Python 2 development files needed to build bindings for PyQt5 using SIP
116 Summary(pl.UTF-8):      Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla PyQt5 przy użyciu SIP-a
117 Group:          Development/Libraries
118 Requires:       python-PyQt5-sip = %{epoch}:%{version}-%{release}
119 Requires:       python-sip-devel = %{epoch}:%{version}-%{release}
120
121 %description -n python-PyQt5-sip-devel
122 Python 2 development files needed to build bindings for C++ classes
123 for PyQt5 using SIP.
124
125 %description -n python-PyQt5-sip-devel -l pl.UTF-8
126 Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla klas
127 C++ dla PyQt5 przy użyciu SIP-a.
128
129 %package -n python3-sip
130 Summary:        Python 3 module needed by SIP generated bindings
131 Summary(pl.UTF-8):      Moduł Pythona 3 wymagany przez wiązania wygenerowane przez SIP
132 Group:          Libraries/Python
133 Requires:       python3-libs
134
135 %description -n python3-sip
136 SIP generates Python bindings for C++ class libraries from a set of
137 class specification files. This package includes Python 3 runtime
138 library needed by all generated bindings.
139
140 %description -n python3-sip -l pl.UTF-8
141 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
142 plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 3
143 potrzebną do uruchomienia wszystkich wygenerowanych powiązań.
144
145 %package -n python3-sip-devel
146 Summary:        Python 3 development files needed to build bindings using SIP
147 Summary(pl.UTF-8):      Pliki programistyczne Pythona 3 potrzebne do budowania wiązań przy użyciu SIP-a
148 Group:          Development/Libraries
149 Requires:       %{name} = %{epoch}:%{version}-%{release}
150 Requires:       python3-sip = %{epoch}:%{version}-%{release}
151 Requires:       python3-devel >= 1:3.2
152
153 %description -n python3-sip-devel
154 Python 3 development files needed to build bindings for C++ classes
155 using SIP.
156
157 %description -n python3-sip-devel -l pl.UTF-8
158 Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla klas
159 C++ przy użyciu SIP-a.
160
161 %package -n python3-PyQt4-sip
162 Summary:        Python 3 module needed by SIP generated bindings for PyQt4
163 Summary(pl.UTF-8):      Moduł Pythona 3 wymagany przez wiązania wygenerowane przez SIP dla PyQt4
164 Group:          Libraries/Python
165 Requires:       python3-libs
166
167 %description -n python3-PyQt4-sip
168 SIP generates Python bindings for C++ class libraries from a set of
169 class specification files. This package includes Python 2 runtime
170 library needed by all generated bindings for PyQt4.
171
172 %description -n python3-PyQt4-sip -l pl.UTF-8
173 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
174 plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2
175 potrzebną do uruchomienia wszystkich wygenerowanych wiązań dla PyQt4.
176
177 %package -n python3-PyQt4-sip-devel
178 Summary:        Python 3 development files needed to build bindings for PyQt4 using SIP
179 Summary(pl.UTF-8):      Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla PyQt4 przy użyciu SIP-a
180 Group:          Development/Libraries
181 Requires:       python3-PyQt4-sip = %{epoch}:%{version}-%{release}
182 Requires:       python3-sip-devel = %{epoch}:%{version}-%{release}
183
184 %description -n python3-PyQt4-sip-devel
185 Python 3 development files needed to build bindings for C++ classes
186 for PyQt4 using SIP.
187
188 %description -n python3-PyQt4-sip-devel -l pl.UTF-8
189 Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla klas
190 C++ dla PyQt4 przy użyciu SIP-a.
191
192 %package -n python3-PyQt5-sip
193 Summary:        Python 3 module needed by SIP generated bindings for PyQt5
194 Summary(pl.UTF-8):      Moduł Pythona 3 wymagany przez wiązania wygenerowane przez SIP dla PyQt5
195 Group:          Libraries/Python
196 Requires:       python3-libs
197
198 %description -n python3-PyQt5-sip
199 SIP generates Python bindings for C++ class libraries from a set of
200 class specification files. This package includes Python 2 runtime
201 library needed by all generated bindings for PyQt5.
202
203 %description -n python3-PyQt5-sip -l pl.UTF-8
204 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
205 plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2
206 potrzebną do uruchomienia wszystkich wygenerowanych wiązań dla PyQt5.
207
208 %package -n python3-PyQt5-sip-devel
209 Summary:        Python 3 development files needed to build bindings for PyQt5 using SIP
210 Summary(pl.UTF-8):      Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla PyQt5 przy użyciu SIP-a
211 Group:          Development/Libraries
212 Requires:       python3-PyQt5-sip = %{epoch}:%{version}-%{release}
213 Requires:       python3-sip-devel = %{epoch}:%{version}-%{release}
214
215 %description -n python3-PyQt5-sip-devel
216 Python 3 development files needed to build bindings for C++ classes
217 for PyQt5 using SIP.
218
219 %description -n python3-PyQt5-sip-devel -l pl.UTF-8
220 Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla klas
221 C++ dla PyQt5 przy użyciu SIP-a.
222
223 %prep
224 %setup -q
225
226 %build
227 # configure.py notes:
228 # - macros overrides must be last
229 # - cannot pass CXXFLAGS+="%{rpmcflags}" or so - builtin -O2 overrides rpmcflags
230
231 %if %{with python2}
232 install -d build-py2
233 cd build-py2
234 %{__python} ../configure.py \
235         -b %{_bindir} \
236         -e %{py_incdir} \
237         -v %{_sipfilesdir} \
238         -d %{py_sitedir} \
239         CC="%{__cc}" \
240         CXX="%{__cxx}" \
241         CFLAGS="%{rpmcflags} %{rpmcppflags}" \
242         CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
243         LINK="%{__cxx}" \
244         LINK_SHLIB="%{__cxx}"
245
246 %{__make}
247 cd ..
248
249 %if %{with pyqt4} || %{with pyqt5}
250 for mod in %{?with_pyqt4:PyQt4} %{?with_pyqt5:PyQt5} ; do
251 install -d build-py2-${mod}
252 cd build-py2-${mod}
253 %{__python} ../configure.py \
254         --sip-module=${mod}.sip \
255         --no-dist-info \
256         --no-tools \
257         -e %{py_incdir} \
258         -v %{_sipfilesdir} \
259         -d %{py_sitedir} \
260         CC="%{__cc}" \
261         CXX="%{__cxx}" \
262         CFLAGS="%{rpmcflags} %{rpmcppflags}" \
263         CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
264         LINK="%{__cxx}" \
265         LINK_SHLIB="%{__cxx}"
266
267 %{__make}
268 cd ..
269 done
270 %endif
271 %endif
272
273 %if %{with python3}
274 install -d build-py3
275 cd build-py3
276 %{__python3} ../configure.py \
277         -b %{_bindir} \
278         -e %{py3_incdir} \
279         -v %{_sipfilesdir} \
280         -d %{py3_sitedir} \
281         CC="%{__cc}" \
282         CXX="%{__cxx}" \
283         CFLAGS="%{rpmcflags} %{rpmcppflags}" \
284         CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
285         LINK="%{__cxx}" \
286         LINK_SHLIB="%{__cxx}"
287
288 %{__make}
289 cd ..
290
291 %if %{with pyqt4} || %{with pyqt5}
292 for mod in %{?with_pyqt4:PyQt4} %{?with_pyqt5:PyQt5} ; do
293 install -d build-py3-${mod}
294 cd build-py3-${mod}
295 %{__python3} ../configure.py \
296         --sip-module=${mod}.sip \
297         --no-dist-info \
298         --no-tools \
299         -e %{py3_incdir} \
300         -v %{_sipfilesdir} \
301         -d %{py3_sitedir} \
302         CC="%{__cc}" \
303         CXX="%{__cxx}" \
304         CFLAGS="%{rpmcflags} %{rpmcppflags}" \
305         CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
306         LINK="%{__cxx}" \
307         LINK_SHLIB="%{__cxx}"
308
309 %{__make}
310 cd ..
311 done
312 %endif
313 %endif
314
315 %install
316 rm -rf $RPM_BUILD_ROOT
317 install -d $RPM_BUILD_ROOT%{_sipfilesdir}
318
319 %if %{with python2}
320 %{__make} -C build-py2 install \
321         DESTDIR=$RPM_BUILD_ROOT
322
323 %if %{with pyqt4} || %{with pyqt5}
324 for mod in %{?with_pyqt4:PyQt4} %{?with_pyqt5:PyQt5} ; do
325 %{__make} -C build-py2-${mod} install \
326         DESTDIR=$RPM_BUILD_ROOT
327
328 # ensure content is the same and hardlink
329 cmp $RPM_BUILD_ROOT%{py_sitedir}/sip.pyi $RPM_BUILD_ROOT%{py_sitedir}/${mod}/sip.pyi
330 ln -f $RPM_BUILD_ROOT%{py_sitedir}/sip.pyi $RPM_BUILD_ROOT%{py_sitedir}/${mod}/sip.pyi
331 done
332 %endif
333
334 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
335 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
336 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/sip-%{version}.dist-info
337 %endif
338
339 %if %{with python3}
340 %{__make} -C build-py3 install \
341         DESTDIR=$RPM_BUILD_ROOT
342
343 %if %{with pyqt4} || %{with pyqt5}
344 for mod in %{?with_pyqt4:PyQt4} %{?with_pyqt5:PyQt5} ; do
345 %{__make} -C build-py3-${mod} install \
346         DESTDIR=$RPM_BUILD_ROOT
347
348 # ensure content is the same and hardlink
349 cmp $RPM_BUILD_ROOT%{py3_sitedir}/sip.pyi $RPM_BUILD_ROOT%{py3_sitedir}/${mod}/sip.pyi
350 ln -f $RPM_BUILD_ROOT%{py3_sitedir}/sip.pyi $RPM_BUILD_ROOT%{py3_sitedir}/${mod}/sip.pyi
351 done
352 %endif
353
354 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
355 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
356 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/sip-%{version}.dist-info
357 %endif
358
359 %clean
360 rm -rf $RPM_BUILD_ROOT
361
362 %files
363 %defattr(644,root,root,755)
364 %doc LICENSE NEWS README doc/html
365 %attr(755,root,root) %{_bindir}/sip
366 %dir %{_sipfilesdir}
367
368 %if %{with python2}
369 %files -n python-sip
370 %defattr(644,root,root,755)
371 %attr(755,root,root) %{py_sitedir}/sip.so
372
373 %files -n python-sip-devel
374 %defattr(644,root,root,755)
375 %{py_sitedir}/sipconfig.py
376 %{py_sitedir}/sipconfig.py[co]
377 %{py_sitedir}/sipdistutils.py
378 %{py_sitedir}/sipdistutils.py[co]
379 %{py_sitedir}/sip.pyi
380 %{py_incdir}/sip.h
381
382 %if %{with pyqt4}
383 %files -n python-PyQt4-sip
384 %defattr(644,root,root,755)
385 %dir %{py_sitedir}/PyQt4
386 %attr(755,root,root) %{py_sitedir}/PyQt4/sip.so
387
388 %files -n python-PyQt4-sip-devel
389 %defattr(644,root,root,755)
390 %{py_sitedir}/PyQt4/sip.pyi
391 %endif
392
393 %if %{with pyqt5}
394 %files -n python-PyQt5-sip
395 %defattr(644,root,root,755)
396 %dir %{py_sitedir}/PyQt5
397 %attr(755,root,root) %{py_sitedir}/PyQt5/sip.so
398
399 %files -n python-PyQt5-sip-devel
400 %defattr(644,root,root,755)
401 %{py_sitedir}/PyQt5/sip.pyi
402 %endif
403 %endif
404
405 %if %{with python3}
406 %files -n python3-sip
407 %defattr(644,root,root,755)
408 %attr(755,root,root) %{py3_sitedir}/sip.so
409
410 %files -n python3-sip-devel
411 %defattr(644,root,root,755)
412 %{py3_sitedir}/sipconfig.py
413 %{py3_sitedir}/sipdistutils.py
414 %{py3_sitedir}/__pycache__/sipconfig.cpython-*.py[co]
415 %{py3_sitedir}/__pycache__/sipdistutils.cpython-*.py[co]
416 %{py3_sitedir}/sip.pyi
417 %{py3_incdir}/sip.h
418
419 %if %{with pyqt4}
420 %files -n python3-PyQt4-sip
421 %defattr(644,root,root,755)
422 %dir %{py3_sitedir}/PyQt4
423 %attr(755,root,root) %{py3_sitedir}/PyQt4/sip.so
424
425 %files -n python3-PyQt4-sip-devel
426 %defattr(644,root,root,755)
427 %{py3_sitedir}/PyQt4/sip.pyi
428 %endif
429
430 %if %{with pyqt5}
431 %files -n python3-PyQt5-sip
432 %defattr(644,root,root,755)
433 %dir %{py3_sitedir}/PyQt5
434 %attr(755,root,root) %{py3_sitedir}/PyQt5/sip.so
435
436 %files -n python3-PyQt5-sip-devel
437 %defattr(644,root,root,755)
438 %{py3_sitedir}/PyQt5/sip.pyi
439 %endif
440 %endif
This page took 0.673745 seconds and 3 git commands to generate.