From 8b27fd24e6c1ed28e8268bc892cf53c47b2985b4 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Tue, 15 Jul 2025 03:25:14 +0000 Subject: automatic import of paho-mqttpp --- .gitignore | 1 + 0001-Fix-CMake-targets-install-path.patch | 20 ++++++++++++ paho-mqttpp.spec | 53 +++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 75 insertions(+) create mode 100644 0001-Fix-CMake-targets-install-path.patch create mode 100644 paho-mqttpp.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..bf554d3 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/paho.mqtt.cpp_1.2.0.orig.tar.gz diff --git a/0001-Fix-CMake-targets-install-path.patch b/0001-Fix-CMake-targets-install-path.patch new file mode 100644 index 0000000..21f06fe --- /dev/null +++ b/0001-Fix-CMake-targets-install-path.patch @@ -0,0 +1,20 @@ +Description: Fix CMake targets install path +Author: Matthias Klein + +--- paho.mqtt.cpp-1.2.0.orig/cmake/CMakeLists.txt ++++ paho.mqtt.cpp-1.2.0/cmake/CMakeLists.txt +@@ -11,7 +11,7 @@ export(EXPORT ${package_name} + FILE "${CMAKE_CURRENT_BINARY_DIR}/${package_name}Targets.cmake" + NAMESPACE ${package_name}::) + +-install(EXPORT ${package_name} DESTINATION lib/cmake/${package_name} ++install(EXPORT ${package_name} DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${package_name} + FILE ${package_name}Targets.cmake + NAMESPACE ${package_name}::) + +@@ -19,4 +19,4 @@ install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/${package_name}Config.cmake" + FindPahoMqttC.cmake + "${CMAKE_CURRENT_BINARY_DIR}/${package_name}ConfigVersion.cmake" +- DESTINATION lib/cmake/${package_name}) ++ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${package_name}) diff --git a/paho-mqttpp.spec b/paho-mqttpp.spec new file mode 100644 index 0000000..0246e00 --- /dev/null +++ b/paho-mqttpp.spec @@ -0,0 +1,53 @@ +Name: paho-mqttpp +Version: 1.2.0 +Release: 1%{?dist} +Summary: Eclipse Paho MQTT C++ Client + +License: EPL-2.0 +URL: https://github.com/eclipse/paho.mqtt.cpp/ +Source0: paho.mqtt.cpp_%{version}.orig.tar.gz + +Patch1: 0001-Fix-CMake-targets-install-path.patch + +BuildRequires: cmake +BuildRequires: openssl-devel +BuildRequires: gcc +BuildRequires: make +BuildRequires: paho-mqtt-devel >= 1.3.8 + +%description +This library enables C++11 applications to connect to an MQTT broker, publish messages to the broker, and to subscribe to topics and receive published messages. +This package contains the shared library. + +%package devel +Summary: Eclipse Paho MQTT C++ Client Library - development files +Requires: paho-mqttpp = %{version} + +%description devel +This library enables C++11 applications to connect to an MQTT broker, publish messages to the broker, and to subscribe to topics and receive published messages. +This package contains the development files. + +%prep +%autosetup -n paho.mqtt.cpp-%{version} -p1 + +%build +cmake %{_builddir}/paho.mqtt.cpp-%{version} -DCMAKE_INSTALL_PREFIX=/usr -DPAHO_WITH_SSL=TRUE -DPAHO_ENABLE_TESTING=FALSE \ +-DPAHO_BUILD_STATIC=TRUE -DPAHO_BUILD_EXAMPLES=FALSE -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/PahoMqttCpp/* + +%changelog +* Sat Nov 30 2024 openEuler ROS-sig - version-release +- Package init diff --git a/sources b/sources new file mode 100644 index 0000000..7e9e67f --- /dev/null +++ b/sources @@ -0,0 +1 @@ +5a4b7c869e6f20cb85c438456d5b8d12 paho.mqtt.cpp_1.2.0.orig.tar.gz -- cgit v1.2.3