summaryrefslogtreecommitdiff
path: root/paho-mqtt.spec
blob: ab8da3bc0744a20e5cd61465f9cbc5417b74e7d3 (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
54
55
56
57
58
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