summaryrefslogtreecommitdiff
path: root/paho-mqttpp.spec
blob: 0246e003244222661bc478623257959690578540 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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