#
# Conditional build:
-%bcond_without qch # documentation in QCH format
+%bcond_without doc # Documentation
%define orgname qtwebchannel
%define qtbase_ver %{version}
Summary: The Qt5 WebChannel library
Summary(pl.UTF-8): Biblioteka Qt5 WebChannel
Name: qt5-%{orgname}
-Version: 5.5.1
-Release: 1
+Version: 5.14.0
+Release: 2
License: LGPL v2.1 with Digia Qt LGPL Exception v1.1 or GPL v3.0
Group: X11/Libraries
-Source0: http://download.qt.io/official_releases/qt/5.5/%{version}/submodules/%{orgname}-opensource-src-%{version}.tar.xz
-# Source0-md5: f2e15d52c1b7732c2afbfb7e843091cf
+Source0: http://download.qt.io/official_releases/qt/5.14/%{version}/submodules/%{orgname}-everywhere-src-%{version}.tar.xz
+# Source0-md5: be6a8809f2c16bac7775a1a24e82de7a
URL: http://www.qt.io/
BuildRequires: Qt5Core-devel >= %{qtbase_ver}
BuildRequires: Qt5Network-devel >= %{qtbase_ver}
BuildRequires: Qt5Qml-devel >= %{qtdeclarative_ver}
BuildRequires: Qt5Quick-devel >= %{qtdeclarative_ver}
-%if %{with qch}
+%if %{with doc}
BuildRequires: qt5-assistant >= %{qttools_ver}
%endif
BuildRequires: qt5-build >= %{qtbase_ver}
Przykłady do biblioteki Qt5 WebChannel.
%prep
-%setup -q -n %{orgname}-opensource-src-%{version}
+%setup -q -n %{orgname}-everywhere-src-%{version}
+
+%{__sed} -i -e '1{
+ s,^#!.*bin/env node,#!/usr/bin/node,
+}' \
+ examples/webchannel/qwclient/qwclient.js
%build
qmake-qt5
%{__make}
-%{__make} %{!?with_qch:html_}docs
+%{?with_doc:%{__make} docs}
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
INSTALL_ROOT=$RPM_BUILD_ROOT
-%{__make} install_%{!?with_qch:html_}docs \
+%if %{with doc}
+%{__make} install_docs \
INSTALL_ROOT=$RPM_BUILD_ROOT
+%endif
# useless symlinks
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.?
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.??
# actually drop *.la, follow policy of not packaging them when *.pc exist
%{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la
}
echo "%defattr(644,root,root,755)" > examples.files
-ifecho_tree examples %{_examplesdir}/qt5/qwebchannel
ifecho_tree examples %{_examplesdir}/qt5/webchannel
%clean
%files -n Qt5WebChannel
%defattr(644,root,root,755)
-%doc LGPL_EXCEPTION.txt README.md
+%doc LICENSE.GPL3-EXCEPT README.md
%attr(755,root,root) %{_libdir}/libQt5WebChannel.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libQt5WebChannel.so.5
%dir %{qt5dir}/qml/QtWebChannel
%{qt5dir}/mkspecs/modules/qt_lib_webchannel.pri
%{qt5dir}/mkspecs/modules/qt_lib_webchannel_private.pri
+%if %{with doc}
%files doc
%defattr(644,root,root,755)
%{_docdir}/qt5-doc/qtwebchannel
-%if %{with qch}
%files doc-qch
%defattr(644,root,root,755)
%{_docdir}/qt5-doc/qtwebchannel.qch