diff options
author | CoprDistGit <infra@openeuler.org> | 2025-07-15 03:25:14 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2025-07-15 03:25:14 +0000 |
commit | 8b27fd24e6c1ed28e8268bc892cf53c47b2985b4 (patch) | |
tree | c4ab54f945ad6d60f34d0e7863d345ffa08d7a77 | |
parent | 55d5e8a6cd1dc369a1cbe65f07a94ab8f67bf346 (diff) |
automatic import of paho-mqttppopeneuler24.03_LTS_SP2
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | 0001-Fix-CMake-targets-install-path.patch | 20 | ||||
-rw-r--r-- | paho-mqttpp.spec | 53 | ||||
-rw-r--r-- | sources | 1 |
4 files changed, 75 insertions, 0 deletions
@@ -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 <matthias@extraklein.de> + +--- 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 <ros@openeuler.org> - version-release +- Package init @@ -0,0 +1 @@ +5a4b7c869e6f20cb85c438456d5b8d12 paho.mqtt.cpp_1.2.0.orig.tar.gz |