]>
Commit | Line | Data |
---|---|---|
e72d7530 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without qch # documentation in QCH format | |
2864e75a | 4 | %bcond_without qm # QM translations |
5f4e244e WF |
5 | |
6 | %define orgname qtquick1 | |
e72d7530 JB |
7 | %define qtbase_ver %{version} |
8 | %define qtdeclarative_ver %{version} | |
9 | %define qtscript_ver %{version} | |
10 | %define qttools_ver %{version} | |
b38c66d9 | 11 | %define qtwebkit_ver %{version} |
e72d7530 JB |
12 | %define qtxmlpatterns_ver %{version} |
13 | Summary: The Qt5 Quick1 (Qt5Declarative) library | |
14 | Summary(pl.UTF-8): Biblioteka Qt5 Quick1 (Qt5Declarative) | |
5f4e244e | 15 | Name: qt5-%{orgname} |
0f0c4ddf | 16 | Version: 5.5.1 |
208a491e | 17 | Release: 1 |
9170304d | 18 | License: LGPL v2 with Digia Qt LGPL Exception v1.1 or GPL v3 |
5f4e244e | 19 | Group: X11/Libraries |
0f0c4ddf JB |
20 | Source0: http://download.qt.io/official_releases/qt/5.5/%{version}/submodules/%{orgname}-opensource-src-%{version}.tar.xz |
21 | # Source0-md5: 46a61a405844cbe88a754127422f6b6d | |
22 | Source1: http://download.qt.io/official_releases/qt/5.5/%{version}/submodules/qttranslations-opensource-src-%{version}.tar.xz | |
23 | # Source1-md5: 1f89d53fe759db123b4b6d9de9d9e8c9 | |
24 | URL: http://www.qt.io/ | |
208a491e JB |
25 | BuildRequires: Qt5Core-devel >= %{qtbase_ver} |
26 | BuildRequires: Qt5Designer-devel >= %{qttools_ver} | |
27 | BuildRequires: Qt5Gui-devel >= %{qtbase_ver} | |
28 | BuildRequires: Qt5Network-devel >= %{qtbase_ver} | |
29 | BuildRequires: Qt5OpenGL-devel >= %{qtbase_ver} | |
30 | BuildRequires: Qt5Script-devel >= %{qtscript_ver} | |
31 | BuildRequires: Qt5Sql-devel >= %{qtbase_ver} | |
0f0c4ddf JB |
32 | # uiplugin module |
33 | BuildRequires: Qt5UiTools-devel >= %{qttools_ver} | |
b38c66d9 | 34 | BuildRequires: Qt5WebKit-devel >= %{qtwebkit_ver} |
208a491e JB |
35 | BuildRequires: Qt5Widgets-devel >= %{qtbase_ver} |
36 | BuildRequires: Qt5XmlPatterns-devel >= %{qtxmlpatterns_ver} | |
e72d7530 JB |
37 | %if %{with qch} |
38 | BuildRequires: qt5-assistant >= %{qttools_ver} | |
39 | %endif | |
208a491e | 40 | BuildRequires: qt5-build >= %{qtbase_ver} |
2864e75a | 41 | %{?with_qm:BuildRequires: qt5-linguist >= 5.2} |
208a491e | 42 | BuildRequires: qt5-qmake >= %{qtbase_ver} |
5f4e244e | 43 | BuildRequires: rpmbuild(macros) >= 1.654 |
208a491e | 44 | BuildRequires: sed >= 4.0 |
83b037e3 ER |
45 | BuildRequires: tar >= 1:1.22 |
46 | BuildRequires: xz | |
5f4e244e WF |
47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
48 | ||
5f4e244e | 49 | %define specflags -fno-strict-aliasing |
e72d7530 | 50 | %define qt5dir %{_libdir}/qt5 |
5f4e244e WF |
51 | |
52 | %description | |
e72d7530 JB |
53 | Qt is a cross-platform application and UI framework. Using Qt, you can |
54 | write web-enabled applications once and deploy them across desktop, | |
55 | mobile and embedded systems without rewriting the source code. | |
56 | ||
57 | This package contains Qt5 Quick1 (Qt5Declarative) library. | |
5f4e244e | 58 | |
e72d7530 JB |
59 | %description -l pl.UTF-8 |
60 | Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika. | |
61 | Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w | |
62 | systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu | |
63 | źródłowego. | |
64 | ||
65 | Ten pakiet zawiera bibliotekę Qt5 Quick1 (Qt5Declarative). | |
66 | ||
67 | %package -n Qt5Declarative | |
68 | Summary: The Qt5 Quick1 (Qt5Declarative) library | |
69 | Summary(pl.UTF-8): Biblioteka Qt5 Quick1 (Qt5Declarative) | |
70 | Group: X11/Libraries | |
71 | Requires: Qt5Core >= %{qtbase_ver} | |
208a491e JB |
72 | Requires: Qt5Gui >= %{qtbase_ver} |
73 | Requires: Qt5Network >= %{qtbase_ver} | |
74 | Requires: Qt5Script >= %{qtscript_ver} | |
75 | Requires: Qt5Sql >= %{qtbase_ver} | |
76 | Requires: Qt5Widgets >= %{qtbase_ver} | |
77 | Requires: Qt5XmlPatterns >= %{qtxmlpatterns_ver} | |
e72d7530 JB |
78 | Obsoletes: qt5-qtquick1 |
79 | ||
80 | %description -n Qt5Declarative | |
208a491e JB |
81 | Qt5 Quick1 (Qt5Declarative) library - an older version of Quick |
82 | library. | |
e72d7530 JB |
83 | |
84 | %description -n Qt5Declarative -l pl.UTF-8 | |
208a491e JB |
85 | Biblioteka Qt5 Quick1 (Qt5Declarative) - starsza wersja biblioteki |
86 | Quick. | |
e72d7530 JB |
87 | |
88 | %package -n Qt5Declarative-devel | |
89 | Summary: Qt5 Quick1 (Qt5Declarative) library - development files | |
90 | Summary(pl.UTF-8): Biblioteka Qt5 Quick1 (Qt5Declarative) - pliki programistyczne | |
5f4e244e | 91 | Group: X11/Development/Libraries |
208a491e JB |
92 | Requires: OpenGL-devel |
93 | Requires: Qt5Core-devel >= %{qtbase_ver} | |
a790c4ce | 94 | Requires: Qt5Declarative = %{version}-%{release} |
208a491e JB |
95 | Requires: Qt5Gui-devel >= %{qtbase_ver} |
96 | Requires: Qt5Network-devel >= %{qtbase_ver} | |
97 | Requires: Qt5Script-devel >= %{qtscript_ver} | |
98 | Requires: Qt5Sql-devel >= %{qtbase_ver} | |
99 | Requires: Qt5Widgets-devel >= %{qtbase_ver} | |
100 | Requires: Qt5XmlPatterns-devel >= %{qtxmlpatterns_ver} | |
e72d7530 | 101 | Obsoletes: qt5-qtquick1-devel |
5f4e244e | 102 | |
e72d7530 JB |
103 | %description -n Qt5Declarative-devel |
104 | Qt5 Quick1 (Qt5Declarative) library - development files. | |
105 | ||
106 | %description -n Qt5Declarative-devel -l pl.UTF-8 | |
107 | Biblioteka Qt5 Quick1 (Qt5Declarative) - pliki programistyczne. | |
5f4e244e | 108 | |
76c15581 | 109 | %package -n Qt5Declarative-plugin-webkit |
b38c66d9 JB |
110 | Summary: WebKit plugin for Qt5 Quick1 library |
111 | Summary(pl.UTF-8): Wtyczka WebKit dla biblioteki Qt5 Quick1 | |
112 | Group: X11/Libraries | |
113 | Requires: Qt5Declarative = %{version}-%{release} | |
114 | Requires: Qt5WebKit >= %{qtwebkit_ver} | |
76c15581 | 115 | Obsoletes: Qt5Declarative-webkit |
b38c66d9 | 116 | |
76c15581 | 117 | %description -n Qt5Declarative-plugin-webkit |
b38c66d9 JB |
118 | WebKit plugin for Qt5 Quick1 library. |
119 | ||
76c15581 | 120 | %description -n Qt5Declarative-plugin-webkit -l pl.UTF-8 |
b38c66d9 JB |
121 | Wtyczka WebKit dla biblioteki Qt5 Quick1. |
122 | ||
76c15581 | 123 | %package -n Qt5Designer-plugin-qdeclarativeview |
208a491e JB |
124 | Summary: QDeclarativeView (Quick1) plugin for Qt5 Designer |
125 | Summary(pl.UTF-8): Wtyczka QDeclarativeView (Quick1) dla Qt5 Designera | |
126 | Group: X11/Libraries | |
127 | Requires: Qt5Declarative = %{version}-%{release} | |
128 | Requires: Qt5Designer >= %{qttools_ver} | |
129 | Requires: Qt5Widgets >= %{qtbase_ver} | |
76c15581 | 130 | Obsoletes: Qt5Designer-qdeclarativeview |
208a491e | 131 | |
76c15581 | 132 | %description -n Qt5Designer-plugin-qdeclarativeview |
208a491e JB |
133 | QDeclarativeView (Quick1) plugin for Qt5 Designer. |
134 | ||
76c15581 | 135 | %description -n Qt5Designer-plugin-qdeclarativeview -l pl.UTF-8 |
208a491e JB |
136 | Wtyczka QDeclarativeView (Quick1) dla Qt5 Designera. |
137 | ||
5f4e244e | 138 | %package doc |
e72d7530 JB |
139 | Summary: Qt5 Quick1 (Qt5Declarative) documentation in HTML format |
140 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 Quick1 (Qt5Declarative) w formacie HTML | |
5f4e244e | 141 | Group: Documentation |
a790c4ce | 142 | Requires: qt5-doc-common >= %{qtbase_ver} |
83b037e3 | 143 | BuildArch: noarch |
5f4e244e WF |
144 | |
145 | %description doc | |
e72d7530 JB |
146 | Qt5 Quick1 (Qt5Declarative) documentation in HTML format. |
147 | ||
148 | %description doc -l pl.UTF-8 | |
149 | Dokumentacja do biblioteki Qt5 Quick1 (Qt5Declarative) w formacie | |
150 | HTML. | |
151 | ||
152 | %package doc-qch | |
153 | Summary: Qt5 Quick1 (Qt5Declarative) documentation in QCH format | |
154 | Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 Quick1 (Qt5Declarative) w formacie QCH | |
155 | Group: Documentation | |
156 | Requires: qt5-doc-common >= %{qtbase_ver} | |
e72d7530 | 157 | BuildArch: noarch |
e72d7530 JB |
158 | |
159 | %description doc-qch | |
160 | Qt5 Quick1 (Qt5Declarative) documentation in QCH format. | |
161 | ||
162 | %description doc-qch -l pl.UTF-8 | |
163 | Dokumentacja do biblioteki Qt5 Quick1 (Qt5Declarative) w formacie QCH. | |
5f4e244e WF |
164 | |
165 | %package examples | |
e72d7530 JB |
166 | Summary: Qt5 Quick1 (Qt5Declarative) examples |
167 | Summary(pl.UTF-8): Przykłady do biblioteki Qt5 Quick1 (Qt5Declarative) | |
5f4e244e | 168 | Group: X11/Development/Libraries |
83b037e3 | 169 | BuildArch: noarch |
5f4e244e WF |
170 | |
171 | %description examples | |
e72d7530 JB |
172 | Qt5 Quick1 (Qt5Declarative) examples. |
173 | ||
174 | %description examples -l pl.UTF-8 | |
175 | Przykłady do biblioteki Qt5 Quick1 (Qt5Declarative). | |
5f4e244e WF |
176 | |
177 | %prep | |
2864e75a | 178 | %setup -q -n %{orgname}-opensource-src-%{version} %{?with_qm:-a1} |
5f4e244e | 179 | |
208a491e JB |
180 | # enable docs |
181 | %{__sed} -i -e '/^# SUBDIRS += doc/s/^# //' src/src.pro | |
182 | ||
5f4e244e WF |
183 | %build |
184 | qmake-qt5 | |
185 | %{__make} | |
e72d7530 | 186 | %{__make} %{!?with_qch:html_}docs |
5f4e244e | 187 | |
2864e75a JB |
188 | %if %{with qm} |
189 | cd qttranslations-opensource-src-%{version} | |
190 | qmake-qt5 | |
191 | %{__make} | |
192 | cd .. | |
193 | %endif | |
194 | ||
5f4e244e WF |
195 | %install |
196 | rm -rf $RPM_BUILD_ROOT | |
197 | %{__make} install \ | |
198 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
199 | ||
e72d7530 | 200 | %{__make} install_%{!?with_qch:html_}docs \ |
5f4e244e WF |
201 | INSTALL_ROOT=$RPM_BUILD_ROOT |
202 | ||
2864e75a JB |
203 | %if %{with qm} |
204 | %{__make} -C qttranslations-opensource-src-%{version} install \ | |
205 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
206 | # keep only qmlviewer and qtquick1 | |
0f0c4ddf | 207 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/qt5/translations/{assistant,designer,linguist,qt,qtbase,qtconfig,qtconnectivity,qtdeclarative,qtlocation,qtmultimedia,qtquickcontrols,qtscript,qtwebsockets,qtxmlpatterns}_*.qm |
2864e75a JB |
208 | %endif |
209 | ||
e72d7530 JB |
210 | # useless symlinks |
211 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.? | |
212 | # actually drop *.la, follow policy of not packaging them when *.pc exist | |
213 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la | |
214 | ||
208a491e JB |
215 | # symlinks in system bin dir |
216 | install -d $RPM_BUILD_ROOT%{_bindir} | |
217 | for f in qml1plugindump qmlviewer ; do | |
218 | ln -sf ../%{_lib}/qt5/bin/$f $RPM_BUILD_ROOT%{_bindir}/${f}-qt5 | |
219 | done | |
220 | ||
5f4e244e WF |
221 | # Prepare some files list |
222 | ifecho() { | |
208a491e | 223 | r="$RPM_BUILD_ROOT$2" |
5f4e244e WF |
224 | if [ -d "$r" ]; then |
225 | echo "%%dir $2" >> $1.files | |
226 | elif [ -x "$r" ] ; then | |
227 | echo "%%attr(755,root,root) $2" >> $1.files | |
228 | elif [ -f "$r" ]; then | |
229 | echo "$2" >> $1.files | |
230 | else | |
231 | echo "Error generation $1 files list!" | |
232 | echo "$r: no such file or directory!" | |
233 | return 1 | |
234 | fi | |
235 | } | |
208a491e JB |
236 | ifecho_tree() { |
237 | ifecho $1 $2 | |
238 | for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do | |
239 | ifecho $1 $2/$f | |
240 | done | |
241 | } | |
5f4e244e WF |
242 | |
243 | echo "%defattr(644,root,root,755)" > examples.files | |
208a491e | 244 | ifecho_tree examples %{_examplesdir}/qt5/declarative |
5f4e244e | 245 | |
2864e75a JB |
246 | # find_lang --with-qm supports only PLD qt3/qt4 specific %{_datadir}/locale/*/LC_MESSAGES layout |
247 | find_qt5_qm() | |
248 | { | |
249 | name="$1" | |
250 | find $RPM_BUILD_ROOT%{_datadir}/qt5/translations -name "${name}_*.qm" | \ | |
251 | sed -e "s:^$RPM_BUILD_ROOT::" \ | |
252 | -e 's:\(.*/'$name'_\)\([a-z][a-z][a-z]\?\)\(_[A-Z][A-Z]\)\?\(\.qm\)$:%lang(\2\3) \1\2\3\4:' | |
253 | } | |
254 | ||
255 | echo '%defattr(644,root,root,755)' > qtquick1.lang | |
256 | %if %{with qm} | |
257 | find_qt5_qm qmlviewer >> qtquick1.lang | |
258 | find_qt5_qm qtquick1 >> qtquick1.lang | |
259 | %endif | |
260 | ||
5f4e244e WF |
261 | %clean |
262 | rm -rf $RPM_BUILD_ROOT | |
263 | ||
e72d7530 JB |
264 | %post -n Qt5Declarative -p /sbin/ldconfig |
265 | %postun -n Qt5Declarative -p /sbin/ldconfig | |
5f4e244e | 266 | |
2864e75a | 267 | %files -n Qt5Declarative -f qtquick1.lang |
5f4e244e | 268 | %defattr(644,root,root,755) |
208a491e | 269 | %doc LGPL_EXCEPTION.txt dist/changes-* |
e72d7530 JB |
270 | %attr(755,root,root) %{_libdir}/libQt5Declarative.so.*.*.* |
271 | %attr(755,root,root) %ghost %{_libdir}/libQt5Declarative.so.5 | |
208a491e JB |
272 | %attr(755,root,root) %{_bindir}/qml1plugindump-qt5 |
273 | %attr(755,root,root) %{_bindir}/qmlviewer-qt5 | |
274 | %attr(755,root,root) %{qt5dir}/bin/qml1plugindump | |
275 | %attr(755,root,root) %{qt5dir}/bin/qmlviewer | |
276 | %dir %{qt5dir}/imports | |
277 | %{qt5dir}/imports/builtins.qmltypes | |
278 | %dir %{qt5dir}/imports/Qt | |
279 | %dir %{qt5dir}/imports/Qt/labs | |
280 | %dir %{qt5dir}/imports/Qt/labs/folderlistmodel | |
281 | %attr(755,root,root) %{qt5dir}/imports/Qt/labs/folderlistmodel/libqmlfolderlistmodelplugin.so | |
282 | %{qt5dir}/imports/Qt/labs/folderlistmodel/plugins.qmltypes | |
283 | %{qt5dir}/imports/Qt/labs/folderlistmodel/qmldir | |
284 | %dir %{qt5dir}/imports/Qt/labs/gestures | |
285 | %attr(755,root,root) %{qt5dir}/imports/Qt/labs/gestures/libqmlgesturesplugin.so | |
286 | %{qt5dir}/imports/Qt/labs/gestures/plugins.qmltypes | |
287 | %{qt5dir}/imports/Qt/labs/gestures/qmldir | |
288 | %dir %{qt5dir}/imports/Qt/labs/particles | |
289 | %attr(755,root,root) %{qt5dir}/imports/Qt/labs/particles/libqmlparticlesplugin.so | |
290 | %{qt5dir}/imports/Qt/labs/particles/plugins.qmltypes | |
291 | %{qt5dir}/imports/Qt/labs/particles/qmldir | |
292 | %dir %{qt5dir}/imports/Qt/labs/shaders | |
293 | %attr(755,root,root) %{qt5dir}/imports/Qt/labs/shaders/libqmlshadersplugin.so | |
294 | %{qt5dir}/imports/Qt/labs/shaders/plugins.qmltypes | |
295 | %{qt5dir}/imports/Qt/labs/shaders/qmldir | |
296 | %dir %{qt5dir}/plugins/qml1tooling | |
297 | %attr(755,root,root) %{qt5dir}/plugins/qml1tooling/libqmldbg_inspector.so | |
298 | %attr(755,root,root) %{qt5dir}/plugins/qml1tooling/libqmldbg_tcp_qtdeclarative.so | |
5f4e244e | 299 | |
e72d7530 | 300 | %files -n Qt5Declarative-devel |
5f4e244e WF |
301 | %defattr(644,root,root,755) |
302 | %attr(755,root,root) %{_libdir}/libQt5Declarative.so | |
5f4e244e | 303 | %{_libdir}/libQt5Declarative.prl |
5f4e244e | 304 | %{_includedir}/qt5/QtDeclarative |
e72d7530 | 305 | %{_pkgconfigdir}/Qt5Declarative.pc |
b38c66d9 JB |
306 | %dir %{_libdir}/cmake/Qt5Declarative |
307 | %{_libdir}/cmake/Qt5Declarative/Qt5DeclarativeConfig*.cmake | |
308 | %{_libdir}/cmake/Qt5Declarative/Qt5Declarative_QTcpServerConnection.cmake | |
309 | %{_libdir}/cmake/Qt5Declarative/Qt5Declarative_QtQuick1Plugin.cmake | |
208a491e JB |
310 | %{qt5dir}/mkspecs/modules/qt_lib_declarative.pri |
311 | %{qt5dir}/mkspecs/modules/qt_lib_declarative_private.pri | |
312 | ||
76c15581 | 313 | %files -n Qt5Declarative-plugin-webkit |
b38c66d9 JB |
314 | %defattr(644,root,root,755) |
315 | %dir %{qt5dir}/imports/QtWebKit | |
316 | %attr(755,root,root) %{qt5dir}/imports/QtWebKit/libqmlwebkitplugin.so | |
317 | %{qt5dir}/imports/QtWebKit/plugins.qmltypes | |
318 | %{qt5dir}/imports/QtWebKit/qmldir | |
319 | ||
76c15581 | 320 | %files -n Qt5Designer-plugin-qdeclarativeview |
208a491e JB |
321 | %defattr(644,root,root,755) |
322 | %attr(755,root,root) %{qt5dir}/plugins/designer/libqdeclarativeview.so | |
323 | %{_libdir}/cmake/Qt5Designer/Qt5Designer_QDeclarativeViewPlugin.cmake | |
324 | ||
325 | %files doc | |
326 | %defattr(644,root,root,755) | |
327 | %{_docdir}/qt5-doc/qtdeclarative | |
328 | ||
329 | %if %{with qch} | |
330 | %files doc-qch | |
331 | %defattr(644,root,root,755) | |
332 | %{_docdir}/qt5-doc/qtdeclarative.qch | |
333 | %endif | |
5f4e244e WF |
334 | |
335 | %files examples -f examples.files | |
208a491e JB |
336 | # XXX: dir shared with qt5-qtbase-examples |
337 | %dir %{_examplesdir}/qt5 |