Summary: MQTT client library for Qt Name: qmqtt Version: 1.0.5 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 no # Epel 8 yes no # Epel 9 yes yes # Rhel 8 yes no # Rhel 9 yes no # Centos-stream 8 yes no # Centos-stream 9 yes no # Centos-stream 10 no yes # Fedora 42+ yes yes # # i.e. # - Centos behaves like Rhel # - Epel is different %if 0%{?force_qt5} || (0%{?rhel} && 0%{?rhel} < 10) || (0%{?centos} && 0%{?centos} < 10) || (0%{?rhel} && 0%{?rhel} < 9) || (0%{?fedora} && 0%{?fedora} < 40) %global qt_ver 5 %else %global qt_ver 6 %endif BuildRequires: cmake3 >= 3.9 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 %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 * Fri May 15 2026 Moritz Barsnick 1.0.5-0.1sunshine - update to 1.0.5 - 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