]> git.pld-linux.org Git - packages/qt5-qtconnectivity.git/blob - qt5-qtconnectivity.spec
5915ced5bc662d34c7bbc205ee622ea840b69157
[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.13.2
14 Release:        1
15 License:        LGPL v2.1 with Digia Qt LGPL Exception v1.1 or GPL v3.0
16 Group:          Libraries
17 Source0:        http://download.qt.io/official_releases/qt/5.13/%{version}/submodules/%{orgname}-everywhere-src-%{version}.tar.xz
18 # Source0-md5:  b5880efe2f2fb0b18ce4a780dc0bf17d
19 Source1:        http://download.qt.io/official_releases/qt/5.13/%{version}/submodules/qttranslations-everywhere-src-%{version}.tar.xz
20 # Source1-md5:  fea07dab5b04fe170fc06987f4fd0b0f
21 URL:            http://www.qt.io/
22 BuildRequires:  Qt5Concurrent-devel >= %{qtbase_ver}
23 BuildRequires:  Qt5Core-devel >= %{qtbase_ver}
24 BuildRequires:  Qt5DBus-devel >= %{qtbase_ver}
25 BuildRequires:  Qt5Qml-devel >= %{qtdeclarative_ver}
26 BuildRequires:  bluez-libs-devel
27 %if %{with doc}
28 BuildRequires:  qt5-assistant >= %{qttools_ver}
29 %endif
30 BuildRequires:  qt5-build >= %{qtbase_ver}
31 %{?with_qm:BuildRequires:       qt5-linguist >= %{qttools_ver}}
32 BuildRequires:  qt5-qmake >= %{qtbase_ver}
33 BuildRequires:  rpmbuild(macros) >= 1.654
34 BuildRequires:  tar >= 1:1.22
35 BuildRequires:  xz
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %define         specflags       -fno-strict-aliasing
39 %define         qt5dir          %{_libdir}/qt5
40
41 %description
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
46 This package contains Qt5 Connectivity libraries: Qt5Bluetooth and
47 QtNfc.
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
55 Ten pakiet zawiera biblioteki Qt5 Connectivity: Qt5Bluetooth i Qt5Nfc.
56
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
69 %package -n Qt5Bluetooth
70 Summary:        Qt5 Bluetooth library
71 Summary(pl.UTF-8):      Biblioteka Qt5 Bluetooth
72 Group:          Libraries
73 Requires:       %{name}-common = %{version}-%{release}
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
107 Requires:       %{name}-common = %{version}-%{release}
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}
125 Requires:       Qt5Core-devel >= %{qtbase_ver}
126 Requires:       Qt5DBus-devel >= %{qtbase_ver}
127 Requires:       Qt5Qml-devel >= %{qtdeclarative_ver}
128 Obsoletes:      qt5-qtconnectivity-devel
129
130 %description -n Qt5Nfc-devel
131 The Qt5 Nfc - development files.
132
133 %description -n Qt5Nfc-devel -l pl.UTF-8
134 Biblioteka Qt5 Nfc - pliki programistyczne.
135
136 %package doc
137 Summary:        Qt5 Connectivity documentation in HTML format
138 Summary(pl.UTF-8):      Dokumentacja do bibliotek Qt5 Connectivity w formacie HTML
139 Group:          Documentation
140 Requires:       qt5-doc-common >= %{qtbase_ver}
141 %if "%{_rpmversion}" >= "5"
142 BuildArch:      noarch
143 %endif
144
145 %description doc
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.
165
166 %package examples
167 Summary:        Qt5 Connectivity examples
168 Summary(pl.UTF-8):      Przykłady do bibliotek Qt5 Connectivity
169 Group:          X11/Development/Libraries
170 %if "%{_rpmversion}" >= "5"
171 BuildArch:      noarch
172 %endif
173
174 %description examples
175 Qt5 Connectivity examples.
176
177 %description examples -l pl.UTF-8
178 Przykłady do bibliotek Qt5 Connectivity.
179
180 %prep
181 %setup -q -n %{orgname}-everywhere-src-%{version} %{?with_qm:-a1}
182
183 %build
184 qmake-qt5
185 %{__make}
186 %{?with_doc:%{__make} docs}
187
188 %if %{with qm}
189 cd qttranslations-everywhere-src-%{version}
190 qmake-qt5
191 %{__make}
192 cd ..
193 %endif
194
195 %install
196 rm -rf $RPM_BUILD_ROOT
197 %{__make} install \
198         INSTALL_ROOT=$RPM_BUILD_ROOT
199
200 %if %{with doc}
201 %{__make} install_docs \
202         INSTALL_ROOT=$RPM_BUILD_ROOT
203 %endif
204
205 %if %{with qm}
206 %{__make} -C qttranslations-everywhere-src-%{version} install \
207         INSTALL_ROOT=$RPM_BUILD_ROOT
208 # keep only qtconnectivity
209 %{__rm} $RPM_BUILD_ROOT%{_datadir}/qt5/translations/{assistant,designer,linguist,qt,qtbase,qtdeclarative,qtlocation,qtmultimedia,qtquickcontrols,qtquickcontrols2,qtserialport,qtscript,qtwebengine,qtwebsockets,qtxmlpatterns}_*.qm
210 %endif
211
212 # useless symlinks
213 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.??
214 # actually drop *.la, follow policy of not packaging them when *.pc exist
215 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la
216
217 # Prepare some files list
218 ifecho() {
219         r="$RPM_BUILD_ROOT$2"
220         if [ -d "$r" ]; then
221                 echo "%%dir $2" >> $1.files
222         elif [ -x "$r" ] ; then
223                 echo "%%attr(755,root,root) $2" >> $1.files
224         elif [ -f "$r" ]; then
225                 echo "$2" >> $1.files
226         else
227                 echo "Error generation $1 files list!"
228                 echo "$r: no such file or directory!"
229                 return 1
230         fi
231 }
232 ifecho_tree() {
233         ifecho $1 $2
234         for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do
235                 ifecho $1 $2/$f
236         done
237 }
238
239 echo "%defattr(644,root,root,755)" > examples.files
240 ifecho_tree examples %{_examplesdir}/qt5/bluetooth
241 ifecho_tree examples %{_examplesdir}/qt5/nfc
242
243 # find_lang --with-qm supports only PLD qt3/qt4 specific %{_datadir}/locale/*/LC_MESSAGES layout
244 find_qt5_qm()
245 {
246         name="$1"
247         find $RPM_BUILD_ROOT%{_datadir}/qt5/translations -name "${name}_*.qm" | \
248                 sed -e "s:^$RPM_BUILD_ROOT::" \
249                     -e 's:\(.*/'$name'_\)\([a-z][a-z][a-z]\?\)\(_[A-Z][A-Z]\)\?\(\.qm\)$:%lang(\2\3) \1\2\3\4:'
250 }
251
252 echo '%defattr(644,root,root,755)' > qtconnectivity.lang
253 %if %{with qm}
254 find_qt5_qm qtconnectivity >> qtconnectivity.lang
255 %endif
256
257 %clean
258 rm -rf $RPM_BUILD_ROOT
259
260 %post   -n Qt5Bluetooth -p /sbin/ldconfig
261 %postun -n Qt5Bluetooth -p /sbin/ldconfig
262
263 %post   -n Qt5Nfc -p /sbin/ldconfig
264 %postun -n Qt5Nfc -p /sbin/ldconfig
265
266 %files common -f qtconnectivity.lang
267 %defattr(644,root,root,755)
268 %doc LICENSE.GPL3-EXCEPT dist/changes-*
269
270 %files -n Qt5Bluetooth
271 %defattr(644,root,root,755)
272 %attr(755,root,root) %{_libdir}/libQt5Bluetooth.so.*.*.*
273 %attr(755,root,root) %ghost %{_libdir}/libQt5Bluetooth.so.5
274 %attr(755,root,root) %{qt5dir}/bin/sdpscanner
275 %dir %{qt5dir}/qml/QtBluetooth
276 %attr(755,root,root) %{qt5dir}/qml/QtBluetooth/libdeclarative_bluetooth.so
277 %{qt5dir}/qml/QtBluetooth/plugins.qmltypes
278 %{qt5dir}/qml/QtBluetooth/qmldir
279
280 %files -n Qt5Bluetooth-devel
281 %defattr(644,root,root,755)
282 %attr(755,root,root) %{_libdir}/libQt5Bluetooth.so
283 %{_libdir}/libQt5Bluetooth.prl
284 %{_includedir}/qt5/QtBluetooth
285 %{_pkgconfigdir}/Qt5Bluetooth.pc
286 %{_libdir}/cmake/Qt5Bluetooth
287 %{qt5dir}/mkspecs/modules/qt_lib_bluetooth.pri
288 %{qt5dir}/mkspecs/modules/qt_lib_bluetooth_private.pri
289
290 %files -n Qt5Nfc
291 %defattr(644,root,root,755)
292 %attr(755,root,root) %{_libdir}/libQt5Nfc.so.*.*.*
293 %attr(755,root,root) %ghost %{_libdir}/libQt5Nfc.so.5
294 %dir %{qt5dir}/qml/QtNfc
295 %attr(755,root,root) %{qt5dir}/qml/QtNfc/libdeclarative_nfc.so
296 %{qt5dir}/qml/QtNfc/plugins.qmltypes
297 %{qt5dir}/qml/QtNfc/qmldir
298
299 %files -n Qt5Nfc-devel
300 %defattr(644,root,root,755)
301 %attr(755,root,root) %{_libdir}/libQt5Nfc.so
302 %{_libdir}/libQt5Nfc.prl
303 %{_includedir}/qt5/QtNfc
304 %{_pkgconfigdir}/Qt5Nfc.pc
305 %{_libdir}/cmake/Qt5Nfc
306 %{qt5dir}/mkspecs/modules/qt_lib_nfc.pri
307 %{qt5dir}/mkspecs/modules/qt_lib_nfc_private.pri
308
309 %if %{with doc}
310 %files doc
311 %defattr(644,root,root,755)
312 %{_docdir}/qt5-doc/qtbluetooth
313 %{_docdir}/qt5-doc/qtnfc
314
315 %files doc-qch
316 %defattr(644,root,root,755)
317 %{_docdir}/qt5-doc/qtbluetooth.qch
318 %{_docdir}/qt5-doc/qtnfc.qch
319 %endif
320
321 %files examples -f examples.files
322 %defattr(644,root,root,755)
323 # XXX: dir shared with qt5-qtbase-examples
324 %dir %{_examplesdir}/qt5
This page took 0.063487 seconds and 2 git commands to generate.