[packages/http-client-lite] - new

qboosh qboosh at pld-linux.org
Wed Jun 18 19:13:57 CEST 2025


commit 2334d96b0d019da99e0328fd9676512ade04363c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Jun 18 18:55:18 2025 +0200

    - new

 http-client-lite-cmake.patch | 30 +++++++++++++++
 http-client-lite.spec        | 88 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 118 insertions(+)
---
diff --git a/http-client-lite.spec b/http-client-lite.spec
new file mode 100644
index 0000000..0233c1a
--- /dev/null
+++ b/http-client-lite.spec
@@ -0,0 +1,88 @@
+Summary:	HTTP Client lite - Cross-platform single-file header-only C++ library
+Summary(pl.UTF-8):	HTTP Client lite - wieloplatformowa biblioteka C++ z wyłącznie jednego pliku nagłówkowego
+Name:		http-client-lite
+Version:	0
+%define	gitref	7c3d4f720556715c1018e52faa8138836a144c24
+%define	snap	20210715
+%define	rel	1
+Release:	0.%{snap}.%{rel}
+License:	MIT
+Group:		Libraries
+Source0:	https://github.com/john-jasper-doe/http-client-lite/archive/%{gitref}/%{name}-%{snap}.tar.gz
+# Source0-md5:	7c4e3a305eaaad22a30857a496225077
+Patch0:		%{name}-cmake.patch
+URL:		https://github.com/john-jasper-doe/http-client-lite
+BuildRequires:	cmake >= 3.7
+BuildRequires:	libstdc++-devel >= 6:4.7
+BuildRequires:	rpmbuild(macros) >= 1.605
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This is a lite, C++ cross-platform header-only client library for HTTP
+request based on picohttpclient
+(<https://github.com/csachs/picohttpclient>) project.
+
+A Lightweight HTTP 1.1 client where to quickly do very simple HTTP
+requests, without adding larger dependencies to a project.
+
+%description -l pl.UTF-8
+Lekka, składająca się wyłącznie z jednego pliku nagłówkowego
+wieloplatformowa biblioteka C++ do wykonywnia żądań HTTP, oparta na
+projekcie picohttpclient (<https://github.com/csachs/picohttpclient>).
+
+Lekki klient HTTP 1.1 przydaje się, aby szybko wykonywać proste
+żądania HTTP bez dodawania do projektu dużych zależności.
+
+%package devel
+Summary:	HTTP Client lite - Cross-platform single-file header-only C++ library
+Summary(pl.UTF-8):	HTTP Client lite - wieloplatformowa biblioteka C++ z wyłącznie jednego pliku nagłówkowego
+Group:		Development/Libraries
+BuildRequires:	libstdc++-devel >= 6:4.7
+
+%description devel
+This is a lite, C++ cross-platform header-only client library for HTTP
+request based on picohttpclient
+(<https://github.com/csachs/picohttpclient>) project.
+
+A Lightweight HTTP 1.1 client where to quickly do very simple HTTP
+requests, without adding larger dependencies to a project.
+
+%description devel -l pl.UTF-8
+Lekka, składająca się wyłącznie z jednego pliku nagłówkowego
+wieloplatformowa biblioteka C++ do wykonywnia żądań HTTP, oparta na
+projekcie picohttpclient (<https://github.com/csachs/picohttpclient>).
+
+Lekki klient HTTP 1.1 przydaje się, aby szybko wykonywać proste
+żądania HTTP bez dodawania do projektu dużych zależności.
+
+%prep
+%setup -q -n %{name}-%{gitref}
+%patch -P0 -p1
+
+%build
+install -d build
+cd build
+%cmake ..
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+# no install in cmake files
+install -d $RPM_BUILD_ROOT%{_includedir}
+cp -pr include/jdl $RPM_BUILD_ROOT%{_includedir}
+
+install -d $RPM_BUILD_ROOT%{_examplesdir}
+cp -pr examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files devel
+%defattr(644,root,root,755)
+%doc LICENSE README.md
+%dir %{_includedir}/jdl
+%{_includedir}/jdl/httpclientlite.h
+%{_examplesdir}/%{name}-%{version}
diff --git a/http-client-lite-cmake.patch b/http-client-lite-cmake.patch
new file mode 100644
index 0000000..f0fdecc
--- /dev/null
+++ b/http-client-lite-cmake.patch
@@ -0,0 +1,30 @@
+--- http-client-lite-7c3d4f720556715c1018e52faa8138836a144c24/CMakeLists.txt.orig	2021-07-15 14:05:28.000000000 +0200
++++ http-client-lite-7c3d4f720556715c1018e52faa8138836a144c24/CMakeLists.txt	2025-06-17 19:14:08.433551953 +0200
+@@ -9,7 +9,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMA
+ ## Set property
+ set(CMAKE_CXX_STANDARD 11)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+-add_compile_options(-Wall -Werror -Wextra -Wpedantic -g -O0)
++add_compile_options(-Wall -Werror -Wextra -Wpedantic)
+ 
+ if(NOT CMAKE_CXX_EXTENSIONS)
+   set(CMAKE_CXX_EXTENSIONS OFF)
+--- http-client-lite-7c3d4f720556715c1018e52faa8138836a144c24/examples/CMakeLists.txt.orig	2021-07-15 14:05:28.000000000 +0200
++++ http-client-lite-7c3d4f720556715c1018e52faa8138836a144c24/examples/CMakeLists.txt	2025-06-17 19:14:17.559769177 +0200
+@@ -2,4 +2,4 @@ cmake_minimum_required(VERSION 3.7 FATAL
+ project(examples)
+ 
+ include_directories(${CMAKE_SOURCE_DIR}/include)
+-add_executable(${PROJECT_NAME}_simple_request simple_request.cxx)
++add_executable(${PROJECT_NAME}_simple_request simple_request.cpp)
+--- http-client-lite-7c3d4f720556715c1018e52faa8138836a144c24/examples/simple_request.cpp.orig	2021-07-15 14:05:28.000000000 +0200
++++ http-client-lite-7c3d4f720556715c1018e52faa8138836a144c24/examples/simple_request.cpp	2025-06-17 19:22:26.990651137 +0200
+@@ -6,7 +6,7 @@
+ #include <map>
+ #include <string>
+ 
+-#include "jdl/httpclientlite.hxx"
++#include "jdl/httpclientlite.h"
+ 
+ 
+ using namespace jdl;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/http-client-lite.git/commitdiff/2334d96b0d019da99e0328fd9676512ade04363c



More information about the pld-cvs-commit mailing list