summaryrefslogtreecommitdiff
path: root/paho-mqtt.spec
diff options
context:
space:
mode:
Diffstat (limited to 'paho-mqtt.spec')
-rw-r--r--paho-mqtt.spec59
1 files changed, 59 insertions, 0 deletions
diff --git a/paho-mqtt.spec b/paho-mqtt.spec
new file mode 100644
index 0000000..ab8da3b
--- /dev/null
+++ b/paho-mqtt.spec
@@ -0,0 +1,59 @@
+Name: paho-mqtt
+Version: 1.3.9
+Release: 1%{?dist}
+Summary: Eclipse Paho MQTT C client
+
+License: EPL-2.0
+URL: https://github.com/eclipse/paho.mqtt.c
+Source0: paho.mqtt.c_%{version}.orig.tar.gz
+
+BuildRequires: cmake >= 2.8.12
+BuildRequires: openssl-devel
+BuildRequires: gcc
+BuildRequires: make
+
+%description
+The Eclipse Paho C client libraries enable applications to connect to an MQTT broker to publish messages and subscribe to topics to receive published messages.
+
+%package devel
+Summary: Eclipse Paho MQTT C client - development files
+Requires: paho-mqtt = %{version}
+
+%description devel
+The Eclipse Paho C client libraries enable applications to connect to an MQTT broker to publish messages and subscribe to topics to receive published messages.
+
+%package c-examples
+Summary: Eclipse Paho MQTT C client - example files
+Requires: paho-mqtt = %{version}
+
+%description c-examples
+This package contains example files and demonstration programs for the Eclipse Paho MQTT C client.
+It allows applications to connect to an MQTT broker and showcase basic functionality like publishing and subscribing to topics.
+
+%prep
+%autosetup -n paho.mqtt.c-%{version}
+
+%build
+cmake %{_builddir}/paho.mqtt.c-%{version} -DCMAKE_INSTALL_PREFIX=/usr -DPAHO_WITH_SSL=TRUE -DPAHO_ENABLE_TESTING=FALSE \
+-DPAHO_BUILD_STATIC=TRUE -DPAHO_BUILD_SAMPLES=TRUE -DCMAKE_C_FLAGS="-g" -DCMAKE_CXX_FLAGS="-g"
+%make_build
+
+%install
+%make_install
+rm -rf %{buildroot}/usr/share/doc/Eclipse\ Paho\ C/*
+
+%files
+%{_libdir}/lib*.so.*
+
+%files devel
+%{_includedir}/*
+%{_libdir}/lib*.so
+%{_libdir}/lib*.a
+%{_libdir}/cmake/eclipse-paho-mqtt-c/*
+
+%files c-examples
+%{_bindir}/*
+
+%changelog
+* Sat Nov 30 2024 openEuler ROS-sig <ros@openeuler.org> - version-release
+- Package init