From 0bd43622be68e46f266d4a7ed6aa13eab73a758fa92ab3076a9eee0dc784447a Mon Sep 17 00:00:00 2001 From: Alexey Svistunov Date: Tue, 7 Feb 2023 15:29:28 +0000 Subject: [PATCH 1/5] - For an explicit choice when buildtime dependencies resolving added an unique pkgconfig files aliases for both shipped library flavors: cpp-httplib-headers.pc and cpp-httplib-shared.pc - Enable tests performing for compiled flavor OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cpp-httplib?expand=0&rev=11 --- cpp-httplib-headers.spec | 3 +++ cpp-httplib.changes | 8 ++++++++ cpp-httplib.spec | 11 +++++++++++ 3 files changed, 22 insertions(+) diff --git a/cpp-httplib-headers.spec b/cpp-httplib-headers.spec index 8d01c28..b877963 100644 --- a/cpp-httplib-headers.spec +++ b/cpp-httplib-headers.spec @@ -54,10 +54,13 @@ sed -i "7s/.*/version: '%{version}',/" meson.build %install %meson_install +cd %{buildroot}%{_datadir}/pkgconfig +ln -s cpp-httplib.pc %{name}.pc %files devel %{_includedir}/httplib.h %{_datadir}/pkgconfig/cpp-httplib.pc +%{_datadir}/pkgconfig/%{name}.pc %doc README.md %license LICENSE diff --git a/cpp-httplib.changes b/cpp-httplib.changes index 54472da..85670aa 100644 --- a/cpp-httplib.changes +++ b/cpp-httplib.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Feb 6 14:55:29 UTC 2023 - Alexey Svistunov + +- For an explicit choice when buildtime dependencies resolving + added an unique pkgconfig files aliases for both shipped library + flavors: cpp-httplib-headers.pc and cpp-httplib-shared.pc +- Enable tests performing for compiled flavor + ------------------------------------------------------------------- Tue Jan 24 20:14:49 UTC 2023 - Alexey Svistunov diff --git a/cpp-httplib.spec b/cpp-httplib.spec index 3f76c77..a3a235a 100644 --- a/cpp-httplib.spec +++ b/cpp-httplib.spec @@ -64,6 +64,16 @@ interfaces and any available port. %install %meson_install +cd %{buildroot}%{_libdir}/pkgconfig +ln -s %{name}.pc %{name}-shared.pc + +%check +pushd test + %make_build test CXX=g++ + # Mock and OBS does not provide internet connectivity, + # skip online tests to avoid failures + ./test --gtest_filter='-*.*_Online' +popd %post -n lib%{name}%{libver} -p /sbin/ldconfig %postun -n lib%{name}%{libver} -p /sbin/ldconfig @@ -77,6 +87,7 @@ interfaces and any available port. %{_libdir}/lib%{name}.so %{_includedir}/httplib.h %{_libdir}/pkgconfig/%{name}.pc +%{_libdir}/pkgconfig/%{name}-shared.pc %doc README.md %changelog From 9ee3fc246e4fa839279598e10e84dd4b5ccd7c14486b65ae31d0c21d117ee417 Mon Sep 17 00:00:00 2001 From: Alexey Svistunov Date: Wed, 8 Feb 2023 14:57:29 +0000 Subject: [PATCH 2/5] - Switch to meson tests - Add examples to headers package OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cpp-httplib?expand=0&rev=12 --- cpp-httplib-headers.spec | 2 +- cpp-httplib.changes | 6 ++++++ cpp-httplib.spec | 18 +++++++++--------- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/cpp-httplib-headers.spec b/cpp-httplib-headers.spec index b877963..c35dd29 100644 --- a/cpp-httplib-headers.spec +++ b/cpp-httplib-headers.spec @@ -61,7 +61,7 @@ ln -s cpp-httplib.pc %{name}.pc %{_includedir}/httplib.h %{_datadir}/pkgconfig/cpp-httplib.pc %{_datadir}/pkgconfig/%{name}.pc -%doc README.md +%doc README.md examples %license LICENSE %changelog diff --git a/cpp-httplib.changes b/cpp-httplib.changes index 85670aa..0f891e8 100644 --- a/cpp-httplib.changes +++ b/cpp-httplib.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Feb 8 14:55:18 UTC 2023 - Alexey Svistunov + +- Switch to meson tests +- Add examples to headers package + ------------------------------------------------------------------- Mon Feb 6 14:55:29 UTC 2023 - Alexey Svistunov diff --git a/cpp-httplib.spec b/cpp-httplib.spec index a3a235a..999666f 100644 --- a/cpp-httplib.spec +++ b/cpp-httplib.spec @@ -27,6 +27,7 @@ URL: https://github.com/yhirose/cpp-httplib Source0: %{name}-%{version}.tar.gz BuildRequires: gcc-c++ BuildRequires: meson >= 0.47.0 +BuildRequires: pkgconfig(gtest) BuildRequires: pkgconfig(libbrotlidec) BuildRequires: pkgconfig(libbrotlienc) BuildRequires: pkgconfig(openssl) >= 1.1.1 @@ -59,21 +60,21 @@ interfaces and any available port. %setup -q %build -%meson -Dcpp-httplib_compile=true --buildtype=release +%meson -Dcpp-httplib_compile=true -Dcpp-httplib_test=true \ + --buildtype=release %meson_build %install %meson_install +# Create a pkgconfig alias cd %{buildroot}%{_libdir}/pkgconfig ln -s %{name}.pc %{name}-shared.pc %check -pushd test - %make_build test CXX=g++ - # Mock and OBS does not provide internet connectivity, - # skip online tests to avoid failures - ./test --gtest_filter='-*.*_Online' -popd +# OBS and chroot build environments does not provide internet +# connectivity, skip online tests to avoid failures +export GTEST_FILTER='-*.*_Online' +%meson_test %post -n lib%{name}%{libver} -p /sbin/ldconfig %postun -n lib%{name}%{libver} -p /sbin/ldconfig @@ -86,8 +87,7 @@ popd %files devel %{_libdir}/lib%{name}.so %{_includedir}/httplib.h -%{_libdir}/pkgconfig/%{name}.pc -%{_libdir}/pkgconfig/%{name}-shared.pc +%{_libdir}/pkgconfig/*.pc %doc README.md %changelog From 89c65e36eff9b3751580bbfd6778fd8f1dcc592c07e8dfaca34f6d7b9666fc81 Mon Sep 17 00:00:00 2001 From: Alexey Svistunov Date: Wed, 8 Feb 2023 15:05:28 +0000 Subject: [PATCH 3/5] Fix cpp-httplib-headers build OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cpp-httplib?expand=0&rev=13 --- cpp-httplib-headers.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp-httplib-headers.spec b/cpp-httplib-headers.spec index c35dd29..55c212a 100644 --- a/cpp-httplib-headers.spec +++ b/cpp-httplib-headers.spec @@ -61,7 +61,7 @@ ln -s cpp-httplib.pc %{name}.pc %{_includedir}/httplib.h %{_datadir}/pkgconfig/cpp-httplib.pc %{_datadir}/pkgconfig/%{name}.pc -%doc README.md examples +%doc README.md example %license LICENSE %changelog From a52c3c7ac270fe1447e6bda436a07c96d0b45336357520c4cfb6cca5ced06a56 Mon Sep 17 00:00:00 2001 From: Alexey Svistunov Date: Thu, 9 Feb 2023 15:11:41 +0000 Subject: [PATCH 4/5] Update to version 0.12.0 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cpp-httplib?expand=0&rev=14 --- _service | 15 +-------------- cpp-httplib-0.11.4.tar.gz | 3 --- cpp-httplib-0.12.0.tar.gz | 3 +++ cpp-httplib-headers.spec | 3 ++- cpp-httplib.changes | 11 +++++++++++ cpp-httplib.spec | 8 ++++---- 6 files changed, 21 insertions(+), 22 deletions(-) delete mode 100644 cpp-httplib-0.11.4.tar.gz create mode 100644 cpp-httplib-0.12.0.tar.gz diff --git a/_service b/_service index 0f532fd..5f01448 100644 --- a/_service +++ b/_service @@ -1,16 +1,3 @@ - - https://github.com/yhirose/cpp-httplib.git - git - @PARENT_TAG@ - v(\d.*) - \1 - enable - - - - - *.tar - gz - + diff --git a/cpp-httplib-0.11.4.tar.gz b/cpp-httplib-0.11.4.tar.gz deleted file mode 100644 index 52bccbb..0000000 --- a/cpp-httplib-0.11.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9d27d270f29dd4574a237ab573a5e8ee1ade3c1ad496586bff1538ec9c39c349 -size 711249 diff --git a/cpp-httplib-0.12.0.tar.gz b/cpp-httplib-0.12.0.tar.gz new file mode 100644 index 0000000..f8bd655 --- /dev/null +++ b/cpp-httplib-0.12.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:423900c9a124b88c406cd34aba08c9e60742e477a02bd29051cf0ecbf9ef0c65 +size 635941 diff --git a/cpp-httplib-headers.spec b/cpp-httplib-headers.spec index 55c212a..4943b49 100644 --- a/cpp-httplib-headers.spec +++ b/cpp-httplib-headers.spec @@ -17,7 +17,7 @@ Name: cpp-httplib-headers -Version: 0.11.4 +Version: 0.12.0 Release: 0 Summary: A C++11 header-only HTTP/HTTPS library License: MIT @@ -47,6 +47,7 @@ interfaces and any available port. %setup -q -n cpp-httplib-%{version} # For avoid c++ compiler check sed -i "7s/.*/version: '%{version}',/" meson.build +chmod -x example/uploader.sh %build %meson -Dcpp-httplib_openssl=disabled -Dcpp-httplib_brotli=disabled \ diff --git a/cpp-httplib.changes b/cpp-httplib.changes index 0f891e8..d211713 100644 --- a/cpp-httplib.changes +++ b/cpp-httplib.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu Feb 09 12:34:29 UTC 2023 - Alexey Svistunov + +- Update to version 0.12.0: + * Removed is_writable() from DataSink (Resolve #1478, too) (#1483) + * Fix #1479 + * Removed incorrect comment + * Support CTest (#1468) + * Issue 52666: cpp-httplib:server_fuzzer: Timeout in server_fuzzer + * add to_human_string (#1467) + ------------------------------------------------------------------- Wed Feb 8 14:55:18 UTC 2023 - Alexey Svistunov diff --git a/cpp-httplib.spec b/cpp-httplib.spec index 999666f..b76d7df 100644 --- a/cpp-httplib.spec +++ b/cpp-httplib.spec @@ -16,15 +16,15 @@ # -%define sover 0.11 -%define libver 0_11 +%define sover 0.12 +%define libver 0_12 Name: cpp-httplib -Version: 0.11.4 +Version: 0.12.0 Release: 0 Summary: A C++11 HTTP/HTTPS library License: MIT URL: https://github.com/yhirose/cpp-httplib -Source0: %{name}-%{version}.tar.gz +Source0: https://codeload.github.com/yhirose/cpp-httplib/tar.gz/refs/tags/v%{version}#/%{name}-%{version}.tar.gz BuildRequires: gcc-c++ BuildRequires: meson >= 0.47.0 BuildRequires: pkgconfig(gtest) From 54d019a41eb69ecb5b4ea3b262c273316eaaed0abd021d52cf66ef8d7062e52a Mon Sep 17 00:00:00 2001 From: Alexey Svistunov Date: Thu, 16 Feb 2023 07:09:30 +0000 Subject: [PATCH 5/5] - Move examples to devel subpackage - Drop headers-only flavor and remove aliases for pkg-config files (gh#yhirose/cpp-httplib#1491) OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cpp-httplib?expand=0&rev=15 --- _multibuild | 3 -- cpp-httplib-headers.spec | 68 ---------------------------------------- cpp-httplib.changes | 7 +++++ cpp-httplib.spec | 8 ++--- 4 files changed, 10 insertions(+), 76 deletions(-) delete mode 100644 _multibuild delete mode 100644 cpp-httplib-headers.spec diff --git a/_multibuild b/_multibuild deleted file mode 100644 index 7117aa1..0000000 --- a/_multibuild +++ /dev/null @@ -1,3 +0,0 @@ - - cpp-httplib-headers - diff --git a/cpp-httplib-headers.spec b/cpp-httplib-headers.spec deleted file mode 100644 index 4943b49..0000000 --- a/cpp-httplib-headers.spec +++ /dev/null @@ -1,68 +0,0 @@ -# -# spec file for package cpp-httplib-headers -# -# Copyright (c) 2023 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/ -# - - -Name: cpp-httplib-headers -Version: 0.12.0 -Release: 0 -Summary: A C++11 header-only HTTP/HTTPS library -License: MIT -URL: https://github.com/yhirose/cpp-httplib -Source0: cpp-httplib-%{version}.tar.gz -BuildRequires: meson >= 0.47.0 - -%package devel -Summary: A C++11 header-only HTTP/HTTPS library -Conflicts: cpp-httplib-devel -Provides: cpp-httplib-devel-static = %{version} -BuildArch: noarch - -%description -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 -%setup -q -n cpp-httplib-%{version} -# For avoid c++ compiler check -sed -i "7s/.*/version: '%{version}',/" meson.build -chmod -x example/uploader.sh - -%build -%meson -Dcpp-httplib_openssl=disabled -Dcpp-httplib_brotli=disabled \ - -Dcpp-httplib_zlib=disabled - -%install -%meson_install -cd %{buildroot}%{_datadir}/pkgconfig -ln -s cpp-httplib.pc %{name}.pc - -%files devel -%{_includedir}/httplib.h -%{_datadir}/pkgconfig/cpp-httplib.pc -%{_datadir}/pkgconfig/%{name}.pc -%doc README.md example -%license LICENSE - -%changelog diff --git a/cpp-httplib.changes b/cpp-httplib.changes index d211713..856b553 100644 --- a/cpp-httplib.changes +++ b/cpp-httplib.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Feb 16 07:01:16 UTC 2023 - Alexey Svistunov + +- Move examples to devel subpackage +- Drop headers-only flavor and remove aliases for pkg-config files + (gh#yhirose/cpp-httplib#1491) + ------------------------------------------------------------------- Thu Feb 09 12:34:29 UTC 2023 - Alexey Svistunov diff --git a/cpp-httplib.spec b/cpp-httplib.spec index b76d7df..a08209c 100644 --- a/cpp-httplib.spec +++ b/cpp-httplib.spec @@ -58,6 +58,7 @@ interfaces and any available port. %prep %setup -q +chmod -x example/uploader.sh %build %meson -Dcpp-httplib_compile=true -Dcpp-httplib_test=true \ @@ -66,9 +67,6 @@ interfaces and any available port. %install %meson_install -# Create a pkgconfig alias -cd %{buildroot}%{_libdir}/pkgconfig -ln -s %{name}.pc %{name}-shared.pc %check # OBS and chroot build environments does not provide internet @@ -87,7 +85,7 @@ export GTEST_FILTER='-*.*_Online' %files devel %{_libdir}/lib%{name}.so %{_includedir}/httplib.h -%{_libdir}/pkgconfig/*.pc -%doc README.md +%{_libdir}/pkgconfig/%{name}.pc +%doc README.md example %changelog