8
0
forked from pool/cpp-httplib
Files
cpp-httplib/cpp-httplib.spec
Alexey Svistunov 8536137bbd - update to 0.18.0:
* httplib.h: support LibreSSL
  * Nice way to call "handle_file_request" from user code
  * How to diagnose the infamous read error 4
  * Made default server and client read/write timeout settings separately
  * Slow performance caused by get_remote_ip_and_port and get_local_ip_and_port
  * Provides a way to ignore host verify
  * add API support for verify certificate manually
- update to 0.17.3:
  * Accessing Directory
  * ‘constexpr’ error
  * Only match path params that span full path segment
  * Fix KeepAliveTest.SSLClientReconnectionPost problem
- update to 0.17.2:
  * Fix incorrect handling of Expect: 100-continue
  * Peformance improvement by removing tolower function call
- update to 0.17.1:
  * Header parser incorrectly accepts NUL and CR within header values
  * Fix problem with Abstract Namespace Unix Domain
  * Fix SIGINT problem in Docker image
- update to 0.17.0:
  * Changed CPPHTTPLIB_KEEPALIVE_MAX_COUNT to 100
  * Add Dockerfile for static file server
  * Breaking Change!: get_header_ methods on Request and Response now take…
  * Add sleep in handle_EINTR
  * Added set_ipv6_v6only method
  * impossible to shut down the server safely
  * Performance: reserve body to avoid frequent reallocations and copies
- update to 0.16.3:
  * Fixed set_connection_timeout() unexpected results

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cpp-httplib?expand=0&rev=21
2024-09-27 12:29:03 +00:00

111 lines
3.3 KiB
RPMSpec

#
# spec file for package cpp-httplib
#
# Copyright (c) 2024 SUSE LLC
#
# 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define sover 0.18
%define libver 0_18
Name: cpp-httplib
Version: 0.18.0
Release: 0
Summary: A C++11 HTTP/HTTPS server and client library
License: MIT
URL: https://github.com/yhirose/cpp-httplib
Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: %{name}.pc
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig(gtest)
BuildRequires: pkgconfig(libbrotlicommon)
BuildRequires: pkgconfig(libbrotlidec)
BuildRequires: pkgconfig(libbrotlienc)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(openssl) >= 3.0.0
BuildRequires: pkgconfig(zlib)
%package -n lib%{name}%{libver}
Summary: A C++11 HTTP/HTTPS library
%package devel
Summary: A C++11 HTTP/HTTPS library
Requires: lib%{name}%{libver} = %{version}
Conflicts: cpp-httplib-headers-devel
%description
This is a multi-threaded HTTP library with blocking I/O. There is no
support for non-blocking mode.
%description -n lib%{name}%{libver}
This is a multi-threaded HTTP library with blocking I/O. There is no
support for non-blocking mode.
%description devel
This is a multi-threaded HTTP library with blocking I/O. There is no
support for non-blocking mode.
It features built-in mappings, static file server, pre-routing and
post-routing handlers, and support for binding sockets to multiple
interfaces and any available port.
%prep
%autosetup
chmod -x example/uploader.sh
# fix dynamically the version in the pkgconfig file
sed -i 's|Version: 0.0.0|Version: %{version}|g' %{SOURCE1}
%build
%cmake \
-DBUILD_SHARED_LIBS=ON \
-DHTTPLIB_REQUIRE_OPENSSL=ON \
-DHTTPLIB_REQUIRE_ZLIB=ON \
-DHTTPLIB_REQUIRE_BROTLI=ON \
-DHTTPLIB_COMPILE=ON \
-DHTTPLIB_TEST=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo
%cmake_build
%install
%cmake_install
install -Dm0644 %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
#remove files
rm -r %{buildroot}%{_datadir}/licenses/httplib
rm %{buildroot}%{_datadir}/doc/packages/cpp-httplib/README.md
%check
# OBS and chroot build environments does not provide internet
# connectivity, skip online tests to avoid failures
%ctest --parallel 1 --exclude-regex '(_Online$|SSLClientServerTest|MultipartFormDataTest)'
%ctest --parallel 1 --tests-regex SSLClientServerTest || :
%ldconfig_scriptlets -n lib%{name}%{libver}
%files -n lib%{name}%{libver}
%license LICENSE
%doc README.md
%{_libdir}/lib%{name}.so.%{sover}
%{_libdir}/lib%{name}.so.%{version}
%files devel
%doc README.md example
%{_libdir}/lib%{name}.so
%{_includedir}/httplib.h
%{_libdir}/cmake/httplib
%{_libdir}/pkgconfig/%{name}.pc
%changelog