8
0
forked from pool/cpp-httplib
Files
cpp-httplib/cpp-httplib.spec
Alexey Svistunov ac75ac1979 - version update to 0.20.1
0.20.1 (CVE-2025-46728 [bsc#1242777])
  * Add AF_UNIX support on windows #2115
  * Support zstd also via pkg-config #2121
  * Fix #2113
  * Fix "Unbounded Memory Allocation in Chunked/No-Length Requests"
  0.20.0
  * server_certificate_verifier extended to reuse built-in verifier #2064
  * Assertion failed when destroying httplib::Client
  * #2068
  * Spaces incorrectly allowed in header field names #2096
  * build(meson): copy MountTest.MultibytesPathName files #2098
  * Remove SSLInit #2102
  * Add zstd support #2088
  * Question the behavior of method read_content_without_length #2109
  * Crash when calling std::exit while server running or client requests in flight #2097
  0.19.0
  * Global timeout feature (same as "--max-time" curl option) #2034
  * Fix check for URI length to prevent incorrect HTTP 414 errors
  0.18.7
  * Potential memory corruption in stream_line_reader #2028
- deleted patches
  - cpp-httplib-test-issue2004-online.patch (upstreamed)

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cpp-httplib?expand=0&rev=30
2025-05-12 11:21:29 +00:00

104 lines
3.0 KiB
RPMSpec

#
# spec file for package cpp-httplib
#
# Copyright (c) 2025 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.20
%define libver 0_20
Name: cpp-httplib
Version: 0.20.1
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(libbrotlidec)
BuildRequires: pkgconfig(libbrotlienc)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(openssl) >= 3.0.0
%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}
%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 -p1
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
%cmake_build
%install
%cmake_install
install -Dm0644 %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/%{name}.pc
#remove files
rm -r %{buildroot}%{_datadir}/{licenses/httplib,doc/packages/cpp-httplib}
%check
# OBS and chroot build environments does not provide internet
# connectivity, skip online tests to avoid failures
%ctest --parallel 1 --exclude-regex '(_Online$)'
%ldconfig_scriptlets -n lib%{name}%{libver}
%files -n lib%{name}%{libver}
%license LICENSE
%{_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