]> git.pld-linux.org Git - packages/sip.git/blob - sip.spec
- updated deps and files
[packages/sip.git] / sip.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x modules
4 %bcond_without  python3 # CPython 3.x modules
5
6 Summary:        Python bindings generator for C++ class libraries
7 Summary(pl.UTF-8):      Generator powiązań Pythona z bibliotekami klas C++
8 Name:           sip
9 Version:        4.19.12
10 Release:        6
11 Epoch:          2
12 License:        SIP (redistributable, see LICENSE) or GPL v2 or GPL v3
13 Group:          Development/Languages/Python
14 Source0:        http://downloads.sourceforge.net/pyqt/sip-%{version}.tar.gz
15 # Source0-md5:  e28b0790dfe4962ce6bbd7c4772f40c9
16 URL:            http://www.riverbankcomputing.com/software/sip/
17 BuildRequires:  libstdc++-devel
18 BuildRequires:  python-devel >= 1:2.3
19 BuildRequires:  python3-devel >= 1:3.2
20 BuildRequires:  rpm-pythonprov
21 BuildRequires:  rpmbuild(macros) >= 1.167
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define         _sipfilesdir    %{_datadir}/sip
25
26 %description
27 SIP generates Python bindings for C++ class libraries from a set of
28 class specification files. It supports Python v2 and v3.
29
30 %description -l pl.UTF-8
31 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
32 plików ze specyfikacjami klas. Obsługiwany jest Python 2 i 3.
33
34 %package -n python-sip
35 Summary:        Python 2 module needed by SIP generated bindings
36 Summary(pl.UTF-8):      Moduł Pythona 2 wymagany przez wiązania wygenerowane przez SIP
37 Group:          Libraries/Python
38 Requires:       python-libs
39
40 %description -n python-sip
41 SIP generates Python bindings for C++ class libraries from a set of
42 class specification files. This package includes Python 2 runtime
43 library needed by all generated bindings.
44
45 %description -n python-sip -l pl.UTF-8
46 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
47 plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2
48 potrzebną do uruchomienia wszystkich wygenerowanych powiązań.
49
50 %package -n python-PyQt5-sip
51 Summary:        Python 2 module needed by SIP generated bindings
52 Summary(pl.UTF-8):      Moduł Pythona 2 wymagany przez wiązania wygenerowane przez SIP
53 Group:          Libraries/Python
54 Requires:       python-libs
55
56 %description -n python-PyQt5-sip
57 SIP generates Python bindings for C++ class libraries from a set of
58 class specification files. This package includes Python 2 runtime
59 library needed by all generated bindings.
60
61 PyQt5 private copy.
62
63 %description -n python-PyQt5-sip -l pl.UTF-8
64 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
65 plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 2
66 potrzebną do uruchomienia wszystkich wygenerowanych powiązań.
67
68 Prywatna kopia PyQt5.
69
70 %package -n python-sip-devel
71 Summary:        Python 2 development files needed to build bindings using SIP
72 Summary(pl.UTF-8):      Pliki programistyczne Pythona 2 potrzebne do budowania wiązań przy użyciu SIP-a
73 Group:          Development/Libraries
74 Requires:       %{name} = %{epoch}:%{version}-%{release}
75 Requires:       python-sip = %{epoch}:%{version}-%{release}
76 Requires:       python-PyQt5-sip = %{epoch}:%{version}-%{release}
77 Requires:       python-devel >= 1:2.3
78
79 %description -n python-sip-devel
80 Python 2 development files needed to build bindings for C++ classes
81 using SIP.
82
83 %description -n python-sip-devel -l pl.UTF-8
84 Pliki programistyczne Pythona 2 potrzebne do budowania wiązań dla klas
85 C++ przy użyciu SIP-a.
86
87 %package -n python3-sip
88 Summary:        Python 3 module needed by SIP generated bindings
89 Summary(pl.UTF-8):      Moduł Pythona 3 wymagany przez wiązania wygenerowane przez SIP
90 Group:          Libraries/Python
91 Requires:       python3-libs
92
93 %description -n python3-sip
94 SIP generates Python bindings for C++ class libraries from a set of
95 class specification files. This package includes Python 3 runtime
96 library needed by all generated bindings.
97
98 %description -n python3-sip -l pl.UTF-8
99 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
100 plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 3
101 potrzebną do uruchomienia wszystkich wygenerowanych powiązań.
102
103 %package -n python3-PyQt5-sip
104 Summary:        Python 3 module needed by SIP generated bindings
105 Summary(pl.UTF-8):      Moduł Pythona 3 wymagany przez wiązania wygenerowane przez SIP
106 Group:          Libraries/Python
107 Requires:       python3-libs
108
109 %description -n python3-PyQt5-sip
110 SIP generates Python bindings for C++ class libraries from a set of
111 class specification files. This package includes Python 3 runtime
112 library needed by all generated bindings.
113
114 PyQt5 private copy.
115
116 %description -n python3-PyQt5-sip -l pl.UTF-8
117 SIP generuje powiązania Pythona z bibliotekami klas C++ ze zbioru
118 plików ze specyfikacjami klas. Ten pakiet zawiera bibliotekę Pythona 3
119 potrzebną do uruchomienia wszystkich wygenerowanych powiązań.
120
121 Prywatna kopia PyQt5.
122
123 %package -n python3-sip-devel
124 Summary:        Python 3 development files needed to build bindings using SIP
125 Summary(pl.UTF-8):      Pliki programistyczne Pythona 3 potrzebne do budowania wiązań przy użyciu SIP-a
126 Group:          Development/Libraries
127 Requires:       %{name} = %{epoch}:%{version}-%{release}
128 Requires:       python3-sip = %{epoch}:%{version}-%{release}
129 Requires:       python3-PyQt5-sip = %{epoch}:%{version}-%{release}
130 Requires:       python3-devel >= 1:3.2
131
132 %description -n python3-sip-devel
133 Python 3 development files needed to build bindings for C++ classes
134 using SIP.
135
136 %description -n python3-sip-devel -l pl.UTF-8
137 Pliki programistyczne Pythona 3 potrzebne do budowania wiązań dla klas
138 C++ przy użyciu SIP-a.
139
140 %prep
141 %setup -q
142
143 %build
144 # configure.py notes:
145 # - macros overrides must be last
146 # - cannot pass CXXFLAGS+="%{rpmcflags}" or so - builtin -O2 overrides rpmcflags
147
148 %if %{with python2}
149 install -d build-py2
150 cd build-py2
151 %{__python} ../configure.py \
152         -b %{_bindir} \
153         -e %{py_incdir} \
154         -v %{_sipfilesdir} \
155         -d %{py_sitedir} \
156         CC="%{__cc}" \
157         CXX="%{__cxx}" \
158         CFLAGS="%{rpmcflags} %{rpmcppflags}" \
159         CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
160         LINK="%{__cxx}" \
161         LINK_SHLIB="%{__cxx}"
162
163 %{__make}
164 cd ..
165
166 install -d build-py2-PyQt5
167 cd build-py2-PyQt5
168 %{__python} ../configure.py \
169         --sip-module=PyQt5.sip \
170         -b %{_bindir} \
171         -e %{py_incdir} \
172         -v %{_sipfilesdir} \
173         -d %{py_sitedir} \
174         CC="%{__cc}" \
175         CXX="%{__cxx}" \
176         CFLAGS="%{rpmcflags} %{rpmcppflags}" \
177         CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
178         LINK="%{__cxx}" \
179         LINK_SHLIB="%{__cxx}"
180
181 %{__make}
182 cd ..
183 %endif
184
185 %if %{with python3}
186 install -d build-py3
187 cd build-py3
188 %{__python3} ../configure.py \
189         -b %{_bindir} \
190         -e %{py3_incdir} \
191         -v %{_sipfilesdir} \
192         -d %{py3_sitedir} \
193         CC="%{__cc}" \
194         CXX="%{__cxx}" \
195         CFLAGS="%{rpmcflags} %{rpmcppflags}" \
196         CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
197         LINK="%{__cxx}" \
198         LINK_SHLIB="%{__cxx}"
199
200 %{__make}
201 cd ..
202
203 install -d build-py3-PyQt5
204 cd build-py3-PyQt5
205 %{__python3} ../configure.py \
206         --sip-module=PyQt5.sip \
207         -b %{_bindir} \
208         -e %{py3_incdir} \
209         -v %{_sipfilesdir} \
210         -d %{py3_sitedir} \
211         CC="%{__cc}" \
212         CXX="%{__cxx}" \
213         CFLAGS="%{rpmcflags} %{rpmcppflags}" \
214         CXXFLAGS="%{rpmcxxflags} %{rpmcppflags}" \
215         LINK="%{__cxx}" \
216         LINK_SHLIB="%{__cxx}"
217
218 %{__make}
219 cd ..
220 %endif
221
222 %install
223 rm -rf $RPM_BUILD_ROOT
224 install -d $RPM_BUILD_ROOT%{_sipfilesdir}
225
226 %if %{with python2}
227 %{__make} -C build-py2 install \
228         DESTDIR=$RPM_BUILD_ROOT
229
230 %{__make} -C build-py2-PyQt5 install \
231         DESTDIR=$RPM_BUILD_ROOT
232
233 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
234 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
235 %endif
236
237 %if %{with python3}
238 %{__make} -C build-py3 install \
239         DESTDIR=$RPM_BUILD_ROOT
240
241 %{__make} -C build-py3-PyQt5 install \
242         DESTDIR=$RPM_BUILD_ROOT
243
244 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
245 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
246 %endif
247
248 %clean
249 rm -rf $RPM_BUILD_ROOT
250
251 %files
252 %defattr(644,root,root,755)
253 %doc LICENSE NEWS README doc/html
254 %attr(755,root,root) %{_bindir}/sip
255 %dir %{_sipfilesdir}
256
257 %if %{with python2}
258 %files -n python-sip
259 %defattr(644,root,root,755)
260 %attr(755,root,root) %{py_sitedir}/sip.so
261
262 %files -n python-PyQt5-sip
263 %defattr(644,root,root,755)
264 %dir %{py_sitedir}/PyQt5
265 %attr(755,root,root) %{py_sitedir}/PyQt5/sip.so
266
267 %files -n python-sip-devel
268 %defattr(644,root,root,755)
269 %{py_sitedir}/sipconfig.py
270 %{py_sitedir}/sipconfig.py[co]
271 %{py_sitedir}/sipdistutils.py
272 %{py_sitedir}/sipdistutils.py[co]
273 %{py_sitedir}/sip.pyi
274 %{py_sitedir}/PyQt5/sip.pyi
275 %{py_incdir}/sip.h
276 %endif
277
278 %if %{with python3}
279 %files -n python3-sip
280 %defattr(644,root,root,755)
281 %attr(755,root,root) %{py3_sitedir}/sip.so
282
283 %files -n python3-PyQt5-sip
284 %defattr(644,root,root,755)
285 %dir %{py3_sitedir}/PyQt5
286 %attr(755,root,root) %{py3_sitedir}/PyQt5/sip.so
287
288 %files -n python3-sip-devel
289 %defattr(644,root,root,755)
290 %{py3_sitedir}/sipconfig.py
291 %{py3_sitedir}/sipdistutils.py
292 %{py3_sitedir}/__pycache__/sipconfig.cpython-*.py[co]
293 %{py3_sitedir}/__pycache__/sipdistutils.cpython-*.py[co]
294 %{py3_sitedir}/sip.pyi
295 %{py3_sitedir}/PyQt5/sip.pyi
296 %{py3_incdir}/sip.h
297 %endif
This page took 0.061025 seconds and 3 git commands to generate.