]> git.pld-linux.org Git - packages/qt5-qtconnectivity.git/blame - qt5-qtconnectivity.spec
use macro for qmake invocation
[packages/qt5-qtconnectivity.git] / qt5-qtconnectivity.spec
CommitLineData
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}
10Summary: The Qt5 Connectivity libraries
11Summary(pl.UTF-8): Biblioteki Qt5 Connectivity
20dfc6e6 12Name: qt5-%{orgname}
5e2540c3
JP
13Version: 5.15.4
14Release: 1
9a71b2a3 15License: LGPL v3 or GPL v2 or GPL v3 or commercial
c6624e8f 16Group: Libraries
68d1e5b2 17Source0: https://download.qt.io/official_releases/qt/5.15/%{version}/submodules/%{orgname}-everywhere-opensource-src-%{version}.tar.xz
5e2540c3 18# Source0-md5: d79c1bc630b57c90618224a2157e0eb3
68d1e5b2 19Source1: https://download.qt.io/official_releases/qt/5.15/%{version}/submodules/qttranslations-everywhere-opensource-src-%{version}.tar.xz
5e2540c3 20# Source1-md5: 6ba46a712a698118f396f78a785f6774
9a71b2a3 21URL: https://www.qt.io/
669240ed
JB
22BuildRequires: Qt5Concurrent-devel >= %{qtbase_ver}
23BuildRequires: Qt5Core-devel >= %{qtbase_ver}
24BuildRequires: Qt5DBus-devel >= %{qtbase_ver}
9a71b2a3 25BuildRequires: Qt5Network-devel >= %{qtbase_ver}
669240ed 26BuildRequires: Qt5Qml-devel >= %{qtdeclarative_ver}
20dfc6e6 27BuildRequires: bluez-libs-devel
a53e4ea4 28%if %{with doc}
fc999486
JB
29BuildRequires: qt5-assistant >= %{qttools_ver}
30%endif
31BuildRequires: qt5-build >= %{qtbase_ver}
52175abf 32%{?with_qm:BuildRequires: qt5-linguist >= %{qttools_ver}}
fc999486 33BuildRequires: qt5-qmake >= %{qtbase_ver}
149cbf6d 34BuildRequires: rpm-build >= 4.6
1c5421e5 35BuildRequires: rpmbuild(macros) >= 2.016
9b02a8fb
ER
36BuildRequires: tar >= 1:1.22
37BuildRequires: xz
20dfc6e6
WF
38BuildRoot: %{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
44Qt is a cross-platform application and UI framework. Using Qt, you can
45write web-enabled applications once and deploy them across desktop,
46mobile and embedded systems without rewriting the source code.
47
c6624e8f
JB
48This package contains Qt5 Connectivity libraries: Qt5Bluetooth and
49QtNfc.
fc999486
JB
50
51%description -l pl.UTF-8
52Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika.
53Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w
54systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu
55źródłowego.
56
c6624e8f 57Ten pakiet zawiera biblioteki Qt5 Connectivity: Qt5Bluetooth i Qt5Nfc.
20dfc6e6 58
52175abf
JB
59%package common
60Summary: Common files used by all Qt5 Connectivity components
61Summary(pl.UTF-8): Wspólne pliki wykorzystywane przez wszystkie komponenty Qt5 Connectivity
62Group: Libraries
63
64%description common
65Common files used by all Qt5 Connectivity components.
66
67%description common -l pl.UTF-8
68Wspólne pliki wykorzystywane przez wszystkie komponenty Qt5
69Connectivity.
70
c6624e8f
JB
71%package -n Qt5Bluetooth
72Summary: Qt5 Bluetooth library
73Summary(pl.UTF-8): Biblioteka Qt5 Bluetooth
74Group: Libraries
52175abf 75Requires: %{name}-common = %{version}-%{release}
c6624e8f
JB
76Requires: Qt5Core >= %{qtbase_ver}
77Requires: Qt5DBus >= %{qtbase_ver}
9a71b2a3 78Requires: Qt5Network >= %{qtbase_ver}
c6624e8f 79Requires: Qt5Qml >= %{qtdeclarative_ver}
09e88395 80Obsoletes: qt5-qtconnectivity < 5.3.1
c6624e8f
JB
81
82%description -n Qt5Bluetooth
83Qt5 Bluetooth library provides classes that enable basic Bluetooth
84operations like scanning for devices and connecting them.
85
86%description -n Qt5Bluetooth -l pl.UTF-8
87Biblioteka Qt5 Bluetooth dostarcza klasy umożliwiające podstawowe
88operacje Bluetooth, takie jak wyszukiwanie urządzeń i łączenie z nimi.
89
90%package -n Qt5Bluetooth-devel
91Summary: The Qt5 Bluetooth - development files
92Summary(pl.UTF-8): Biblioteka Qt5 Bluetooth - pliki programistyczne
93Group: Development/Libraries
94Requires: Qt5Bluetooth = %{version}-%{release}
95Requires: Qt5Core-devel >= %{qtbase_ver}
96Requires: Qt5DBus-devel >= %{qtbase_ver}
97Requires: Qt5Qml-devel >= %{qtdeclarative_ver}
09e88395 98Obsoletes: qt5-qtconnectivity-devel < 5.3.1
c6624e8f
JB
99
100%description -n Qt5Bluetooth-devel
101The Qt5 Bluetooth - development files.
102
103%description -n Qt5Bluetooth-devel -l pl.UTF-8
104Biblioteka Qt5 Bluetooth - pliki programistyczne.
105
106%package -n Qt5Nfc
107Summary: Qt5 Nfc library
108Summary(pl.UTF-8): Biblioteka Qt5 Nfc
109Group: Libraries
52175abf 110Requires: %{name}-common = %{version}-%{release}
c6624e8f
JB
111Requires: Qt5Core >= %{qtbase_ver}
112Requires: Qt5DBus >= %{qtbase_ver}
113Requires: Qt5Qml >= %{qtdeclarative_ver}
114Obsoletes: qt5-qtconnectivity
115
116%description -n Qt5Nfc
117Qt5 Nfc library provides classes to access NFC Forum Tags.
118
119%description -n Qt5Nfc -l pl.UTF-8
120Biblioteka Qt5 Nfc dostarcza klasy służace do dostępu do urządzeń NFC
121Forum.
122
123%package -n Qt5Nfc-devel
124Summary: The Qt5 Nfc - development files
125Summary(pl.UTF-8): Biblioteka Qt5 Nfc - pliki programistyczne
126Group: Development/Libraries
127Requires: Qt5Nfc = %{version}-%{release}
669240ed
JB
128Requires: Qt5Core-devel >= %{qtbase_ver}
129Requires: Qt5DBus-devel >= %{qtbase_ver}
130Requires: Qt5Qml-devel >= %{qtdeclarative_ver}
c6624e8f 131Obsoletes: qt5-qtconnectivity-devel
20dfc6e6 132
c6624e8f
JB
133%description -n Qt5Nfc-devel
134The Qt5 Nfc - development files.
20dfc6e6 135
c6624e8f
JB
136%description -n Qt5Nfc-devel -l pl.UTF-8
137Biblioteka Qt5 Nfc - pliki programistyczne.
fc999486 138
20dfc6e6 139%package doc
fc999486
JB
140Summary: Qt5 Connectivity documentation in HTML format
141Summary(pl.UTF-8): Dokumentacja do bibliotek Qt5 Connectivity w formacie HTML
20dfc6e6 142Group: Documentation
fc999486 143Requires: qt5-doc-common >= %{qtbase_ver}
7703f69f 144BuildArch: noarch
20dfc6e6
WF
145
146%description doc
fc999486
JB
147Qt5 Connectivity documentation in HTML format.
148
149%description doc -l pl.UTF-8
150Dokumentacja do bibliotek Qt5 Connectivity w formacie HTML.
151
152%package doc-qch
153Summary: Qt5 Connectivity documentation in QCH format
154Summary(pl.UTF-8): Dokumentacja do bibliotek Qt5 Connectivity w formacie QCH
155Group: Documentation
156Requires: qt5-doc-common >= %{qtbase_ver}
7703f69f 157BuildArch: noarch
fc999486
JB
158
159%description doc-qch
160Qt5 Connectivity documentation in QCH format.
161
162%description doc-qch -l pl.UTF-8
163Dokumentacja do bibliotek Qt5 Connectivity w formacie QCH.
20dfc6e6
WF
164
165%package examples
fc999486
JB
166Summary: Qt5 Connectivity examples
167Summary(pl.UTF-8): Przykłady do bibliotek Qt5 Connectivity
20dfc6e6 168Group: X11/Development/Libraries
7703f69f 169BuildArch: noarch
20dfc6e6
WF
170
171%description examples
fc999486
JB
172Qt5 Connectivity examples.
173
174%description examples -l pl.UTF-8
175Przykł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 186cd qttranslations-everywhere-src-%{version}
1c5421e5 187%{qmake_qt5}
52175abf
JB
188%{__make}
189cd ..
190%endif
191
20dfc6e6
WF
192%install
193rm -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
216ifecho() {
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}
230ifecho_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
237echo "%defattr(644,root,root,755)" > examples.files
238ifecho_tree examples %{_examplesdir}/qt5/bluetooth
239ifecho_tree examples %{_examplesdir}/qt5/nfc
240
52175abf
JB
241# find_lang --with-qm supports only PLD qt3/qt4 specific %{_datadir}/locale/*/LC_MESSAGES layout
242find_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
250echo '%defattr(644,root,root,755)' > qtconnectivity.lang
251%if %{with qm}
252find_qt5_qm qtconnectivity >> qtconnectivity.lang
253%endif
254
20dfc6e6
WF
255%clean
256rm -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
This page took 0.248733 seconds and 4 git commands to generate.