%global owner LiamBindle %global project MQTT-C Name: mqtt-c Version: 1.1.6 Release: 1%{?dist} Summary: MQTT client C library License: MIT URL: https://liambindle.ca/MQTT-C/ Source0: https://github.com/%{owner}/%{project}/archive/refs/tags/v%{version}/%{project}-%{version}.tar.gz #Patch0: MQTT-C-cmake_install.patch BuildRequires: cmake BuildRequires: gcc BuildRequires: openssl-devel %description MQTT-C is an MQTT v3.1.1 client written in C. MQTT is a lightweight publisher-subscriber-based messaging protocol that is commonly used in IoT and networking applications where high-latency and low data-rate links are expected. The purpose of MQTT-C is to provide a portable MQTT client, written in C, for embedded systems and PC's alike. MQTT-C does this by providing a transparent Platform Abstraction Layer (PAL) which makes porting to new platforms easy. MQTT-C is completely thread-safe but can also run perfectly fine on single-threaded systems making MQTT-C well-suited for embedded systems and microcontrollers. Finally, MQTT-C is small; there are only two source files totalling less than 2000 lines. %package devel Summary: Development files for %{project} %description devel %{summary}. %prep %autosetup -p1 -n %{project}-%{version} %build export CFLAGS="%{optflags}" %cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ -DMQTT_C_INSTALL_EXAMPLES=ON \ -DMQTT_C_OpenSSL_SUPPORT=ON %cmake_build %install %cmake_install %files %license LICENSE %doc README.md %{_bindir}/* %files devel %license LICENSE %doc README.md %{_libdir}/* %{_includedir}/* %changelog * Wed Feb 01 2023 Richard Shaw - 1.1.6-1 - Update to 1.1.6. * Sun May 08 2022 Richard Shaw - 1.1.5-1 - Initial packaging.