Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec file updated for recent versions #348

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 41 additions & 24 deletions dist/paho-cpp.spec
Original file line number Diff line number Diff line change
@@ -1,64 +1,81 @@
Summary: MQTT CPP Client
Name: paho-cpp
Version: 1.0.0
Release: 0%{?dist}
License: Eclipse Distribution License 1.0 and Eclipse Public License 1.0
Group: Development/Tools
Source: https://github.com/eclipse/paho.mqtt.cpp/archive/v%{version}.tar.gz
Version: 1.2.0
Release: 1%{?dist}
License: BSD and EPL-1.0
Source: https://github.com/eclipse/paho.mqtt.cpp/archive/v%{version}/%{name}-%{version}.tar.gz
URL: https://eclipse.org/paho/clients/cpp/
BuildRequires: cmake3
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: graphviz
BuildRequires: doxygen
BuildRequires: openssl-devel
BuildRequires: paho-c-devel
Requires: openssl
Requires: paho-c
Requires: paho-c >= 1.3.8


%description
The Paho MQTT CPP Client is a fully fledged MQTT client written in ANSI standard C++ 11.
Paho MQTT CPP is a fully fledged MQTT client written in ANSI standard C++ 11.


%package devel
Summary: MQTT CPP Client development kit
Group: Development/Libraries
Requires: paho-cpp
Requires: %{name}%{?_isa} = %{version}-%{release}

%description devel
Development files and samples for the the Paho MQTT CPP Client.
Development files for the the Paho MQTT CPP Client.


%package devel-docs
Summary: MQTT CPP Client development kit documentation
Group: Development/Libraries
BuildArch: noarch

%description devel-docs
Development documentation files for the the Paho MQTT CPP Client.
Development documentation and code samples for the the Paho MQTT CPP Client.


%prep
%autosetup -n paho-cpp-%{version}
%autosetup -n paho.mqtt.cpp-%{version}
sed -i'' 's|lib/cmake|%{_lib}/cmake|' cmake/CMakeLists.txt

%build
mkdir build.paho.cpp && cd build.paho.cpp
%cmake3 -DPAHO_WITH_SSL=TRUE -DPAHO_BUILD_DOCUMENTATION=TRUE -DPAHO_BUILD_SAMPLES=TRUE ..
make %{?_smp_mflags}
%cmake -DPAHO_WITH_SSL=TRUE -DPAHO_BUILD_DOCUMENTATION=TRUE
%cmake_build

%install
cd build.paho.cpp
make install DESTDIR=%{buildroot}
%cmake_install

mkdir -p %{buildroot}%{_docdir}/%{name}/samples/
# put the samples into the documentation directory
cp -a src/samples/*.cpp %{buildroot}%{_docdir}/%{name}/samples/
# Put paho html docs in a paho subdirectory
mv %{buildroot}%{_docdir}/html %{buildroot}%{_docdir}/%{name}/html

%files
%doc edl-v10 epl-v10
%{_libdir}/*
%license edl-v10 epl-v10
%{_libdir}/libpaho-mqttpp3.so.1*

%files devel
%{_bindir}/*
%{_includedir}/*
%license edl-v10 epl-v10
%{_includedir}/mqtt
%{_libdir}/libpaho-mqttpp3.so
%{_libdir}/cmake/PahoMqttCpp

%files devel-docs
%{_datadir}/*
%license edl-v10 epl-v10
%doc CHANGELOG.md CONTRIBUTING.md README.md
%doc %{_docdir}/%{name}

%changelog
* Thu Jun 03 2021 Joshua Clayton <[email protected]> - 1.2.0
- Update for version 1.2.0
- Fix many details for inclusion in fedora

* Tue Dec 08 2020 Joshua Clayton <[email protected]> - 1.1
- Update and patch for 1.1
- Put the html documenation into an appropriate paho-cpp directory
- instead of compiling the samples, put the cpp files in with documentation

* Wed Oct 11 2017 Julien Courtat <[email protected]> - 1.0.0
- Initial packaging