mirror of
https://abf.rosa.ru/djam/ngtcp2.git
synced 2025-02-22 15:12:53 +00:00
Imported from SRPM
This commit is contained in:
commit
26013ea47f
3 changed files with 153 additions and 0 deletions
2
.abf.yml
Normal file
2
.abf.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
sources:
|
||||
ngtcp2-1.6.0.tar.gz: 89c294349def6bf26da91c4ece318840bf48a0f3
|
1
ngtcp2.rpmlintrc
Normal file
1
ngtcp2.rpmlintrc
Normal file
|
@ -0,0 +1 @@
|
|||
addFilter("E: incoherent-version-in-name")
|
150
ngtcp2.spec
Normal file
150
ngtcp2.spec
Normal file
|
@ -0,0 +1,150 @@
|
|||
%define llvm_ver llvm17
|
||||
%define llvm_path /opt/%{llvm_ver}
|
||||
%define libname %mklibname %{name}
|
||||
%define devname %mklibname -d %{name}
|
||||
%define sdevname %mklibname -d -s %{name}
|
||||
%define libtlsname %mklibname %{name}_crypto_gnutls
|
||||
%define devtlsname %mklibname -d %{name}_crypto_gnutls
|
||||
%define sdevtlsname %mklibname -d -s %{name}_crypto_gnutls
|
||||
|
||||
%define debug %nil
|
||||
%define debug_package %nil
|
||||
|
||||
%define secscan 1
|
||||
|
||||
Name: ngtcp2
|
||||
Version: 1.6.0
|
||||
Release: 1
|
||||
Summary: ngtcp2 project is an effort to implement IETF QUIC protocol
|
||||
License: MIT
|
||||
URL: https://nghttp2.org/ngtcp2
|
||||
Source0: https://github.com/ngtcp2/ngtcp2/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
||||
Source1000: %{name}.rpmlintrc
|
||||
Group: Development/Other
|
||||
BuildRequires: %{llvm_ver}
|
||||
BuildRequires: stdc++-gcc10-devel
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: cmake
|
||||
BuildRequires: %{_lib}jemalloc-devel
|
||||
BuildRequires: pkgconfig(libev)
|
||||
BuildRequires: pkgconfig(gnutls) >= 3.7.5
|
||||
BuildRequires: pkgconfig(libnghttp3)
|
||||
BuildRequires: pkgconfig(openssl3.3)
|
||||
|
||||
%if %{secscan}
|
||||
BuildRequires: clamav
|
||||
BuildRequires: trivy
|
||||
%endif
|
||||
|
||||
%description
|
||||
ngtcp2 project is an effort to implement RFC9000 QUIC protocol
|
||||
|
||||
|
||||
%package -n %{libname}
|
||||
Summary: ngtcp2 project is an effort to implement IETF QUIC protocol
|
||||
|
||||
%description -n %{libname}
|
||||
ngtcp2 project is an effort to implement RFC9000 QUIC protocol
|
||||
|
||||
%files -n %{libname}
|
||||
%doc COPYING
|
||||
%{_libdir}/lib%{name}.so.*
|
||||
%{_docdir}/%{name}/README.rst
|
||||
|
||||
|
||||
%package -n %{devname}
|
||||
Summary: Development library for %{name}
|
||||
Requires: %{libname} = %{EVRD}
|
||||
|
||||
%description -n %{devname}
|
||||
Development library for %{name}
|
||||
|
||||
%files -n %{devname}
|
||||
%{_libdir}/lib%{name}.so
|
||||
%{_includedir}/%{name}/%{name}.h
|
||||
%{_includedir}/%{name}/version.h
|
||||
%{_libdir}/pkgconfig/lib%{name}.pc
|
||||
|
||||
|
||||
%package -n %{sdevname}
|
||||
Summary: Static library for %{name}
|
||||
|
||||
%description -n %{sdevname}
|
||||
Static library for %{name}
|
||||
|
||||
%files -n %{sdevname}
|
||||
%{_libdir}/lib%{name}.a
|
||||
|
||||
|
||||
%package -n %{libtlsname}
|
||||
Summary: GnuTLS library for %{name}
|
||||
|
||||
%description -n %{libtlsname}
|
||||
GnuTLS library for %{name}
|
||||
|
||||
%files -n %{libtlsname}
|
||||
%{_libdir}/lib%{name}_crypto_gnutls.so.*
|
||||
|
||||
|
||||
%package -n %{devtlsname}
|
||||
Summary: Development library GnuTLS for %{name}
|
||||
|
||||
%description -n %{devtlsname}
|
||||
Development library GnuTLS for %{name}
|
||||
|
||||
%files -n %{devtlsname}
|
||||
%{_libdir}/lib%{name}_crypto_gnutls.so
|
||||
%{_libdir}/pkgconfig/lib%{name}_crypto_gnutls.pc
|
||||
%{_includedir}/%{name}/%{name}_crypto*.h
|
||||
|
||||
%package -n %{sdevtlsname}
|
||||
Summary: Static library GnuTLS for %{name}
|
||||
|
||||
%description -n %{sdevtlsname}
|
||||
Static library GnuTLS for %{name}
|
||||
|
||||
%files -n %{sdevtlsname}
|
||||
%{_libdir}/lib%{name}_crypto_gnutls.a
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
|
||||
%if %{secscan}
|
||||
clamscan -ir .
|
||||
trivy fs --scanners vuln --format cosign-vuln .
|
||||
%endif
|
||||
|
||||
|
||||
%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}"
|
||||
|
||||
export PKG_CONFIG_PATH="/opt/openssl3.3/lib/pkgconfig:${PKG_CONFIG_PATH}"
|
||||
|
||||
%cmake \
|
||||
-DENABLE_GNUTLS:BOOL=ON \
|
||||
-DENABLE_OPENSSL:BOOL=ON \
|
||||
-DOPENSSL_ROOT_DIR="/opt/openssl3.3" \
|
||||
-DLIBS="${LIBS}:/opt/openssl3.3/lib" \
|
||||
-DBUILD_TESTING:BOOL=OFF
|
||||
|
||||
%make
|
||||
|
||||
%install
|
||||
%makeinstall -C build DESTDIR=%{buildroot}
|
||||
|
||||
%check
|
||||
# for tests depend https://github.com/nemequ/munit/
|
||||
#make -C build check
|
||||
|
||||
%if %{secscan}
|
||||
clamscan -ir %{buildroot}
|
||||
%endif
|
||||
|
Loading…
Add table
Reference in a new issue