Summary: MQTT client library for Qt Name: qmqtt Version: 1.0.8 Release: 0%{?dist}.1sunshine License: BSD or EPL-1.0 URL: https://github.com/emqx/%{name} Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Patch0: 0001-Fix-Qt6-find_package-for-WebSockets.patch Patch1: 0001-Bump-required-CMake-version.patch # Force use of Qt5 = 1 (testing only) %global force_qt5 0 # determine Qt version to use # dist Qt5? Qt6? # Epel 7 yes 5.9.7 no # Epel 8 yes 5.15.3 no # Epel 9 yes 5.15.9 yes 6.6.2 # Epel 10 yes ?????? yes 6.10.1 # Rhel 8 yes 5.15.3 no # Rhel 9 yes 5.15.9 no # Rhel 10 yes ?????? yes 6.10.1 # Centos-stream 8 yes 5.15.3 no # Centos-stream 9 yes 5.15.9 no # Centos-stream 10 no yes 6.10.1 # Fedora 42 yes 5.15.18 yes 6.10.2 # Fedora 43 yes 5.15.18 yes 6.10.3 # Fedora 44 yes 5.15.18 yes 6.11.1 # Fedora 45 yes 5.15.18 yes 6.11.2 # Fedora RawHide yes 5.15.18 yes 6.12.0 (2026-11) # # i.e. # - Centos behaves like RHEL (perhaps also for RHEL 10, as yet unknown) # - EPEL is different to RHEL %if (0%{?force_qt5} == 0) && ((0%{?epel} && 0%{?epel} >= 9) || (0%{?centos} && 0%{?centos} >= 10) || (0%{?rhel} && 0%{?rhel} >= 10) || (0%{?fedora} && 0%{?fedora} >= 40)) %global qt_ver 6 %else %global qt_ver 5 %endif BuildRequires: cmake%{?rhel:3} >= 3.10 BuildRequires: gcc-c++ BuildRequires: make %if 0%qt_ver == 5 # Qt 5.3 is minimum, 5.7 supports websockets BuildRequires: qt5-qtbase-devel >= 5.7 BuildRequires: qt5-qtwebsockets-devel >= 5.7 %else BuildRequires: qt6-qtbase-devel >= 6.2.4 BuildRequires: qt6-qtwebsockets-devel >= 6.2.4 %endif BuildRequires: openssl-devel >= 1.0.2 %description qmqtt is an MQTT client library 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}. %prep %autosetup -p1 %build %if 0%{?rhel} && 0%{?rhel} < 8 %global cmake %cmake3 %global cmake_build %cmake3_build %global cmake_install %cmake3_install %global ctest %ctest3 %endif %cmake -Dqmqtt_WEBSOCKETS=ON %cmake_build %install %cmake_install #%%check # make fails in src-tests # make -C build src-tests %ldconfig_scriptlets %files %license LICENSE edl-v10 epl-v10 %doc README.md %{_libdir}/lib%{name}.so.* %files devel %{_includedir}/*.h %{_libdir}/lib%{name}.so %{_libdir}/cmake/%{name}/ %changelog * Tue Nov 24 2026 Moritz Barsnick 1.0.8-0.1sunshine - update to 1.0.8 - rebase the CMake version patch * Fri May 15 2026 Moritz Barsnick 1.0.5-0.1sunshine - update to 1.0.5 - fix declaration of cmake3 - add a patch for Qt findpackage() - add a patch for deprecation of old CMake compatibility * Wed Jun 07 2023 Moritz Barsnick 1.0.3-0.1sunshine - update to 1.0.3 * 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 - remove references to qmake and git commit based versioning - add relevant license files * Fri Mar 26 2021 Moritz Barsnick 1.0.0-0.1sunshine - update to 1.0.0 - build with cmake instead of qmake - properly force websocket support * Sat Mar 20 2021 Moritz Barsnick 0.3.1-0.20200919.git1fc3e1c.1sunshine - fix library version to 0.3.1 (never tagged, but found in source) - add BR: make - add BR: openssl-devel - add a patch to actually build websocket support - build with qmake instead of cmake, as the latter didn't manage to pick up websocket support - for some reason, this changed the sonames * Sun Oct 04 2020 Moritz Barsnick 0.1-0.20200919.git1fc3e1c.1sunshine - update to new snapshot - replace BR: cmake with cmake3, which should fix EPEL7 * Mon Sep 14 2020 Moritz Barsnick 0.1-0.20200714.git4ba2ed4.2sunshine - fix BR typo * Fri Sep 4 2020 Moritz Barsnick 0.1-0.20200714.git4ba2ed4.1sunshine - initial RPM