%global qt_module qmqtt %global qt_module_large Qt5Qmqtt Summary: Qt5 - unofficial MQTT component Name: qt5-%{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 # Qt 5.3 is minimum, 5.7 supports websockets BuildRequires: qt5-qtbase-devel >= 5.7 BuildRequires: qt5-qtwebsockets-devel >= 5.7 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%{?_qt5_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_qt5} %make_build %install %make_install INSTALL_ROOT=%{buildroot} ## .prl/.la file love # nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs pushd %{buildroot}%{_qt5_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 %{_qt5_libdir}/lib%{qt_module_large}.so.1* %files devel %{_qt5_headerdir}/QtQmqtt/ %{_qt5_libdir}/lib%{qt_module_large}.so %{_qt5_libdir}/lib%{qt_module_large}.prl %dir %{_qt5_libdir}/cmake/%{qt_module_large}/ %{_qt5_libdir}/cmake/%{qt_module_large}/%{qt_module_large}Config*.cmake %{_qt5_libdir}/pkgconfig/%{qt_module_large}.pc %{_qt5_archdatadir}/mkspecs/modules/qt_lib_%{qt_module}*.pri %if 0%{?_qt5_examplesdir:1} %files examples %{_qt5_examplesdir}/ %endif %changelog * 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