From 2c04e8a8489f46295067d0a78c33d0123a3fda83 Mon Sep 17 00:00:00 2001 From: Sergey Zhemoytel Date: Sun, 23 Jun 2024 23:49:40 +0300 Subject: [PATCH] Imported from SRPM --- .abf.yml | 2 + nghttp3.spec | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 132 insertions(+) create mode 100644 .abf.yml create mode 100644 nghttp3.spec diff --git a/.abf.yml b/.abf.yml new file mode 100644 index 0000000..55dd2f3 --- /dev/null +++ b/.abf.yml @@ -0,0 +1,2 @@ +sources: + nghttp3-1.4.0.tar.gz: c86a24dee580ba03a6fa36a3a31e2849b27be53b diff --git a/nghttp3.spec b/nghttp3.spec new file mode 100644 index 0000000..5c25ec3 --- /dev/null +++ b/nghttp3.spec @@ -0,0 +1,130 @@ +%define debug %nil +%define debug_package %nil +%define major 9 +%define asiomajor 1 +%define libname %mklibname %{name}_ %{major} +%define devname %mklibname %{name} -d +%define sdevname %mklibname %{name} -d -s +%define llvm_ver llvm17 +%define llvm_path /opt/%{llvm_ver} + +%global optflags %(echo %{optflags} | sed -e 's/-ffat-lto-objects//g' -e 's/-fvar-tracking-assignments//g') + +#define __noautoprov 'nghttp3.so' + +Summary: HTTP/3 library written in C +Name: nghttp3 +Version: 1.4.0 +Release: 1 +License: MIT +Group: Networking/WWW +URL: https://nghttp2.org/nghttp3 +Source0: https://github.com/ngtcp2/nghttp3/releases/download/v%{version}/%{name}-%{version}.tar.gz +BuildRequires: bison +BuildRequires: cmake >= 3.0 +BuildRequires: libxml2-utils +%if %{mdvver} >= 201910 +BuildRequires: python3-cython +BuildRequires: python3-setuptools +BuildRequires: python3-sphinx +BuildRequires: pkgconfig(python3) +%else +BuildRequires: python-cython +BuildRequires: python-setuptools +BuildRequires: python-sphinx +BuildRequires: pkgconfig(python) +%endif +BuildRequires: %{llvm_ver} +BuildRequires: stdc++-gcc10-devel +BuildRequires: ruby +BuildRequires: boost-devel >= 1.54.0 +BuildRequires: jemalloc-devel +BuildRequires: pkgconfig(cunit) >= 2.1 +BuildRequires: pkgconfig(jansson) >= 2.5 +BuildRequires: pkgconfig(libcares) >= 1.7.5 +BuildRequires: pkgconfig(libev) >= 4.11 +BuildRequires: pkgconfig(libevent) >= 2.0.8 +BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(openssl) >= 1.0.1 +BuildRequires: pkgconfig(zlib) + +%description +Nghttp3 is a library implementing the Hypertext Transfer Protocol version 3 +(HTTP/3) protocol in C; it implements also the header compression algorithm +HPACK in C. +This package contains the HTTP/3 client, server and proxy programs, and also +the encoder and decoder one. + +#----------------------------------------------------------------------------- + +%package -n %{libname} +Summary: A library implementing the HTTP/3 protocol +Group: System/Libraries + +%description -n %{libname} +Nghttp3 is a library implementing the Hypertext Transfer Protocol version 3 +(HTTP/3) protocol in C. +This package contains the main library. + +%files -n %{libname} +%doc COPYING +%{_libdir}/libnghttp3.so.%{major}* + +#----------------------------------------------------------------------------- + +%package -n %{devname} +Summary: Files needed for building applications with %{name} +Group: Development/C +Requires: %{libname} = %{EVRD} +Provides: %{name}-devel = %{EVRD} + +%description -n %{devname} +The libnghttp3-devel package includes libraries and header files needed +for building applications with libnghttp3. + +%files -n %{devname} +%doc COPYING +%{_includedir}/%{name} +%{_libdir}/pkgconfig/*.pc +%{_libdir}/*.so +%{_docdir}/%{name}/README.rst + + +#----------------------------------------------------------------------------- + +%package -n %{sdevname} +Summary: Static library from %{name} +Group: Development/C +Requires: %{devname} = %{EVRD} + +%description -n %{sdevname} +Static library from %{name} + + +%files -n %{sdevname} +%doc COPYING +%{_libdir}/*.a + +#----------------------------------------------------------------------------- + +%prep +%setup -q + + +%build +export LDFLAGS="-lstdc++-gcc10" +export CC=%{llvm_path}/bin/clang +export CXX=%{llvm_path}/bin/clang++ +export CPP=%{llvm_path}/bin/clang-cpp +export CFLAGS="-I/usr/include/libstdc++-gcc10 -I/usr/include/libstdc++-gcc10/%{_host}" +export CXXFLAGS="-I/usr/include/libstdc++-gcc10 -I/usr/include/libstdc++-gcc10/%{_host}" + +autoreconf -if +%configure +%make + +%install +%makeinstall_std + +%check +%make check