%global qt_module qmqtt %global qt_module_large Qt5Qmqtt Summary: Qt6 - unofficial MQTT component Name: qt6-%{qt_module} Version: 1.0.3 Release: 0%{?dist}.1sunshine License: BSD or EPL-1.0 URL: https://github.com/emqx/%{qt_module} Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{qt_module}-%{version}.tar.gz Patch0: %{qt_module}-1.0.0-examples.patch BuildRequires: gcc-c++ BuildRequires: make BuildRequires: qt6-qtbase-devel BuildRequires: qt6-qtwebsockets-devel BuildRequires: openssl-devel >= 1.0.2 %description qmqtt is an MQTT client module for Qt5. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %if 0%{?_qt6_examplesdir:1} %package examples Summary: Programming examples for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description examples %{summary}. %endif %prep %autosetup -p1 -n %{qt_module}-%{version} %build %{qmake_qt6} %make_build %install %make_install INSTALL_ROOT=%{buildroot} ## .prl/.la file love # nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs pushd %{buildroot}%{_qt6_libdir} for prl_file in libQt5*.prl ; do sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" ${prl_file} if [ -f "$(basename ${prl_file} .prl).so" ]; then rm -fv "$(basename ${prl_file} .prl).la" sed -i -e "/^QMAKE_PRL_LIBS/d" ${prl_file} fi done popd #%%check # make fails in src-tests # make -C build src-tests %ldconfig_scriptlets %files %license LICENSE edl-v10 epl-v10 %doc README.md %{_qt6_libdir}/lib%{qt_module_large}.so.1* %files devel %{_qt6_headerdir}/QtQmqtt/ %{_qt6_libdir}/lib%{qt_module_large}.so %{_qt6_libdir}/lib%{qt_module_large}.prl %dir %{_qt6_libdir}/cmake/%{qt_module_large}/ %{_qt6_libdir}/cmake/%{qt_module_large}/%{qt_module_large}Config*.cmake %{_qt6_libdir}/pkgconfig/%{qt_module_large}.pc %{_qt6_archdatadir}/mkspecs/modules/qt_lib_%{qt_module}*.pri %if 0%{?_qt6_examplesdir:1} %files examples %{_qt6_examplesdir}/ %endif %changelog * Mon Sep 29 2025 Moritz Barsnick 1.0.3-0.1sunshine - clone from Qt5 to Qt6 build * Wed Jun 07 2023 Moritz Barsnick 1.0.3-0.1sunshine - update to 1.0.3 * Tue Apr 25 2023 Moritz Barsnick 1.0.2-0.2sunshine - rebuild - re-add the patch to find the correct includes for the example * Tue Aug 30 2022 Moritz Barsnick 1.0.2-0.1sunshine - update to 1.0.2 * Mon Jun 21 2021 Moritz Barsnick 1.0.0-0.2sunshine - drop the patch, as building should work without it * Mon Jun 21 2021 Moritz Barsnick 1.0.0-0.1sunshine - initial RPM as Qt module - add a patch to find the correct includes for the example