dist: add rpm packaging

Signed-off-by: Julien Courtat <julien.courtat@aqsacom.com>
This commit is contained in:
Julien Courtat 2017-10-11 14:45:15 +02:00
parent 632d52fe1a
commit 3cfbf78978
2 changed files with 75 additions and 0 deletions

11
dist/Makefile vendored Normal file
View File

@ -0,0 +1,11 @@
VERSION=1.0.0
check:
rpmlint -i dist/paho-cpp.spec
rpm-prep:
mkdir -p ${HOME}/rpmbuild/SOURCES/
tar --transform="s/\./paho-cpp-${VERSION}/" -cf ${HOME}/rpmbuild/SOURCES/v${VERSION}.tar.gz --exclude=./build.paho.cpp --exclude=.git --exclude=*.bz ./ --gzip
rpm: rpm-prep
rpmbuild -ba dist/paho-cpp.spec

64
dist/paho-cpp.spec vendored Normal file
View File

@ -0,0 +1,64 @@
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
URL: https://eclipse.org/paho/clients/cpp/
BuildRequires: cmake3
BuildRequires: gcc
BuildRequires: graphviz
BuildRequires: doxygen
BuildRequires: openssl-devel
BuildRequires: paho-c-devel
Requires: openssl
Requires: paho-c
%description
The Paho MQTT CPP Client 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
%description devel
Development files and samples for the the Paho MQTT CPP Client.
%package devel-docs
Summary: MQTT CPP Client development kit documentation
Group: Development/Libraries
%description devel-docs
Development documentation files for the the Paho MQTT CPP Client.
%prep
%autosetup -n paho-cpp-%{version}
%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}
%install
cd build.paho.cpp
make install DESTDIR=%{buildroot}
%files
%doc edl-v10 epl-v10
%{_libdir}/*
%files devel
%{_bindir}/*
%{_includedir}/*
%files devel-docs
%{_datadir}/*
%changelog
* Wed Oct 11 2017 Julien Courtat <julien.courtat@aqsacom.com> - 1.0.0
- Initial packaging