2015-05-28 08:58:17 +00:00
|
|
|
#
|
|
|
|
# spec file for package cpprest
|
|
|
|
#
|
2023-12-07 07:44:00 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2015-05-28 08:58:17 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-01-12 06:12:20 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2015-05-28 08:58:17 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2015-06-12 09:57:03 +00:00
|
|
|
%define major 2
|
2017-11-13 09:43:30 +00:00
|
|
|
%define minor 10
|
2015-05-28 08:58:17 +00:00
|
|
|
Name: cpprest
|
2023-12-07 07:44:00 +00:00
|
|
|
Version: 2.10.19
|
2015-05-28 08:58:17 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: C++ REST library
|
2017-02-02 09:11:39 +00:00
|
|
|
# main: MIT (license.txt)
|
|
|
|
# Websocket++: BSD-3-Clause (ThirdPartyNotices.txt)
|
|
|
|
# base64/base64.hpp: Zlib (ThirdPartyNotices.txt)
|
|
|
|
# sha1/sha1.hpp: BSD-3-Clause (ThirdPartyNotices.txt)
|
|
|
|
# common/md5.hpp: Zlib (ThirdPartyNotices.txt)
|
|
|
|
# utf8_validation.hpp: MIT (ThirdPartyNotices.txt)
|
2023-12-07 07:44:00 +00:00
|
|
|
License: BSD-3-Clause AND MIT AND Zlib
|
2018-06-17 11:09:53 +00:00
|
|
|
URL: https://github.com/Microsoft/cpprestsdk
|
2023-12-07 07:44:00 +00:00
|
|
|
Source: https://github.com/Microsoft/cpprestsdk/archive/v%{version}/cpprestsdk-%{version}.tar.gz
|
2021-01-17 22:43:57 +00:00
|
|
|
# PATCH-FIX-UPSTREAM -- https://github.com/Microsoft/cpprestsdk/issues/576
|
2020-05-20 09:47:29 +00:00
|
|
|
Patch1: cpprest-2.10.9-disable-test-extract_floating_point.patch
|
2021-01-17 22:43:57 +00:00
|
|
|
# PATCH-FIX-UPSTREAM -- https://github.com/microsoft/cpprestsdk/pull/1557
|
2021-01-04 13:08:51 +00:00
|
|
|
Patch2: base64.patch
|
2021-01-17 22:43:57 +00:00
|
|
|
# PATCH-FIX-UPSTREAM -- https://github.com/microsoft/cpprestsdk/pull/1558
|
2021-01-04 13:08:51 +00:00
|
|
|
Patch3: filestream.patch
|
2017-11-13 09:43:30 +00:00
|
|
|
BuildRequires: cmake >= 3.0
|
2017-08-30 08:53:05 +00:00
|
|
|
BuildRequires: gcc-c++
|
2017-11-16 18:29:06 +00:00
|
|
|
BuildRequires: libboost_atomic-devel
|
2017-02-02 12:05:31 +00:00
|
|
|
BuildRequires: libboost_filesystem-devel
|
|
|
|
BuildRequires: libboost_random-devel
|
|
|
|
BuildRequires: libboost_regex-devel
|
|
|
|
BuildRequires: libboost_system-devel
|
|
|
|
BuildRequires: libboost_thread-devel
|
2021-02-07 20:40:26 +00:00
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: pkgconfig(libssl) >= 1.0
|
|
|
|
BuildRequires: pkgconfig(websocketpp) >= 0.8
|
|
|
|
BuildRequires: pkgconfig(zlib)
|
2015-05-28 08:58:17 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
The C++ REST SDK is a Microsoft project for cloud-based client-server
|
|
|
|
communication in native code using a modern asynchronous C++ API design. This
|
|
|
|
project aims to help C++ developers connect to and interact with services.
|
|
|
|
|
|
|
|
Also known as Casablanca.
|
|
|
|
|
2015-06-12 09:57:03 +00:00
|
|
|
%package -n libcpprest%{major}_%{minor}
|
2015-05-28 08:58:17 +00:00
|
|
|
Summary: C++ Rest library
|
|
|
|
|
2015-06-12 09:57:03 +00:00
|
|
|
%description -n libcpprest%{major}_%{minor}
|
2015-05-28 08:58:17 +00:00
|
|
|
The C++ REST SDK is a Microsoft project for cloud-based client-server
|
|
|
|
communication in native code using a modern asynchronous C++ API design. This
|
|
|
|
project aims to help C++ developers connect to and interact with services.
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files for %{name}
|
2015-06-12 09:57:03 +00:00
|
|
|
Requires: libcpprest%{major}_%{minor} = %{version}
|
2015-05-28 08:58:17 +00:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
The C++ REST SDK is a Microsoft project for cloud-based client-server
|
|
|
|
communication in native code using a modern asynchronous C++ API design. This
|
|
|
|
project aims to help C++ developers connect to and interact with services.
|
|
|
|
|
|
|
|
Development files.
|
|
|
|
|
|
|
|
%prep
|
2024-02-26 11:21:53 +00:00
|
|
|
%autosetup -p1 -n cpprestsdk-%{version}
|
2015-05-28 08:58:17 +00:00
|
|
|
|
|
|
|
%build
|
2015-06-28 14:32:09 +00:00
|
|
|
%cmake \
|
2020-05-08 18:37:33 +00:00
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DWERROR=OFF
|
|
|
|
%cmake_build
|
2015-05-28 08:58:17 +00:00
|
|
|
|
|
|
|
%install
|
2020-05-08 18:37:33 +00:00
|
|
|
%cmake_install
|
2015-05-28 08:58:17 +00:00
|
|
|
|
2017-12-25 11:48:46 +00:00
|
|
|
# create a pkgconfig file
|
|
|
|
install -d %{buildroot}%{_libdir}/pkgconfig
|
|
|
|
cat << EOF > %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
|
|
|
|
prefix=%{_prefix}
|
|
|
|
exec_prefix=%{_prefix}
|
|
|
|
libdir=%{_libdir}
|
|
|
|
includedir=%{_includedir}
|
|
|
|
|
2023-12-07 07:44:00 +00:00
|
|
|
Name: %{name}
|
2017-12-25 11:48:46 +00:00
|
|
|
Description: cloud-based client-server communication
|
2023-12-07 07:44:00 +00:00
|
|
|
URL: %{url}
|
|
|
|
Version: %{version}
|
2017-12-25 11:48:46 +00:00
|
|
|
Libs: -L%{_libdir} -lcpprest
|
|
|
|
Cflags: -I%{_includedir}/cpprest -I%{_includedir}/pplx
|
|
|
|
EOF
|
|
|
|
|
2020-05-08 18:37:33 +00:00
|
|
|
%check
|
2021-02-07 20:40:26 +00:00
|
|
|
# Tweak library path so that libccprest + libunittestpp are found
|
|
|
|
export LD_LIBRARY_PATH="$PWD/build/Release/Binaries"
|
2020-05-08 18:37:33 +00:00
|
|
|
# websocketsclient_test -> authentication_tests - online tests
|
|
|
|
# httpclient_test -> follows_retrieval_redirect - online test
|
2021-02-07 20:40:26 +00:00
|
|
|
%ctest --exclude-regex '(httpclient_test|websocketsclient_test)'
|
2020-05-08 18:37:33 +00:00
|
|
|
|
2015-06-12 09:57:03 +00:00
|
|
|
%post -n libcpprest%{major}_%{minor} -p /sbin/ldconfig
|
|
|
|
%postun -n libcpprest%{major}_%{minor} -p /sbin/ldconfig
|
2015-05-28 08:58:17 +00:00
|
|
|
|
2015-06-12 09:57:03 +00:00
|
|
|
%files -n libcpprest%{major}_%{minor}
|
2018-06-17 11:09:53 +00:00
|
|
|
%license license.txt ThirdPartyNotices.txt
|
|
|
|
%doc CONTRIBUTORS.txt ThirdPartyNotices.txt
|
2015-06-12 09:57:03 +00:00
|
|
|
%{_libdir}/libcpprest.so.%{major}.%{minor}
|
2015-05-28 08:58:17 +00:00
|
|
|
|
|
|
|
%files devel
|
2018-06-17 11:09:53 +00:00
|
|
|
%license license.txt ThirdPartyNotices.txt
|
|
|
|
%doc CONTRIBUTORS.txt
|
2015-05-28 08:58:17 +00:00
|
|
|
%{_includedir}/%{name}
|
|
|
|
%{_includedir}/pplx
|
|
|
|
%{_libdir}/libcpprest.so
|
2020-05-08 18:37:33 +00:00
|
|
|
%{_libdir}/cmake/*
|
2017-12-25 11:48:46 +00:00
|
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
2015-05-28 08:58:17 +00:00
|
|
|
|
|
|
|
%changelog
|