]>
Commit | Line | Data |
---|---|---|
fc999486 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without qch # documentation in QCH format | |
52175abf | 4 | %bcond_without qm # QM translations |
20dfc6e6 WF |
5 | |
6 | %define orgname qtconnectivity | |
fc999486 JB |
7 | %define qtbase_ver %{version} |
8 | %define qtdeclarative_ver %{version} | |
9 | %define qttools_ver %{version} | |
10 | Summary: The Qt5 Connectivity libraries | |
11 | Summary(pl.UTF-8): Biblioteki Qt5 Connectivity | |
20dfc6e6 | 12 | Name: qt5-%{orgname} |
5fe6c9bc | 13 | Version: 5.8.0 |
669240ed | 14 | Release: 1 |
c6624e8f JB |
15 | License: LGPL v2.1 with Digia Qt LGPL Exception v1.1 or GPL v3.0 |
16 | Group: Libraries | |
5fe6c9bc JR |
17 | Source0: http://download.qt.io/official_releases/qt/5.8/%{version}/submodules/%{orgname}-opensource-src-%{version}.tar.xz |
18 | # Source0-md5: aabc57b30ab4d888b390f12f2bee637a | |
19 | Source1: http://download.qt.io/official_releases/qt/5.8/%{version}/submodules/qttranslations-opensource-src-%{version}.tar.xz | |
20 | # Source1-md5: b6c6748a923b9639c7d018cfdb04caf4 | |
5f8b827e | 21 | URL: http://www.qt.io/ |
669240ed JB |
22 | BuildRequires: Qt5Concurrent-devel >= %{qtbase_ver} |
23 | BuildRequires: Qt5Core-devel >= %{qtbase_ver} | |
24 | BuildRequires: Qt5DBus-devel >= %{qtbase_ver} | |
25 | BuildRequires: Qt5Qml-devel >= %{qtdeclarative_ver} | |
20dfc6e6 | 26 | BuildRequires: bluez-libs-devel |
fc999486 JB |
27 | %if %{with qch} |
28 | BuildRequires: qt5-assistant >= %{qttools_ver} | |
29 | %endif | |
30 | BuildRequires: qt5-build >= %{qtbase_ver} | |
52175abf | 31 | %{?with_qm:BuildRequires: qt5-linguist >= %{qttools_ver}} |
fc999486 | 32 | BuildRequires: qt5-qmake >= %{qtbase_ver} |
20dfc6e6 | 33 | BuildRequires: rpmbuild(macros) >= 1.654 |
9b02a8fb ER |
34 | BuildRequires: tar >= 1:1.22 |
35 | BuildRequires: xz | |
20dfc6e6 WF |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
37 | ||
20dfc6e6 | 38 | %define specflags -fno-strict-aliasing |
fc999486 | 39 | %define qt5dir %{_libdir}/qt5 |
20dfc6e6 WF |
40 | |
41 | %description | |
fc999486 JB |
42 | Qt is a cross-platform application and UI framework. Using Qt, you can |
43 | write web-enabled applications once and deploy them across desktop, | |
44 | mobile and embedded systems without rewriting the source code. | |
45 | ||
c6624e8f JB |
46 | This package contains Qt5 Connectivity libraries: Qt5Bluetooth and |
47 | QtNfc. | |
fc999486 JB |
48 | |
49 | %description -l pl.UTF-8 | |
50 | Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika. | |
51 | Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w | |
52 | systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu | |
53 | źródłowego. | |
54 | ||
c6624e8f | 55 | Ten pakiet zawiera biblioteki Qt5 Connectivity: Qt5Bluetooth i Qt5Nfc. |
20dfc6e6 | 56 | |
52175abf JB |
57 | %package common |
58 | Summary: Common files used by all Qt5 Connectivity components | |
59 | Summary(pl.UTF-8): Wspólne pliki wykorzystywane przez wszystkie komponenty Qt5 Connectivity | |
60 | Group: Libraries | |
61 | ||
62 | %description common | |
63 | Common files used by all Qt5 Connectivity components. | |
64 | ||
65 | %description common -l pl.UTF-8 | |
66 | Wspólne pliki wykorzystywane przez wszystkie komponenty Qt5 | |
67 | Connectivity. | |
68 | ||
c6624e8f JB |
69 | %package -n Qt5Bluetooth |
70 | Summary: Qt5 Bluetooth library | |
71 | Summary(pl.UTF-8): Biblioteka Qt5 Bluetooth | |
72 | Group: Libraries | |
52175abf | 73 | Requires: %{name}-common = %{version}-%{release} |
c6624e8f JB |
74 | Requires: Qt5Core >= %{qtbase_ver} |
75 | Requires: Qt5DBus >= %{qtbase_ver} | |
76 | Requires: Qt5Qml >= %{qtdeclarative_ver} | |
77 | Obsoletes: qt5-qtconnectivity | |
78 | ||
79 | %description -n Qt5Bluetooth | |
80 | Qt5 Bluetooth library provides classes that enable basic Bluetooth | |
81 | operations like scanning for devices and connecting them. | |
82 | ||
83 | %description -n Qt5Bluetooth -l pl.UTF-8 | |
84 | Biblioteka Qt5 Bluetooth dostarcza klasy umożliwiające podstawowe | |
85 | operacje Bluetooth, takie jak wyszukiwanie urządzeń i łączenie z nimi. | |
86 | ||
87 | %package -n Qt5Bluetooth-devel | |
88 | Summary: The Qt5 Bluetooth - development files | |
89 | Summary(pl.UTF-8): Biblioteka Qt5 Bluetooth - pliki programistyczne | |
90 | Group: Development/Libraries | |
91 | Requires: Qt5Bluetooth = %{version}-%{release} | |
92 | Requires: Qt5Core-devel >= %{qtbase_ver} | |
93 | Requires: Qt5DBus-devel >= %{qtbase_ver} | |
94 | Requires: Qt5Qml-devel >= %{qtdeclarative_ver} | |
95 | Obsoletes: qt5-qtconnectivity-devel | |
96 | ||
97 | %description -n Qt5Bluetooth-devel | |
98 | The Qt5 Bluetooth - development files. | |
99 | ||
100 | %description -n Qt5Bluetooth-devel -l pl.UTF-8 | |
101 | Biblioteka Qt5 Bluetooth - pliki programistyczne. | |
102 | ||
103 | %package -n Qt5Nfc | |
104 | Summary: Qt5 Nfc library | |
105 | Summary(pl.UTF-8): Biblioteka Qt5 Nfc | |
106 | Group: Libraries | |
52175abf | 107 | Requires: %{name}-common = %{version}-%{release} |
c6624e8f JB |
108 | Requires: Qt5Core >= %{qtbase_ver} |
109 | Requires: Qt5DBus >= %{qtbase_ver} | |
110 | Requires: Qt5Qml >= %{qtdeclarative_ver} | |
111 | Obsoletes: qt5-qtconnectivity | |
112 | ||
113 | %description -n Qt5Nfc | |
114 | Qt5 Nfc library provides classes to access NFC Forum Tags. | |
115 | ||
116 | %description -n Qt5Nfc -l pl.UTF-8 | |
117 | Biblioteka Qt5 Nfc dostarcza klasy służace do dostępu do urządzeń NFC | |
118 | Forum. | |
119 | ||
120 | %package -n Qt5Nfc-devel | |
121 | Summary: The Qt5 Nfc - development files | |
122 | Summary(pl.UTF-8): Biblioteka Qt5 Nfc - pliki programistyczne | |
123 | Group: Development/Libraries | |
124 | Requires: Qt5Nfc = %{version}-%{release} | |
669240ed JB |
125 | Requires: Qt5Core-devel >= %{qtbase_ver} |
126 | Requires: Qt5DBus-devel >= %{qtbase_ver} | |
127 | Requires: Qt5Qml-devel >= %{qtdeclarative_ver} | |
c6624e8f | 128 | Obsoletes: qt5-qtconnectivity-devel |
20dfc6e6 | 129 | |
c6624e8f JB |
130 | %description -n Qt5Nfc-devel |
131 | The Qt5 Nfc - development files. | |
20dfc6e6 | 132 | |
c6624e8f JB |
133 | %description -n Qt5Nfc-devel -l pl.UTF-8 |
134 | Biblioteka Qt5 Nfc - pliki programistyczne. | |
fc999486 | 135 | |
20dfc6e6 | 136 | %package doc |
fc999486 JB |
137 | Summary: Qt5 Connectivity documentation in HTML format |
138 | Summary(pl.UTF-8): Dokumentacja do bibliotek Qt5 Connectivity w formacie HTML | |
20dfc6e6 | 139 | Group: Documentation |
fc999486 | 140 | Requires: qt5-doc-common >= %{qtbase_ver} |
9b02a8fb ER |
141 | %if "%{_rpmversion}" >= "5" |
142 | BuildArch: noarch | |
143 | %endif | |
20dfc6e6 WF |
144 | |
145 | %description doc | |
fc999486 JB |
146 | Qt5 Connectivity documentation in HTML format. |
147 | ||
148 | %description doc -l pl.UTF-8 | |
149 | Dokumentacja do bibliotek Qt5 Connectivity w formacie HTML. | |
150 | ||
151 | %package doc-qch | |
152 | Summary: Qt5 Connectivity documentation in QCH format | |
153 | Summary(pl.UTF-8): Dokumentacja do bibliotek Qt5 Connectivity w formacie QCH | |
154 | Group: Documentation | |
155 | Requires: qt5-doc-common >= %{qtbase_ver} | |
156 | %if "%{_rpmversion}" >= "5" | |
157 | BuildArch: noarch | |
158 | %endif | |
159 | ||
160 | %description doc-qch | |
161 | Qt5 Connectivity documentation in QCH format. | |
162 | ||
163 | %description doc-qch -l pl.UTF-8 | |
164 | Dokumentacja do bibliotek Qt5 Connectivity w formacie QCH. | |
20dfc6e6 WF |
165 | |
166 | %package examples | |
fc999486 JB |
167 | Summary: Qt5 Connectivity examples |
168 | Summary(pl.UTF-8): Przykłady do bibliotek Qt5 Connectivity | |
20dfc6e6 | 169 | Group: X11/Development/Libraries |
9b02a8fb ER |
170 | %if "%{_rpmversion}" >= "5" |
171 | BuildArch: noarch | |
172 | %endif | |
20dfc6e6 WF |
173 | |
174 | %description examples | |
fc999486 JB |
175 | Qt5 Connectivity examples. |
176 | ||
177 | %description examples -l pl.UTF-8 | |
178 | Przykłady do bibliotek Qt5 Connectivity. | |
20dfc6e6 WF |
179 | |
180 | %prep | |
52175abf | 181 | %setup -q -n %{orgname}-opensource-src-%{version} %{?with_qm:-a1} |
20dfc6e6 WF |
182 | |
183 | %build | |
184 | qmake-qt5 | |
185 | %{__make} | |
fc999486 | 186 | %{__make} %{!?with_qch:html_}docs |
20dfc6e6 | 187 | |
52175abf JB |
188 | %if %{with qm} |
189 | cd qttranslations-opensource-src-%{version} | |
190 | qmake-qt5 | |
191 | %{__make} | |
192 | cd .. | |
193 | %endif | |
194 | ||
20dfc6e6 WF |
195 | %install |
196 | rm -rf $RPM_BUILD_ROOT | |
197 | %{__make} install \ | |
198 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
199 | ||
fc999486 | 200 | %{__make} install_%{!?with_qch:html_}docs \ |
20dfc6e6 WF |
201 | INSTALL_ROOT=$RPM_BUILD_ROOT |
202 | ||
52175abf JB |
203 | %if %{with qm} |
204 | %{__make} -C qttranslations-opensource-src-%{version} install \ | |
205 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
206 | # keep only qtconnectivity | |
5f8b827e | 207 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/qt5/translations/{assistant,designer,linguist,qmlviewer,qt,qtbase,qtconfig,qtdeclarative,qtlocation,qtmultimedia,qtquick1,qtquickcontrols,qtscript,qtwebsockets,qtxmlpatterns}_*.qm |
52175abf JB |
208 | %endif |
209 | ||
fc999486 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 | ||
669240ed JB |
215 | # Prepare some files list |
216 | ifecho() { | |
217 | r="$RPM_BUILD_ROOT$2" | |
218 | if [ -d "$r" ]; then | |
219 | echo "%%dir $2" >> $1.files | |
220 | elif [ -x "$r" ] ; then | |
221 | echo "%%attr(755,root,root) $2" >> $1.files | |
222 | elif [ -f "$r" ]; then | |
223 | echo "$2" >> $1.files | |
224 | else | |
225 | echo "Error generation $1 files list!" | |
226 | echo "$r: no such file or directory!" | |
227 | return 1 | |
228 | fi | |
229 | } | |
230 | ifecho_tree() { | |
231 | ifecho $1 $2 | |
232 | for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do | |
233 | ifecho $1 $2/$f | |
234 | done | |
235 | } | |
236 | ||
237 | echo "%defattr(644,root,root,755)" > examples.files | |
238 | ifecho_tree examples %{_examplesdir}/qt5/bluetooth | |
239 | ifecho_tree examples %{_examplesdir}/qt5/nfc | |
240 | ||
52175abf JB |
241 | # find_lang --with-qm supports only PLD qt3/qt4 specific %{_datadir}/locale/*/LC_MESSAGES layout |
242 | find_qt5_qm() | |
243 | { | |
244 | name="$1" | |
245 | find $RPM_BUILD_ROOT%{_datadir}/qt5/translations -name "${name}_*.qm" | \ | |
246 | sed -e "s:^$RPM_BUILD_ROOT::" \ | |
247 | -e 's:\(.*/'$name'_\)\([a-z][a-z][a-z]\?\)\(_[A-Z][A-Z]\)\?\(\.qm\)$:%lang(\2\3) \1\2\3\4:' | |
248 | } | |
249 | ||
250 | echo '%defattr(644,root,root,755)' > qtconnectivity.lang | |
251 | %if %{with qm} | |
252 | find_qt5_qm qtconnectivity >> qtconnectivity.lang | |
253 | %endif | |
254 | ||
20dfc6e6 WF |
255 | %clean |
256 | rm -rf $RPM_BUILD_ROOT | |
257 | ||
c6624e8f JB |
258 | %post -n Qt5Bluetooth -p /sbin/ldconfig |
259 | %postun -n Qt5Bluetooth -p /sbin/ldconfig | |
20dfc6e6 | 260 | |
c6624e8f JB |
261 | %post -n Qt5Nfc -p /sbin/ldconfig |
262 | %postun -n Qt5Nfc -p /sbin/ldconfig | |
263 | ||
52175abf | 264 | %files common -f qtconnectivity.lang |
20dfc6e6 | 265 | %defattr(644,root,root,755) |
c6624e8f | 266 | %doc LGPL_EXCEPTION.txt dist/changes-* |
52175abf JB |
267 | |
268 | %files -n Qt5Bluetooth | |
269 | %defattr(644,root,root,755) | |
fc999486 JB |
270 | %attr(755,root,root) %{_libdir}/libQt5Bluetooth.so.*.*.* |
271 | %attr(755,root,root) %ghost %{_libdir}/libQt5Bluetooth.so.5 | |
93f6c63a | 272 | %attr(755,root,root) %{qt5dir}/bin/sdpscanner |
669240ed JB |
273 | %dir %{qt5dir}/qml/QtBluetooth |
274 | %attr(755,root,root) %{qt5dir}/qml/QtBluetooth/libdeclarative_bluetooth.so | |
275 | %{qt5dir}/qml/QtBluetooth/plugins.qmltypes | |
276 | %{qt5dir}/qml/QtBluetooth/qmldir | |
c6624e8f JB |
277 | |
278 | %files -n Qt5Bluetooth-devel | |
279 | %defattr(644,root,root,755) | |
280 | %attr(755,root,root) %{_libdir}/libQt5Bluetooth.so | |
281 | %{_libdir}/libQt5Bluetooth.prl | |
282 | %{_includedir}/qt5/QtBluetooth | |
283 | %{_pkgconfigdir}/Qt5Bluetooth.pc | |
284 | %{_libdir}/cmake/Qt5Bluetooth | |
285 | %{qt5dir}/mkspecs/modules/qt_lib_bluetooth.pri | |
286 | %{qt5dir}/mkspecs/modules/qt_lib_bluetooth_private.pri | |
287 | ||
288 | %files -n Qt5Nfc | |
289 | %defattr(644,root,root,755) | |
c6624e8f JB |
290 | %attr(755,root,root) %{_libdir}/libQt5Nfc.so.*.*.* |
291 | %attr(755,root,root) %ghost %{_libdir}/libQt5Nfc.so.5 | |
669240ed JB |
292 | %dir %{qt5dir}/qml/QtNfc |
293 | %attr(755,root,root) %{qt5dir}/qml/QtNfc/libdeclarative_nfc.so | |
294 | %{qt5dir}/qml/QtNfc/plugins.qmltypes | |
295 | %{qt5dir}/qml/QtNfc/qmldir | |
20dfc6e6 | 296 | |
c6624e8f | 297 | %files -n Qt5Nfc-devel |
20dfc6e6 | 298 | %defattr(644,root,root,755) |
20dfc6e6 | 299 | %attr(755,root,root) %{_libdir}/libQt5Nfc.so |
20dfc6e6 | 300 | %{_libdir}/libQt5Nfc.prl |
20dfc6e6 | 301 | %{_includedir}/qt5/QtNfc |
fc999486 | 302 | %{_pkgconfigdir}/Qt5Nfc.pc |
fc999486 | 303 | %{_libdir}/cmake/Qt5Nfc |
c6624e8f JB |
304 | %{qt5dir}/mkspecs/modules/qt_lib_nfc.pri |
305 | %{qt5dir}/mkspecs/modules/qt_lib_nfc_private.pri | |
20dfc6e6 WF |
306 | |
307 | %files doc | |
308 | %defattr(644,root,root,755) | |
669240ed JB |
309 | %{_docdir}/qt5-doc/qtbluetooth |
310 | %{_docdir}/qt5-doc/qtnfc | |
311 | ||
312 | %if %{with qch} | |
313 | %files doc-qch | |
314 | %defattr(644,root,root,755) | |
315 | %{_docdir}/qt5-doc/qtbluetooth.qch | |
316 | %{_docdir}/qt5-doc/qtnfc.qch | |
317 | %endif | |
318 | ||
319 | %files examples -f examples.files | |
320 | %defattr(644,root,root,755) | |
321 | # XXX: dir shared with qt5-qtbase-examples | |
322 | %dir %{_examplesdir}/qt5 |