1 |
%define snapshot 0 |
2 |
%define pre rc |
3 |
|
4 |
# set to 1 to enable bootstrap |
5 |
%define bootstrap 1 |
6 |
|
7 |
%if ! 0%{?bootstrap} |
8 |
%define build_docs 1 |
9 |
%else |
10 |
%define build_docs 0 |
11 |
%endif |
12 |
%ifarch %{arm} |
13 |
%define build_docs 0 |
14 |
%endif |
15 |
|
16 |
%define qtmajor 5 |
17 |
%define qtminor 12 |
18 |
%define qtsubminor 6 |
19 |
|
20 |
%define rel 1 |
21 |
|
22 |
%define major_private 1 |
23 |
%define qtversion %{qtmajor}.%{qtminor}.%{qtsubminor} |
24 |
|
25 |
%define libqthelp %mklibname qt5help %qtmajor |
26 |
%define libqthelp_d %mklibname qt5help -d |
27 |
|
28 |
%define libqtdesigner %mklibname qt5designer %qtmajor |
29 |
%define libqtdesigner_d %mklibname qt5designer -d |
30 |
|
31 |
%define libqtclucene %mklibname qt5clucene %qtmajor |
32 |
%define libqtclucene_d %mklibname qt5clucene -d |
33 |
|
34 |
%if %snapshot |
35 |
%define qttarballdir qttools-everywhere-src-%{qtversion}-%pre |
36 |
%else |
37 |
%define qttarballdir qttools-everywhere-src-%{qtversion} |
38 |
%endif |
39 |
|
40 |
Name: qttools5 |
41 |
Version: %{qtversion} |
42 |
Release: %mkrel %{rel} |
43 |
Summary: Qt GUI toolkit |
44 |
Group: Development/KDE and Qt |
45 |
License: LGPLv2 with exceptions or GPLv3 with exceptions and GFDL |
46 |
URL: http://www.qt.io |
47 |
Source0: http://download.qt.io/official_releases/qt/%{qtmajor}.%{qtminor}/%{version}/submodules/%{qttarballdir}.tar.xz |
48 |
Source1: mageia-assistant-qt5.desktop |
49 |
Source2: mageia-designer-qt5.desktop |
50 |
Source3: mageia-linguist-qt5.desktop |
51 |
BuildRequires: qtbase5-devel |
52 |
%if ! 0%{?bootstrap} |
53 |
BuildRequires: pkgconfig(Qt5Qml) |
54 |
%endif |
55 |
BuildRequires: clang-devel |
56 |
BuildRequires: llvm-devel |
57 |
|
58 |
BuildRequires: sed |
59 |
|
60 |
%if ! 0%{?bootstrap} |
61 |
Requires: qttranslations5 |
62 |
%endif |
63 |
Requires: qttools5-assistant |
64 |
|
65 |
#Branch Patchs |
66 |
|
67 |
#Trunk Patchs |
68 |
|
69 |
#Patch from Mageia |
70 |
|
71 |
|
72 |
%description |
73 |
Qt GUI tools. |
74 |
|
75 |
%files |
76 |
%{_qt5_bindir}/lconvert* |
77 |
%{_bindir}/lconvert* |
78 |
%{_qt5_bindir}/linguist* |
79 |
%{_bindir}/linguist* |
80 |
%{_qt5_bindir}/lrelease* |
81 |
%{_bindir}/lrelease* |
82 |
%{_qt5_bindir}/lupdate* |
83 |
%{_bindir}/lupdate* |
84 |
%{_qt5_bindir}/pixeltool* |
85 |
%{_bindir}/pixeltool* |
86 |
%{_qt5_bindir}/qtpaths |
87 |
%{_bindir}/qtpaths |
88 |
%{_qt5_bindir}/qtdiag |
89 |
%{_bindir}/qtdiag |
90 |
%{_qt5_bindir}/qtplugininfo** |
91 |
%{_bindir}/qtplugininfo* |
92 |
%{_qt5_bindir}/qdoc |
93 |
%{_bindir}/qdoc |
94 |
%{_qt5_datadir}/phrasebooks |
95 |
%{_bindir}/qtattributionsscanner-qt5 |
96 |
%{_qt5_bindir}/qtattributionsscanner* |
97 |
%{_datadir}/applications/*linguist*.desktop |
98 |
#FIXME: in the good package ? |
99 |
%{_qt5_examplesdir}/linguist |
100 |
|
101 |
#------------------------------------------------------------------------------ |
102 |
|
103 |
%package assistant |
104 |
Summary: Qt%{qtmajor} Assistant Doc Utility |
105 |
Group: Documentation |
106 |
Requires: qtbase5-database-plugin-sqlite |
107 |
%if ! 0%{?bootstrap} |
108 |
Requires: qttranslations5 |
109 |
%endif |
110 |
|
111 |
%description assistant |
112 |
Qt Assistant provides a documentation Browser. |
113 |
|
114 |
%files assistant |
115 |
%{_qt5_bindir}/assistant* |
116 |
%{_bindir}/assistant* |
117 |
%{_qt5_bindir}/qcollectiongen* |
118 |
%{_bindir}/qcollectiongen* |
119 |
%{_qt5_bindir}/qhelpgen* |
120 |
%{_bindir}/qhelpgen* |
121 |
%{_datadir}/applications/*assistant*.desktop |
122 |
#FIXME: in the good package ? |
123 |
%{_qt5_examplesdir}/assistant |
124 |
|
125 |
#------------------------------------------------------------------------------ |
126 |
|
127 |
%package designer |
128 |
Summary: %{name} Visual Design Tool |
129 |
Group: Development/KDE and Qt |
130 |
Requires: qttranslations5 |
131 |
|
132 |
%description designer |
133 |
The Qt Designer is a visual design tool that makes designing and |
134 |
implementing user interfaces a lot easier. |
135 |
|
136 |
%files designer |
137 |
%{_qt5_bindir}/design* |
138 |
%{_bindir}/design* |
139 |
%{_qt5_plugindir}/designer |
140 |
%{_datadir}/applications/*designer*.desktop |
141 |
|
142 |
#------------------------------------------------------------------------------ |
143 |
|
144 |
%package qtdbus |
145 |
Summary: Qt%{qtmajor} Dbus Binary |
146 |
Group: Development/KDE and Qt |
147 |
|
148 |
%description qtdbus |
149 |
Qt%{qtmajor} Dbus Binary. |
150 |
|
151 |
The QtDBus module is a Unix-only library that you can use to perform |
152 |
Inter-Process Communication using the D-Bus protocol. |
153 |
|
154 |
%files qtdbus |
155 |
%{_bindir}/qdbus-qt5 |
156 |
%{_qt5_bindir}/qdbus |
157 |
%{_qt5_bindir}/qdbus-qt5 |
158 |
%{_bindir}/qdbus |
159 |
%{_qt5_bindir}/qdbusviewer* |
160 |
%{_bindir}/qdbusviewer* |
161 |
|
162 |
#------------------------------------------------------------------------------ |
163 |
|
164 |
%if %{build_docs} |
165 |
%package doc |
166 |
Summary: QtTools%{qtmajor} APIs and tools docs |
167 |
Group: Documentation |
168 |
BuildArch: noarch |
169 |
BuildRequires: qttools5 |
170 |
# This one is required to build QCH-format documentation |
171 |
# for APIs and tools in this package set |
172 |
BuildRequires: %{name}-assistant |
173 |
Recommends: %{name}-assistant |
174 |
|
175 |
%description doc |
176 |
Documentation for APIs and tools in QtTools%{qtmajor} package for use with |
177 |
Qt Assistant. |
178 |
|
179 |
%files doc |
180 |
%{_qt5_docdir}/qtassistant.qch |
181 |
%{_qt5_docdir}/qtassistant/ |
182 |
%{_qt5_docdir}/qtdesigner.qch |
183 |
%{_qt5_docdir}/qtdesigner/ |
184 |
%{_qt5_docdir}/qdoc.qch |
185 |
%{_qt5_docdir}/qdoc/ |
186 |
%{_qt5_docdir}/qthelp.qch |
187 |
%{_qt5_docdir}/qthelp/ |
188 |
%{_qt5_docdir}/qtlinguist.qch |
189 |
%{_qt5_docdir}/qtlinguist/ |
190 |
%{_qt5_docdir}/qtuitools.qch |
191 |
%{_qt5_docdir}/qtuitools/ |
192 |
%endif |
193 |
|
194 |
#------------------------------------------------------------------------------ |
195 |
|
196 |
%package -n %{libqthelp} |
197 |
Summary: Qt%{qtmajor} Component Library |
198 |
Group: System/Libraries |
199 |
Provides: qthelplib = %{version} |
200 |
# Fix naming glitch in cauldron (mga6) |
201 |
Obsoletes: %{_lib}qthelp5 < 5.6.0-2 |
202 |
|
203 |
%description -n %{libqthelp} |
204 |
Qt%{qtmajor} Component Library. |
205 |
|
206 |
The QtHelp module provides classes for integrating online documentation |
207 |
in applications. |
208 |
|
209 |
%files -n %{libqthelp} |
210 |
%{_qt5_libdir}/libQt5Help.so.%{qtmajor}* |
211 |
|
212 |
#------------------------------------------------------------------------------ |
213 |
|
214 |
%package -n %{libqthelp_d} |
215 |
Summary: Devel files needed to build apps based on QtJsonDbCompat |
216 |
Group: Development/KDE and Qt |
217 |
Requires: %{libqthelp} = %version |
218 |
Requires: qtbase5-common-devel = %version |
219 |
Requires: qttools5 |
220 |
Provides: libqthelp5-devel = %version |
221 |
Provides: libqt5help-devel = %version |
222 |
Provides: qthelp5-devel = %version |
223 |
Provides: qt5help-devel = %version |
224 |
|
225 |
Provides: libqthelp5-private-devel = %version |
226 |
Provides: libqt5help-private-devel = %version |
227 |
Provides: qthelp5-private-devel = %version |
228 |
Provides: qt5help-private-devel = %version |
229 |
|
230 |
%description -n %{libqthelp_d} |
231 |
Devel files needed to build apps based on QtJsonDbCompat. |
232 |
|
233 |
%files -n %{libqthelp_d} |
234 |
%{_qt5_libdir}/libQt5Help.prl |
235 |
%{_qt5_libdir}/libQt5Help.so |
236 |
%{_qt5_libdir}/pkgconfig/Qt5Help.pc |
237 |
%{_qt5_includedir}/QtHelp |
238 |
%{_qt5_datadir}/mkspecs/modules/qt_lib_help.pri |
239 |
%{_qt5_examplesdir}/help/ |
240 |
%{_qt5_libdir}/cmake/Qt5Help/Qt5HelpConfig.cmake |
241 |
%{_qt5_libdir}/cmake/Qt5Help/Qt5HelpConfigVersion.cmake |
242 |
%{_qt5_libdir}/cmake/Qt5Help/Qt5HelpConfigExtras.cmake |
243 |
#FIXME: Find a better place |
244 |
%{_qt5_libdir}/cmake/Qt5LinguistTools/Qt5LinguistToolsConfig.cmake |
245 |
%{_qt5_libdir}/cmake/Qt5LinguistTools/Qt5LinguistToolsMacros.cmake |
246 |
%{_qt5_libdir}/cmake/Qt5LinguistTools/Qt5LinguistToolsConfigVersion.cmake |
247 |
%{_qt5_datadir}/mkspecs/modules/qt_lib_help_private.pri |
248 |
|
249 |
#------------------------------------------------------------------------------ |
250 |
%if 0 |
251 |
%package -n %{libqtclucene} |
252 |
Summary: Qt%{qtmajor} Component Library |
253 |
Group: System/Libraries |
254 |
Provides: qtclucenelib = %{version} |
255 |
# Fix naming glitch in cauldron (mga6) |
256 |
Obsoletes: %{_lib}qtclucene5 < 5.6.0-2 |
257 |
|
258 |
%description -n %{libqtclucene} |
259 |
Qt%{qtmajor} Component Library. |
260 |
|
261 |
%files -n %{libqtclucene} |
262 |
%{_qt5_libdir}/libQt5CLucene.so.%{qtmajor}* |
263 |
|
264 |
#------------------------------------------------------------------------------ |
265 |
|
266 |
%package -n %{libqtclucene_d} |
267 |
Summary: Devel files needed to build apps based on QtCLucene |
268 |
Group: Development/KDE and Qt |
269 |
Requires: %{libqtclucene} = %version |
270 |
Provides: libqtclucene5-devel = %version |
271 |
Provides: libqt5clucene-devel = %version |
272 |
Provides: qtclucene5-devel = %version |
273 |
Provides: qt5clucene-devel = %version |
274 |
|
275 |
Provides: libqtclucene5-private-devel = %version |
276 |
Provides: libqt5clucene-private-devel = %version |
277 |
Provides: qtclucene5-private-devel = %version |
278 |
Provides: qt5clucene-private-devel = %version |
279 |
|
280 |
%description -n %{libqtclucene_d} |
281 |
Devel files needed to build apps based on QtCLucene. |
282 |
|
283 |
%files -n %{libqtclucene_d} |
284 |
%{_qt5_libdir}/libQt5CLucene.prl |
285 |
%{_qt5_libdir}/libQt5CLucene.so |
286 |
%{_qt5_includedir}/QtCLucene |
287 |
%{_qt5_datadir}/mkspecs/modules/qt_lib_clucene_private.pri |
288 |
%endif |
289 |
|
290 |
#------------------------------------------------------------------------------ |
291 |
|
292 |
%package -n %{libqtdesigner} |
293 |
Summary: Qt%{qtmajor} Component Library |
294 |
Group: System/Libraries |
295 |
Provides: qtdesignerlib = %{version} |
296 |
# Fix naming glitch in cauldron (mga6) |
297 |
Obsoletes: %{_lib}qtdesigner5 < 5.6.0-2 |
298 |
|
299 |
%description -n %{libqtdesigner} |
300 |
Qt%{qtmajor} Component Library. |
301 |
|
302 |
The QtDesigner module provides classes that allow you to create your own |
303 |
custom widget plugins for Qt Designer, and classes that enable you to |
304 |
access Qt Designer's components. |
305 |
|
306 |
%files -n %{libqtdesigner} |
307 |
%{_qt5_libdir}/libQt5Designer.so.%{qtmajor}* |
308 |
%{_qt5_libdir}/libQt5DesignerComponents.so.%{qtmajor}* |
309 |
|
310 |
#------------------------------------------------------------------------------ |
311 |
|
312 |
%package -n %{libqtdesigner_d} |
313 |
Summary: Devel files needed to build apps based on QtDesigner |
314 |
Group: Development/KDE and Qt |
315 |
Requires: %{libqtdesigner} = %version |
316 |
Requires: qttools5-designer = %version |
317 |
Provides: libqtdesigner5-devel = %version |
318 |
Provides: libqt5designer-devel = %version |
319 |
Provides: qtdesigner5-devel = %version |
320 |
Provides: qt5designer-devel = %version |
321 |
|
322 |
Provides: libqtdesigner5-private-devel = %version |
323 |
Provides: libqt5designer-private-devel = %version |
324 |
Provides: qtdesigner5-private-devel = %version |
325 |
Provides: qt5designer-private-devel = %version |
326 |
|
327 |
%description -n %{libqtdesigner_d} |
328 |
Devel files needed to build apps based on QtDesigner. |
329 |
|
330 |
%files -n %{libqtdesigner_d} |
331 |
%{_qt5_libdir}/libQt5Designer.so |
332 |
%{_qt5_libdir}/libQt5DesignerComponents.so |
333 |
%{_qt5_libdir}/libQt5Designer.prl |
334 |
%{_qt5_libdir}/libQt5DesignerComponents.prl |
335 |
%{_qt5_libdir}/libQt5UiTools.prl |
336 |
%{_qt5_libdir}/libQt5UiTools.a |
337 |
%{_qt5_libdir}/pkgconfig/Qt5Designer.pc |
338 |
%{_qt5_libdir}/pkgconfig/Qt5UiTools.pc |
339 |
%{_qt5_includedir}/QtDesignerComponents |
340 |
%{_qt5_includedir}/QtDesigner |
341 |
%{_qt5_includedir}/QtUiPlugin |
342 |
%{_qt5_includedir}/QtUiTools |
343 |
%{_qt5_datadir}/mkspecs/modules/qt_lib_designer.pri |
344 |
%{_qt5_datadir}/mkspecs/modules/qt_lib_uitools.pri |
345 |
%{_qt5_datadir}/mkspecs/modules/qt_lib_uiplugin.pri |
346 |
%{_qt5_examplesdir}/designer |
347 |
%{_qt5_examplesdir}/uitools |
348 |
%{_qt5_libdir}/cmake/Qt5Designer |
349 |
%{_qt5_libdir}/cmake/Qt5UiTools |
350 |
%{_qt5_libdir}/cmake/Qt5UiPlugin |
351 |
%{_qt5_datadir}/mkspecs/modules/qt_lib_designer_private.pri |
352 |
%{_qt5_datadir}/mkspecs/modules/qt_lib_designercomponents_private.pri |
353 |
%{_qt5_datadir}/mkspecs/modules/qt_lib_uitools_private.pri |
354 |
|
355 |
#------------------------------------------------------------------------------ |
356 |
|
357 |
%prep |
358 |
%setup -q -n qttools-everywhere-src-%{qtversion} |
359 |
%autopatch -p1 |
360 |
|
361 |
%build |
362 |
%qmake_qt5 |
363 |
|
364 |
%make_build |
365 |
|
366 |
%if %{build_docs} |
367 |
%__make docs |
368 |
%endif |
369 |
|
370 |
%install |
371 |
%make_install INSTALL_ROOT=%{buildroot} |
372 |
|
373 |
%if %{build_docs} |
374 |
%make_install install_docs INSTALL_ROOT=%{buildroot} |
375 |
%endif |
376 |
|
377 |
mkdir -p %{buildroot}/%{_datadir}/applications |
378 |
install -m 644 %SOURCE1 %{buildroot}/%{_datadir}/applications |
379 |
install -m 644 %SOURCE2 %{buildroot}/%{_datadir}/applications |
380 |
install -m 644 %SOURCE3 %{buildroot}/%{_datadir}/applications |
381 |
sed -i -e 's#/usr/lib/qt5/bin#%{_qt5_bindir}#' %{buildroot}/%{_datadir}/applications/*.desktop |
382 |
|
383 |
# hardlink files to {_bindir}, add -qt5 postfix to not conflict |
384 |
mkdir %{buildroot}%{_bindir} |
385 |
pushd %{buildroot}%{_qt5_bindir} |
386 |
for i in * ; do |
387 |
case "${i}" in |
388 |
assistant|designer|lconvert|linguist|lrelease|lupdate|pixeltool|qcollectiongenerator|qdbus|qdbusviewer|qhelpconverter|qhelpgenerator|qtplugininfo|qtattributionsscanner) |
389 |
ln -v ${i} %{buildroot}%{_bindir}/${i}-qt5 |
390 |
ln -sv ${i} ${i}-qt5 |
391 |
;; |
392 |
*) |
393 |
ln -v ${i} %{buildroot}%{_bindir}/${i} |
394 |
;; |
395 |
esac |
396 |
done |
397 |
popd |
398 |
|
399 |
|
400 |
# Fix all buildroot paths |
401 |
find %{buildroot}/%{_qt5_libdir} -type f -name '*prl' -exec perl -pi -e "s, -L%{_builddir}/\S+,,g" {} \; |
402 |
find %{buildroot}/%{_qt5_libdir} -type f -name '*prl' -exec sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" {} \; |
403 |
find %{buildroot}/%{_qt5_libdir} -type f -name '*la' -print -exec perl -pi -e "s, -L%{_builddir}/?\S+,,g" {} \; |
404 |
|
405 |
# Don't reference builddir neither /usr(/X11R6)?/ in .pc files. |
406 |
perl -pi -e '\ |
407 |
s@-L/usr/X11R6/%{_lib} @@g;\ |
408 |
s@-I/usr/X11R6/include @@g;\ |
409 |
s@-L/%{_builddir}\S+@@g'\ |
410 |
`find . -name \*.pc` |
411 |
|
412 |
mkdir -p %buildroot%{_bindir} |
413 |
|
414 |
pushd %buildroot%{_bindir} |
415 |
for i in assistant designer lconvert linguist lrelease lupdate pixeltool qcollectiongenerator qdbus qdbusviewer qhelpgenerator qtplugininfo ; do |
416 |
ln -s %{_qt5_bindir}/$i . ; |
417 |
done |
418 |
popd |
419 |
|
420 |
# .la and .a files, die, die, die. |
421 |
find %{buildroot} -name '*.la' -delete |
422 |
|
423 |
## Qt5Designer.pc references non-existent Qt5UiPlugin.pc, remove the reference for now |
424 |
sed -i -e 's| Qt5UiPlugin||g' %{buildroot}%{_qt5_libdir}/pkgconfig/Qt5Designer.pc |
425 |
|