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: http://download.qt.io/official_releases/qt/5.15/%{version}/submodules/%{orgname}-everywhere-opensource-src-%{version}.tar.xz
18 # Source0-md5: 790a627fd53a94f1f779be6d5ee76cc6
19 URL: https://www.qt.io/
20 BuildRequires: Qt5Core-devel >= %{qtbase_ver}
21 BuildRequires: Qt5Network-devel >= %{qtbase_ver}
22 BuildRequires: Qt5Qml-devel >= %{qtdeclarative_ver}
23 BuildRequires: Qt5Quick-devel >= %{qtdeclarative_ver}
25 BuildRequires: Qt5WebSockets-devel >= %{qtwebsockets_ver}
27 BuildRequires: qt5-assistant >= %{qttools_ver}
29 BuildRequires: qt5-build >= %{qtbase_ver}
30 BuildRequires: qt5-qmake >= %{qtbase_ver}
31 BuildRequires: rpmbuild(macros) >= 1.752
32 BuildRequires: tar >= 1:1.22
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 %define specflags -fno-strict-aliasing
37 %define qt5dir %{_libdir}/qt5
40 Qt is a cross-platform application and UI framework. Using Qt, you can
41 write web-enabled applications once and deploy them across desktop,
42 mobile and embedded systems without rewriting the source code.
44 This package contains Qt5 WebChannel library.
46 %description -l pl.UTF-8
47 Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika.
48 Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w
49 systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu
52 Ten pakiet zawiera bibliotekę Qt5 WebChannel.
54 %package -n Qt5WebChannel
55 Summary: The Qt5 WebChannel library
56 Summary(pl.UTF-8): Biblioteka Qt5 WebChannel
58 Requires: Qt5Core >= %{qtbase_ver}
59 Requires: Qt5Network >= %{qtbase_ver}
60 Requires: Qt5Qml >= %{qtdeclarative_ver}
62 %description -n Qt5WebChannel
63 Qt5 WebChannel library provides seamless integration of C++ and QML
64 applications with HTML/JavaScript clients.
66 %description -n Qt5WebChannel -l pl.UTF-8
67 Biblioteka Qt5 WebChannel udostępnia integrację aplikacji C++ i QML z
68 klientami w HTML-u/JavaScripcie.
70 %package -n Qt5WebChannel-devel
71 Summary: Qt5 WebChannel library - development files
72 Summary(pl.UTF-8): Biblioteka Qt5 WebChannel - pliki programistyczne
73 Group: Development/Libraries
74 Requires: Qt5Core-devel >= %{qtbase_ver}
75 Requires: Qt5Network-devel >= %{qtbase_ver}
76 Requires: Qt5Qml-devel >= %{qtdeclarative_ver}
77 Requires: Qt5WebChannel = %{version}-%{release}
79 %description -n Qt5WebChannel-devel
80 Qt5 WebChannel library - development files.
82 %description -n Qt5WebChannel-devel -l pl.UTF-8
83 Biblioteka Qt5 WebChannel - pliki programistyczne.
86 Summary: Qt5 WebChannel documentation in HTML format
87 Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 WebChannel w formacie HTML
89 Requires: qt5-doc-common >= %{qtbase_ver}
93 Qt5 WebChannel documentation in HTML format.
95 %description doc -l pl.UTF-8
96 Dokumentacja do biblioteki Qt5 WebChannel w formacie HTML.
99 Summary: Qt5 WebChannel documentation in QCH format
100 Summary(pl.UTF-8): Dokumentacja do biblioteki Qt5 WebChannel w formacie QCH
102 Requires: qt5-doc-common >= %{qtbase_ver}
106 Qt5 WebChannel documentation in QCH format.
108 %description doc-qch -l pl.UTF-8
109 Dokumentacja do biblioteki Qt5 WebChannel w formacie QCH.
112 Summary: Qt5 WebChannel examples
113 Summary(pl.UTF-8): Przykłady do biblioteki Qt5 WebChannel
114 Group: X11/Development/Libraries
117 %description examples
118 Qt5 WebChannel examples.
120 %description examples -l pl.UTF-8
121 Przykłady do biblioteki Qt5 WebChannel.
124 %setup -q -n %{orgname}-everywhere-src-%{version}
127 s,^#!.*bin/env node,#!/usr/bin/node,
129 examples/webchannel/qwclient/qwclient.js
134 %{?with_doc:%{__make} docs}
137 rm -rf $RPM_BUILD_ROOT
139 INSTALL_ROOT=$RPM_BUILD_ROOT
142 %{__make} install_docs \
143 INSTALL_ROOT=$RPM_BUILD_ROOT
147 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.??
148 # actually drop *.la, follow policy of not packaging them when *.pc exist
149 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la
151 # Prepare some files list
153 r="$RPM_BUILD_ROOT$2"
155 echo "%%dir $2" >> $1.files
156 elif [ -x "$r" ] ; then
157 echo "%%attr(755,root,root) $2" >> $1.files
158 elif [ -f "$r" ]; then
159 echo "$2" >> $1.files
161 echo "Error generation $1 files list!"
162 echo "$r: no such file or directory!"
168 for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do
173 echo "%defattr(644,root,root,755)" > examples.files
174 ifecho_tree examples %{_examplesdir}/qt5/webchannel
177 rm -rf $RPM_BUILD_ROOT
179 %post -n Qt5WebChannel -p /sbin/ldconfig
180 %postun -n Qt5WebChannel -p /sbin/ldconfig
182 %files -n Qt5WebChannel
183 %defattr(644,root,root,755)
184 %doc LICENSE.GPL3-EXCEPT README.md
186 %attr(755,root,root) %{_libdir}/libQt5WebChannel.so.*.*.*
187 %attr(755,root,root) %ghost %{_libdir}/libQt5WebChannel.so.5
188 %dir %{qt5dir}/qml/QtWebChannel
190 %attr(755,root,root) %{qt5dir}/qml/QtWebChannel/libdeclarative_webchannel.so
191 %{qt5dir}/qml/QtWebChannel/plugins.qmltypes
192 %{qt5dir}/qml/QtWebChannel/qmldir
194 %files -n Qt5WebChannel-devel
195 %defattr(644,root,root,755)
196 %attr(755,root,root) %{_libdir}/libQt5WebChannel.so
197 %{_libdir}/libQt5WebChannel.prl
198 %{_includedir}/qt5/QtWebChannel
199 %{_pkgconfigdir}/Qt5WebChannel.pc
200 %{_libdir}/cmake/Qt5WebChannel
201 %{qt5dir}/mkspecs/modules/qt_lib_webchannel.pri
202 %{qt5dir}/mkspecs/modules/qt_lib_webchannel_private.pri
206 %defattr(644,root,root,755)
207 %{_docdir}/qt5-doc/qtwebchannel
210 %defattr(644,root,root,755)
211 %{_docdir}/qt5-doc/qtwebchannel.qch
214 %files examples -f examples.files
215 %defattr(644,root,root,755)
216 # XXX: dir shared with qt5-qtbase-examples
217 %dir %{_examplesdir}/qt5