3 %bcond_without doc # Documentation
5 %define orgname qtwebchannel
6 %define qtbase_ver %{version}
7 %define qtdeclarative_ver %{version}
8 %define qttools_ver %{version}
9 %define qtwebsockets_ver %{version}
10 Summary: The Qt5 WebChannel library
11 Summary(pl.UTF-8): Biblioteka Qt5 WebChannel
15 License: LGPL v3 or GPL v2 or GPL v3 or commercial
17 Source0: https://download.qt.io/official_releases/qt/5.15/%{version}/submodules/%{orgname}-everywhere-opensource-src-%{version}.tar.xz
18 # Source0-md5: 32e80b988323af6fc40c0e25b57578f3
19 Patch0: parallel-install.patch
20 URL: https://www.qt.io/
21 BuildRequires: Qt5Core-devel >= %{qtbase_ver}
22 BuildRequires: Qt5Network-devel >= %{qtbase_ver}
23 BuildRequires: Qt5Qml-devel >= %{qtdeclarative_ver}
24 BuildRequires: Qt5Quick-devel >= %{qtdeclarative_ver}
26 BuildRequires: Qt5WebSockets-devel >= %{qtwebsockets_ver}
28 BuildRequires: qt5-assistant >= %{qttools_ver}
30 BuildRequires: qt5-build >= %{qtbase_ver}
31 BuildRequires: qt5-qmake >= %{qtbase_ver}
32 BuildRequires: rpm-build >= 4.6
33 BuildRequires: rpmbuild(macros) >= 2.016
34 BuildRequires: tar >= 1:1.22
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 %define specflags -fno-strict-aliasing
39 %define qt5dir %{_libdir}/qt5
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.
46 This package contains Qt5 WebChannel library.
48 %description -l pl.UTF-8
49 Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika.
50 Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w
51 systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu
54 Ten pakiet zawiera bibliotekę Qt5 WebChannel.
56 %package -n Qt5WebChannel
57 Summary: The Qt5 WebChannel library
58 Summary(pl.UTF-8): Biblioteka Qt5 WebChannel
60 %requires_eq_to Qt5Core Qt5Core-devel
61 Requires: Qt5Network >= %{qtbase_ver}
62 Requires: Qt5Qml >= %{qtdeclarative_ver}
64 %description -n Qt5WebChannel
65 Qt5 WebChannel library provides seamless integration of C++ and QML
66 applications with HTML/JavaScript clients.
68 %description -n Qt5WebChannel -l pl.UTF-8
69 Biblioteka Qt5 WebChannel udostępnia integrację aplikacji C++ i QML z
70 klientami w HTML-u/JavaScripcie.
72 %package -n Qt5WebChannel-devel
73 Summary: Qt5 WebChannel library - development files
74 Summary(pl.UTF-8): Biblioteka Qt5 WebChannel - pliki programistyczne
75 Group: Development/Libraries
76 Requires: Qt5Core-devel >= %{qtbase_ver}
77 Requires: Qt5Network-devel >= %{qtbase_ver}
78 Requires: Qt5Qml-devel >= %{qtdeclarative_ver}
79 Requires: Qt5WebChannel = %{version}-%{release}
81 %description -n Qt5WebChannel-devel
82 Qt5 WebChannel library - development files.
84 %description -n Qt5WebChannel-devel -l pl.UTF-8
85 Biblioteka Qt5 WebChannel - pliki programistyczne.
88 Summary: Qt5 WebChannel documentation in HTML format
89 Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 WebChannel w formacie HTML
91 Requires: qt5-doc-common >= %{qtbase_ver}
95 Qt5 WebChannel documentation in HTML format.
97 %description doc -l pl.UTF-8
98 Dokumentacja do biblioteki Qt5 WebChannel w formacie HTML.
101 Summary: Qt5 WebChannel documentation in QCH format
102 Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 WebChannel w formacie QCH
104 Requires: qt5-doc-common >= %{qtbase_ver}
108 Qt5 WebChannel documentation in QCH format.
110 %description doc-qch -l pl.UTF-8
111 Dokumentacja do biblioteki Qt5 WebChannel w formacie QCH.
114 Summary: Qt5 WebChannel examples
115 Summary(pl.UTF-8): Przykłady do biblioteki Qt5 WebChannel
116 Group: X11/Development/Libraries
119 %description examples
120 Qt5 WebChannel examples.
122 %description examples -l pl.UTF-8
123 Przykłady do biblioteki Qt5 WebChannel.
126 %setup -q -n %{orgname}-everywhere-src-%{version}
130 s,^#!.*bin/env node,#!/usr/bin/node,
132 examples/webchannel/qwclient/qwclient.js
137 %{?with_doc:%{__make} docs}
140 rm -rf $RPM_BUILD_ROOT
142 INSTALL_ROOT=$RPM_BUILD_ROOT
145 %{__make} install_docs \
146 INSTALL_ROOT=$RPM_BUILD_ROOT
150 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.??
151 # actually drop *.la, follow policy of not packaging them when *.pc exist
152 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la
154 # Prepare some files list
156 r="$RPM_BUILD_ROOT$2"
158 echo "%%dir $2" >> $1.files
159 elif [ -x "$r" ] ; then
160 echo "%%attr(755,root,root) $2" >> $1.files
161 elif [ -f "$r" ]; then
162 echo "$2" >> $1.files
164 echo "Error generation $1 files list!"
165 echo "$r: no such file or directory!"
171 for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do
176 echo "%defattr(644,root,root,755)" > examples.files
177 ifecho_tree examples %{_examplesdir}/qt5/webchannel
180 rm -rf $RPM_BUILD_ROOT
182 %post -n Qt5WebChannel -p /sbin/ldconfig
183 %postun -n Qt5WebChannel -p /sbin/ldconfig
185 %files -n Qt5WebChannel
186 %defattr(644,root,root,755)
187 %doc LICENSE.GPL3-EXCEPT README.md
189 %attr(755,root,root) %{_libdir}/libQt5WebChannel.so.*.*.*
190 %attr(755,root,root) %ghost %{_libdir}/libQt5WebChannel.so.5
191 %dir %{qt5dir}/qml/QtWebChannel
193 %attr(755,root,root) %{qt5dir}/qml/QtWebChannel/libdeclarative_webchannel.so
194 %{qt5dir}/qml/QtWebChannel/plugins.qmltypes
195 %{qt5dir}/qml/QtWebChannel/qmldir
197 %files -n Qt5WebChannel-devel
198 %defattr(644,root,root,755)
199 %attr(755,root,root) %{_libdir}/libQt5WebChannel.so
200 %{_libdir}/libQt5WebChannel.prl
201 %{_includedir}/qt5/QtWebChannel
202 %{_pkgconfigdir}/Qt5WebChannel.pc
203 %{_libdir}/cmake/Qt5WebChannel
204 %{qt5dir}/mkspecs/modules/qt_lib_webchannel.pri
205 %{qt5dir}/mkspecs/modules/qt_lib_webchannel_private.pri
209 %defattr(644,root,root,755)
210 %{_docdir}/qt5-doc/qtwebchannel
213 %defattr(644,root,root,755)
214 %{_docdir}/qt5-doc/qtwebchannel.qch
217 %files examples -f examples.files
218 %defattr(644,root,root,755)
219 # XXX: dir shared with qt5-qtbase-examples
220 %dir %{_examplesdir}/qt5