]> git.pld-linux.org Git - packages/qt5-qtconnectivity.git/blob - qt5-qtconnectivity.spec
7ace0be865dfd254bd3e97d3302e0da3f6577ba9
[packages/qt5-qtconnectivity.git] / qt5-qtconnectivity.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Documentation
4 %bcond_without  qm      # QM translations
5
6 %define         orgname         qtconnectivity
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
12 Name:           qt5-%{orgname}
13 Version:        5.15.9
14 Release:        1
15 License:        LGPL v3 or GPL v2 or GPL v3 or commercial
16 Group:          Libraries
17 Source0:        https://download.qt.io/official_releases/qt/5.15/%{version}/submodules/%{orgname}-everywhere-opensource-src-%{version}.tar.xz
18 # Source0-md5:  05dc0c92198900bd7b405c14c4f95900
19 Source1:        https://download.qt.io/official_releases/qt/5.15/%{version}/submodules/qttranslations-everywhere-opensource-src-%{version}.tar.xz
20 # Source1-md5:  af998d4bc7ab3484c392520c12d5f3a3
21 URL:            https://www.qt.io/
22 BuildRequires:  Qt5Concurrent-devel >= %{qtbase_ver}
23 BuildRequires:  Qt5Core-devel >= %{qtbase_ver}
24 BuildRequires:  Qt5DBus-devel >= %{qtbase_ver}
25 BuildRequires:  Qt5Network-devel >= %{qtbase_ver}
26 BuildRequires:  Qt5Qml-devel >= %{qtdeclarative_ver}
27 BuildRequires:  bluez-libs-devel
28 %if %{with doc}
29 BuildRequires:  qt5-assistant >= %{qttools_ver}
30 %endif
31 BuildRequires:  qt5-build >= %{qtbase_ver}
32 %{?with_qm:BuildRequires:       qt5-linguist >= %{qttools_ver}}
33 BuildRequires:  qt5-qmake >= %{qtbase_ver}
34 BuildRequires:  rpm-build >= 4.6
35 BuildRequires:  rpmbuild(macros) >= 2.016
36 BuildRequires:  tar >= 1:1.22
37 BuildRequires:  xz
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %define         specflags       -fno-strict-aliasing
41 %define         qt5dir          %{_libdir}/qt5
42
43 %description
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
48 This package contains Qt5 Connectivity libraries: Qt5Bluetooth and
49 QtNfc.
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
57 Ten pakiet zawiera biblioteki Qt5 Connectivity: Qt5Bluetooth i Qt5Nfc.
58
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
71 %package -n Qt5Bluetooth
72 Summary:        Qt5 Bluetooth library
73 Summary(pl.UTF-8):      Biblioteka Qt5 Bluetooth
74 Group:          Libraries
75 Requires:       %{name}-common = %{version}-%{release}
76 Requires:       Qt5Core >= %{qtbase_ver}
77 Requires:       Qt5DBus >= %{qtbase_ver}
78 Requires:       Qt5Network >= %{qtbase_ver}
79 Requires:       Qt5Qml >= %{qtdeclarative_ver}
80 Obsoletes:      qt5-qtconnectivity < 5.3.1
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}
98 Obsoletes:      qt5-qtconnectivity-devel < 5.3.1
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
110 Requires:       %{name}-common = %{version}-%{release}
111 Requires:       Qt5Core >= %{qtbase_ver}
112 Requires:       Qt5DBus >= %{qtbase_ver}
113 Requires:       Qt5Qml >= %{qtdeclarative_ver}
114 Obsoletes:      qt5-qtconnectivity < 5.3.1
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}
128 Requires:       Qt5Core-devel >= %{qtbase_ver}
129 Requires:       Qt5DBus-devel >= %{qtbase_ver}
130 Requires:       Qt5Qml-devel >= %{qtdeclarative_ver}
131 Obsoletes:      qt5-qtconnectivity-devel < 5.3.1
132
133 %description -n Qt5Nfc-devel
134 The Qt5 Nfc - development files.
135
136 %description -n Qt5Nfc-devel -l pl.UTF-8
137 Biblioteka Qt5 Nfc - pliki programistyczne.
138
139 %package doc
140 Summary:        Qt5 Connectivity documentation in HTML format
141 Summary(pl.UTF-8):      Dokumentacja do bibliotek Qt5 Connectivity w formacie HTML
142 Group:          Documentation
143 Requires:       qt5-doc-common >= %{qtbase_ver}
144 BuildArch:      noarch
145
146 %description doc
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}
157 BuildArch:      noarch
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.
164
165 %package examples
166 Summary:        Qt5 Connectivity examples
167 Summary(pl.UTF-8):      Przykłady do bibliotek Qt5 Connectivity
168 Group:          X11/Development/Libraries
169 BuildArch:      noarch
170
171 %description examples
172 Qt5 Connectivity examples.
173
174 %description examples -l pl.UTF-8
175 Przykłady do bibliotek Qt5 Connectivity.
176
177 %prep
178 %setup -q -n %{orgname}-everywhere-src-%{version} %{?with_qm:-a1}
179
180 %build
181 %{qmake_qt5}
182 %{__make}
183 %{?with_doc:%{__make} docs}
184
185 %if %{with qm}
186 cd qttranslations-everywhere-src-%{version}
187 %{qmake_qt5}
188 %{__make}
189 cd ..
190 %endif
191
192 %install
193 rm -rf $RPM_BUILD_ROOT
194
195 %{__make} install \
196         INSTALL_ROOT=$RPM_BUILD_ROOT
197
198 %if %{with doc}
199 %{__make} install_docs \
200         INSTALL_ROOT=$RPM_BUILD_ROOT
201 %endif
202
203 %if %{with qm}
204 %{__make} -C qttranslations-everywhere-src-%{version} install \
205         INSTALL_ROOT=$RPM_BUILD_ROOT
206 # keep only qtconnectivity
207 %{__rm} $RPM_BUILD_ROOT%{_datadir}/qt5/translations/{assistant,designer,linguist,qt,qtbase,qtdeclarative,qtlocation,qtmultimedia,qtquickcontrols,qtquickcontrols2,qtserialport,qtscript,qtwebengine,qtwebsockets,qtxmlpatterns}_*.qm
208 %endif
209
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
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
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
255 %clean
256 rm -rf $RPM_BUILD_ROOT
257
258 %post   -n Qt5Bluetooth -p /sbin/ldconfig
259 %postun -n Qt5Bluetooth -p /sbin/ldconfig
260
261 %post   -n Qt5Nfc -p /sbin/ldconfig
262 %postun -n Qt5Nfc -p /sbin/ldconfig
263
264 %files common -f qtconnectivity.lang
265 %defattr(644,root,root,755)
266 %doc LICENSE.GPL3-EXCEPT dist/changes-*
267
268 %files -n Qt5Bluetooth
269 %defattr(644,root,root,755)
270 %attr(755,root,root) %{_libdir}/libQt5Bluetooth.so.*.*.*
271 %attr(755,root,root) %ghost %{_libdir}/libQt5Bluetooth.so.5
272 %attr(755,root,root) %{qt5dir}/bin/sdpscanner
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
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)
290 %attr(755,root,root) %{_libdir}/libQt5Nfc.so.*.*.*
291 %attr(755,root,root) %ghost %{_libdir}/libQt5Nfc.so.5
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
296
297 %files -n Qt5Nfc-devel
298 %defattr(644,root,root,755)
299 %attr(755,root,root) %{_libdir}/libQt5Nfc.so
300 %{_libdir}/libQt5Nfc.prl
301 %{_includedir}/qt5/QtNfc
302 %{_pkgconfigdir}/Qt5Nfc.pc
303 %{_libdir}/cmake/Qt5Nfc
304 %{qt5dir}/mkspecs/modules/qt_lib_nfc.pri
305 %{qt5dir}/mkspecs/modules/qt_lib_nfc_private.pri
306
307 %if %{with doc}
308 %files doc
309 %defattr(644,root,root,755)
310 %{_docdir}/qt5-doc/qtbluetooth
311 %{_docdir}/qt5-doc/qtnfc
312
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
This page took 0.5739 seconds and 3 git commands to generate.