From 455e15d2d59d742534e5a8594b8d6f7f501927b9181c6ca60c11f6832b1559a8 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 2 Jan 2023 11:27:03 +0000 Subject: [PATCH] Accepting request 1045357 from home:svalx A C++11 cross platform HTTP/HTTPS library Features: - Built-in mappings - Static file server - Post routing handler - Pre routing handler - Receive content with a content receiver - Bind a socket to multiple interfaces and any available port NOTE: This is a multi-threaded 'blocking' HTTP library. If you are looking for a 'non-blocking' library, this is not the one that you want. OBS-URL: https://build.opensuse.org/request/show/1045357 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cpp-httplib?expand=0&rev=1 --- .gitattributes | 23 +++++++++++ .gitignore | 1 + _service | 11 +++++ cpp-httplib-0.11.3.obscpio | 3 ++ cpp-httplib.changes | 25 +++++++++++ cpp-httplib.spec | 85 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 148 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _service create mode 100644 cpp-httplib-0.11.3.obscpio create mode 100644 cpp-httplib.changes create mode 100644 cpp-httplib.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_service b/_service new file mode 100644 index 0000000..39115b2 --- /dev/null +++ b/_service @@ -0,0 +1,11 @@ + + + https://github.com/yhirose/cpp-httplib.git + git + @PARENT_TAG@ + v(\d.*) + \1 + enable + + + diff --git a/cpp-httplib-0.11.3.obscpio b/cpp-httplib-0.11.3.obscpio new file mode 100644 index 0000000..6dccf86 --- /dev/null +++ b/cpp-httplib-0.11.3.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d335fca5240f0f6d0d77551d15f5a0f0e0aaddd6359db7ce3b914a1fe8e515d7 +size 6657037 diff --git a/cpp-httplib.changes b/cpp-httplib.changes new file mode 100644 index 0000000..cc95ddf --- /dev/null +++ b/cpp-httplib.changes @@ -0,0 +1,25 @@ +------------------------------------------------------------------- +Mon Dec 26 10:41:44 UTC 2022 - Alexey Svistunov + +- Move README.md to devel subpackage + +------------------------------------------------------------------- +Mon Dec 26 09:13:54 UTC 2022 - svalx@svalx.net + +- Update to version 0.11.3: + * Add EINTR and EAGAIN judge for accept (#1438) + * Updated unit test + * std::condition_variable::notify_one/all() should be called after unlocking mutex (#1448) + * Support LOCAL_ADDR and LOCAL_PORT header in client Request (#1450) + * Fix #1442 + * Removed code for upsupported OpenSSL + * Release v0.11.3 + * Fix #1426 + * Fix #1437 + * Windows CMake directory install fix (#1434) + +------------------------------------------------------------------- +Fri Dec 23 08:53:05 UTC 2022 - Alexey Svistunov + +- Initial release + diff --git a/cpp-httplib.spec b/cpp-httplib.spec new file mode 100644 index 0000000..b2b0be6 --- /dev/null +++ b/cpp-httplib.spec @@ -0,0 +1,85 @@ +# +# spec file for package cpp-httplib +# +# Copyright (c) 2022 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.11 +%define libver 0_11 +Name: cpp-httplib +Version: 0.11.3 +Release: 0 +Summary: A C++11 cross platform HTTP/HTTPS library +License: MIT +URL: https://github.com/yhirose/cpp-httplib +Source: _service +BuildRequires: cmake +BuildRequires: gcc-c++ >= 11 +BuildRequires: meson >= 0.47.0 +BuildRequires: pkgconfig(libbrotlienc) +BuildRequires: pkgconfig(libbrotlidec) +BuildRequires: pkgconfig(openssl) >= 1.1.1 + +%package -n lib%{name}%{libver} +Summary: A C++11 cross platform HTTP/HTTPS library + +%package devel +Summary: A C++11 cross platform HTTP/HTTPS library +Requires: lib%{name}%{libver} = %{version} +Conflicts: cpp-httplib-headers-devel + +%description +Features: - Built-in mappings - Static file server + - Post routing handler - Pre routing handler + - Receive content with a content receiver + - Bind a socket to multiple interfaces and any available port + +%description -n lib%{name}%{libver} +Features: - Built-in mappings - Static file server + - Post routing handler - Pre routing handler + - Receive content with a content receiver + - Bind a socket to multiple interfaces and any available port + +%description devel +NOTE: This is a multi-threaded 'blocking' HTTP library. +If you are looking for a 'non-blocking' library, this is not the one that you want. +Development files - c++ headers, pkg-config file, docs. + +%prep +%setup -q -n %_sourcedir/%name-%version -T -D + +%build +LDFLAGS="-s" +%meson -Dcpp-httplib_compile=true +%meson_build + +%install +%meson_install + +%post -n lib%{name}%{libver} -p /sbin/ldconfig +%postun -n lib%{name}%{libver} -p /sbin/ldconfig + +%files -n lib%{name}%{libver} +%{_libdir}/lib%{name}.so.%{sover} +%{_libdir}/lib%{name}.so.%{version} + +%files devel +%{_libdir}/lib%{name}.so +%{_includedir}/httplib.h +%{_libdir}/pkgconfig/%{name}.pc +%doc README.md +%license LICENSE + +%changelog +