%define snapshot 0 %define pre 0 %ifarch %{arm} aarch64 %define build_docs 0 %else %define build_docs 0 %endif %define qtmajor 6 %define qtminor 2 %define qtsubminor 1 %define rel 1 %define major_private 1 %define qtversion %{qtmajor}.%{qtminor}.%{qtsubminor} %define libqtwebchannel %mklibname qt6webchannel %qtmajor %define libqtwebchannel_d %mklibname qt6webchannel -d %if %snapshot %define qttarballdir qtwebchannel-everywhere-src-%{qtversion}-%pre %else %define qttarballdir qtwebchannel-everywhere-src-%{qtversion} %endif Name: qtwebchannel6 Version: %{qtversion} Release: %mkrel %{rel} Summary: Qt WebChannel component Group: Development/KDE and Qt License: LGPLv2 with exceptions or GPLv3 with exceptions and GFDL URL: https://www.qt.io/ Source0: https://download.qt.io/official_releases/qt/%{qtmajor}.%{qtminor}/%{version}/submodules/%{qttarballdir}.tar.xz BuildRequires: qtbase6-devel >= %version BuildRequires: cmake(Qt6Quick) >= %version BuildRequires: qttools6 BuildRequires: ninja #Branch Patchs #Trunk Patchs #Patch from Mageia %description The Qt WebChannel module offers Qt applications a seamless way to publish QObjects for interaction with HTML/JavaScript clients. These clients can either be inside local Qt WebViews or any other, potentially remote, client which supports JavaScript, as long as a communication channel such as WebSocket is available. Qt WebChannel uses introspection on the QObjects and sends this serialized data to the clients. There, with the help of a small JavaScript library, an object is created which simulates the API of the QObject. Any invokable methods, including slots, can be called as well as properties read and written. Additionally you can connect to signals and register JavaScript callbacks as handlers. %files %_qt6_qmldir/QtWebChannel #------------------------------------------------------------------------------ %if %{build_docs} %package doc Summary: QtWebChannel%{qtmajor} APIs and tools docs Group: Documentation BuildArch: noarch # This one is required to build QCH-format documentation # for APIs and tools in this package set BuildRequires: qttools6-assistant Recommends: qttools6-assistant %description doc Documentation for APIs and tools in QtWebChannel6 package for use with Qt Assistant. %files doc %{_qt6_docdir}/qtwebchannel.qch %{_qt6_docdir}/qtwebchannel/ %endif #------------------------------------------------------------------------------ %package -n %{libqtwebchannel} Summary: Qt%{qtmajor} Component Library Group: System/Libraries %description -n %{libqtwebchannel} Qt%{qtmajor} Component Library. %files -n %{libqtwebchannel} %{_qt6_libdir}/libQt6WebChannel.so.%{qtmajor}* #------------------------------------------------------------------------------ %package -n %{libqtwebchannel_d} Summary: Devel files needed to build apps based on %name Group: Development/KDE and Qt Requires: %{libqtwebchannel} = %version Provides: libqtwebchannel6-devel = %version Provides: libqt6webchannel-devel = %version Provides: qtwebchannel6-devel = %version Provides: qt6webchannel-devel = %version Provides: libqtwebchannel-private-devel = %version Provides: libqtwebchannel6-private-devel = %version Provides: libqt6webchannel-private-devel = %version Provides: qtwebchannel-private-devel = %version Provides: qt6webchannel-private-devel = %version %description -n %{libqtwebchannel_d} Devel files needed to build apps based on %name. %files -n %{libqtwebchannel_d} %{_qt6_libdir}/libQt6WebChannel.so %{_qt6_libdir}/libQt6WebChannel.prl %{_qt6_libdir}/cmake/Qt6BuildInternals/StandaloneTests/QtWebChannelTestsConfig.cmake %{_qt6_libdir}/cmake/Qt6Qml %{_qt6_libdir}/metatypes/qt6webchannel_relwithdebinfo_metatypes.json %{_qt6_includedir}/QtWebChannel %{_qt6_archdatadir}/mkspecs/modules/qt_lib_webchannel.pri %{_qt6_libdir}/cmake/Qt6WebChannel %{_qt6_archdatadir}/mkspecs/modules/qt_lib_webchannel_private.pri %{_qt6_datadir}/modules/WebChannel.json #------------------------------------------------------------------------------ %prep %setup -q -n qtwebchannel-everywhere-src-%{qtversion} #autopatch -p1 %build %cmake_qt6 %cmake_build %if %{build_docs} pushd build ninja docs popd %endif %install %cmake_install # .la and .a files, die, die, die. find %{buildroot} -name '*.la' -delete find %{buildroot} -name '*.a' -delete