]>
Commit | Line | Data |
---|---|---|
fc999486 JB |
1 | # |
2 | # Conditional build: | |
a53e4ea4 | 3 | %bcond_without doc # Documentation |
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} |
5e2540c3 JP |
13 | Version: 5.15.4 |
14 | Release: 1 | |
9a71b2a3 | 15 | License: LGPL v3 or GPL v2 or GPL v3 or commercial |
c6624e8f | 16 | Group: Libraries |
68d1e5b2 | 17 | Source0: https://download.qt.io/official_releases/qt/5.15/%{version}/submodules/%{orgname}-everywhere-opensource-src-%{version}.tar.xz |
5e2540c3 | 18 | # Source0-md5: d79c1bc630b57c90618224a2157e0eb3 |
68d1e5b2 | 19 | Source1: https://download.qt.io/official_releases/qt/5.15/%{version}/submodules/qttranslations-everywhere-opensource-src-%{version}.tar.xz |
5e2540c3 | 20 | # Source1-md5: 6ba46a712a698118f396f78a785f6774 |
9a71b2a3 | 21 | URL: https://www.qt.io/ |
669240ed JB |
22 | BuildRequires: Qt5Concurrent-devel >= %{qtbase_ver} |
23 | BuildRequires: Qt5Core-devel >= %{qtbase_ver} | |
24 | BuildRequires: Qt5DBus-devel >= %{qtbase_ver} | |
9a71b2a3 | 25 | BuildRequires: Qt5Network-devel >= %{qtbase_ver} |
669240ed | 26 | BuildRequires: Qt5Qml-devel >= %{qtdeclarative_ver} |
20dfc6e6 | 27 | BuildRequires: bluez-libs-devel |
a53e4ea4 | 28 | %if %{with doc} |
fc999486 JB |
29 | BuildRequires: qt5-assistant >= %{qttools_ver} |
30 | %endif | |
31 | BuildRequires: qt5-build >= %{qtbase_ver} | |
52175abf | 32 | %{?with_qm:BuildRequires: qt5-linguist >= %{qttools_ver}} |
fc999486 | 33 | BuildRequires: qt5-qmake >= %{qtbase_ver} |
149cbf6d | 34 | BuildRequires: rpm-build >= 4.6 |
1c5421e5 | 35 | BuildRequires: rpmbuild(macros) >= 2.016 |
9b02a8fb ER |
36 | BuildRequires: tar >= 1:1.22 |
37 | BuildRequires: xz | |
20dfc6e6 WF |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
20dfc6e6 | 40 | %define specflags -fno-strict-aliasing |
fc999486 | 41 | %define qt5dir %{_libdir}/qt5 |
20dfc6e6 WF |
42 | |
43 | %description | |
fc999486 JB |
44 | Qt is a cross-platform application and UI framework. Using Qt, you can |
45 | write web-enabled applications once and deploy them across desktop, | |
46 | mobile and embedded systems without rewriting the source code. | |
47 | ||
c6624e8f JB |
48 | This package contains Qt5 Connectivity libraries: Qt5Bluetooth and |
49 | QtNfc. | |
fc999486 JB |
50 | |
51 | %description -l pl.UTF-8 | |
52 | Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika. | |
53 | Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w | |
54 | systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu | |
55 | źródłowego. | |
56 | ||
c6624e8f | 57 | Ten pakiet zawiera biblioteki Qt5 Connectivity: Qt5Bluetooth i Qt5Nfc. |
20dfc6e6 | 58 | |
52175abf JB |
59 | %package common |
60 | Summary: Common files used by all Qt5 Connectivity components | |
61 | Summary(pl.UTF-8): Wspólne pliki wykorzystywane przez wszystkie komponenty Qt5 Connectivity | |
62 | Group: Libraries | |
63 | ||
64 | %description common | |
65 | Common files used by all Qt5 Connectivity components. | |
66 | ||
67 | %description common -l pl.UTF-8 | |
68 | Wspólne pliki wykorzystywane przez wszystkie komponenty Qt5 | |
69 | Connectivity. | |
70 | ||
c6624e8f JB |
71 | %package -n Qt5Bluetooth |
72 | Summary: Qt5 Bluetooth library | |
73 | Summary(pl.UTF-8): Biblioteka Qt5 Bluetooth | |
74 | Group: Libraries | |
52175abf | 75 | Requires: %{name}-common = %{version}-%{release} |
c6624e8f JB |
76 | Requires: Qt5Core >= %{qtbase_ver} |
77 | Requires: Qt5DBus >= %{qtbase_ver} | |
9a71b2a3 | 78 | Requires: Qt5Network >= %{qtbase_ver} |
c6624e8f | 79 | Requires: Qt5Qml >= %{qtdeclarative_ver} |
09e88395 | 80 | Obsoletes: qt5-qtconnectivity < 5.3.1 |
c6624e8f JB |
81 | |
82 | %description -n Qt5Bluetooth | |
83 | Qt5 Bluetooth library provides classes that enable basic Bluetooth | |
84 | operations like scanning for devices and connecting them. | |
85 | ||
86 | %description -n Qt5Bluetooth -l pl.UTF-8 | |
87 | Biblioteka Qt5 Bluetooth dostarcza klasy umożliwiające podstawowe | |
88 | operacje Bluetooth, takie jak wyszukiwanie urządzeń i łączenie z nimi. | |
89 | ||
90 | %package -n Qt5Bluetooth-devel | |
91 | Summary: The Qt5 Bluetooth - development files | |
92 | Summary(pl.UTF-8): Biblioteka Qt5 Bluetooth - pliki programistyczne | |
93 | Group: Development/Libraries | |
94 | Requires: Qt5Bluetooth = %{version}-%{release} | |
95 | Requires: Qt5Core-devel >= %{qtbase_ver} | |
96 | Requires: Qt5DBus-devel >= %{qtbase_ver} | |
97 | Requires: Qt5Qml-devel >= %{qtdeclarative_ver} | |
09e88395 | 98 | Obsoletes: qt5-qtconnectivity-devel < 5.3.1 |
c6624e8f JB |
99 | |
100 | %description -n Qt5Bluetooth-devel | |
101 | The Qt5 Bluetooth - development files. | |
102 | ||
103 | %description -n Qt5Bluetooth-devel -l pl.UTF-8 | |
104 | Biblioteka Qt5 Bluetooth - pliki programistyczne. | |
105 | ||
106 | %package -n Qt5Nfc | |
107 | Summary: Qt5 Nfc library | |
108 | Summary(pl.UTF-8): Biblioteka Qt5 Nfc | |
109 | Group: Libraries | |
52175abf | 110 | Requires: %{name}-common = %{version}-%{release} |
c6624e8f JB |
111 | Requires: Qt5Core >= %{qtbase_ver} |
112 | Requires: Qt5DBus >= %{qtbase_ver} | |
113 | Requires: Qt5Qml >= %{qtdeclarative_ver} | |
114 | Obsoletes: qt5-qtconnectivity | |
115 | ||
116 | %description -n Qt5Nfc | |
117 | Qt5 Nfc library provides classes to access NFC Forum Tags. | |
118 | ||
119 | %description -n Qt5Nfc -l pl.UTF-8 | |
120 | Biblioteka Qt5 Nfc dostarcza klasy służace do dostępu do urządzeń NFC | |
121 | Forum. | |
122 | ||
123 | %package -n Qt5Nfc-devel | |
124 | Summary: The Qt5 Nfc - development files | |
125 | Summary(pl.UTF-8): Biblioteka Qt5 Nfc - pliki programistyczne | |
126 | Group: Development/Libraries | |
127 | Requires: Qt5Nfc = %{version}-%{release} | |
669240ed JB |
128 | Requires: Qt5Core-devel >= %{qtbase_ver} |
129 | Requires: Qt5DBus-devel >= %{qtbase_ver} | |
130 | Requires: Qt5Qml-devel >= %{qtdeclarative_ver} | |
c6624e8f | 131 | Obsoletes: qt5-qtconnectivity-devel |
20dfc6e6 | 132 | |
c6624e8f JB |
133 | %description -n Qt5Nfc-devel |
134 | The Qt5 Nfc - development files. | |
20dfc6e6 | 135 | |
c6624e8f JB |
136 | %description -n Qt5Nfc-devel -l pl.UTF-8 |
137 | Biblioteka Qt5 Nfc - pliki programistyczne. | |
fc999486 | 138 | |
20dfc6e6 | 139 | %package doc |
fc999486 JB |
140 | Summary: Qt5 Connectivity documentation in HTML format |
141 | Summary(pl.UTF-8): Dokumentacja do bibliotek Qt5 Connectivity w formacie HTML | |
20dfc6e6 | 142 | Group: Documentation |
fc999486 | 143 | Requires: qt5-doc-common >= %{qtbase_ver} |
7703f69f | 144 | BuildArch: noarch |
20dfc6e6 WF |
145 | |
146 | %description doc | |
fc999486 JB |
147 | Qt5 Connectivity documentation in HTML format. |
148 | ||
149 | %description doc -l pl.UTF-8 | |
150 | Dokumentacja do bibliotek Qt5 Connectivity w formacie HTML. | |
151 | ||
152 | %package doc-qch | |
153 | Summary: Qt5 Connectivity documentation in QCH format | |
154 | Summary(pl.UTF-8): Dokumentacja do bibliotek Qt5 Connectivity w formacie QCH | |
155 | Group: Documentation | |
156 | Requires: qt5-doc-common >= %{qtbase_ver} | |
7703f69f | 157 | BuildArch: noarch |
fc999486 JB |
158 | |
159 | %description doc-qch | |
160 | Qt5 Connectivity documentation in QCH format. | |
161 | ||
162 | %description doc-qch -l pl.UTF-8 | |
163 | Dokumentacja do bibliotek Qt5 Connectivity w formacie QCH. | |
20dfc6e6 WF |
164 | |
165 | %package examples | |
fc999486 JB |
166 | Summary: Qt5 Connectivity examples |
167 | Summary(pl.UTF-8): Przykłady do bibliotek Qt5 Connectivity | |
20dfc6e6 | 168 | Group: X11/Development/Libraries |
7703f69f | 169 | BuildArch: noarch |
20dfc6e6 WF |
170 | |
171 | %description examples | |
fc999486 JB |
172 | Qt5 Connectivity examples. |
173 | ||
174 | %description examples -l pl.UTF-8 | |
175 | Przykłady do bibliotek Qt5 Connectivity. | |
20dfc6e6 WF |
176 | |
177 | %prep | |
62bf581d | 178 | %setup -q -n %{orgname}-everywhere-src-%{version} %{?with_qm:-a1} |
20dfc6e6 WF |
179 | |
180 | %build | |
1c5421e5 | 181 | %{qmake_qt5} |
20dfc6e6 | 182 | %{__make} |
a53e4ea4 | 183 | %{?with_doc:%{__make} docs} |
20dfc6e6 | 184 | |
52175abf | 185 | %if %{with qm} |
62bf581d | 186 | cd qttranslations-everywhere-src-%{version} |
1c5421e5 | 187 | %{qmake_qt5} |
52175abf JB |
188 | %{__make} |
189 | cd .. | |
190 | %endif | |
191 | ||
20dfc6e6 WF |
192 | %install |
193 | rm -rf $RPM_BUILD_ROOT | |
9a71b2a3 | 194 | |
20dfc6e6 WF |
195 | %{__make} install \ |
196 | INSTALL_ROOT=$RPM_BUILD_ROOT | |
197 | ||
a53e4ea4 JR |
198 | %if %{with doc} |
199 | %{__make} install_docs \ | |
20dfc6e6 | 200 | INSTALL_ROOT=$RPM_BUILD_ROOT |
a53e4ea4 | 201 | %endif |
20dfc6e6 | 202 | |
52175abf | 203 | %if %{with qm} |
62bf581d | 204 | %{__make} -C qttranslations-everywhere-src-%{version} install \ |
52175abf JB |
205 | INSTALL_ROOT=$RPM_BUILD_ROOT |
206 | # keep only qtconnectivity | |
86493eb5 | 207 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/qt5/translations/{assistant,designer,linguist,qt,qtbase,qtdeclarative,qtlocation,qtmultimedia,qtquickcontrols,qtquickcontrols2,qtserialport,qtscript,qtwebengine,qtwebsockets,qtxmlpatterns}_*.qm |
52175abf JB |
208 | %endif |
209 | ||
fc999486 | 210 | # useless symlinks |
62bf581d | 211 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.?? |
fc999486 JB |
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) |
62bf581d | 266 | %doc LICENSE.GPL3-EXCEPT 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 | 306 | |
a53e4ea4 | 307 | %if %{with doc} |
20dfc6e6 WF |
308 | %files doc |
309 | %defattr(644,root,root,755) | |
669240ed JB |
310 | %{_docdir}/qt5-doc/qtbluetooth |
311 | %{_docdir}/qt5-doc/qtnfc | |
312 | ||
669240ed JB |
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 |