mirror of
https://abf.rosa.ru/djam/ngtcp2.git
synced 2025-02-22 15:12:53 +00:00
154 lines
3.6 KiB
RPMSpec
154 lines
3.6 KiB
RPMSpec
%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 0
|
|
|
|
Name: ngtcp2
|
|
Version: 1.11.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)
|
|
BuildRequires: pkgconfig(wolfssl)
|
|
|
|
%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}"
|
|
export LD_LIBRARY_PATH=/opt/openssl3.3/lib/:${LD_LIBRARY_PATH}
|
|
|
|
%cmake \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DENABLE_GNUTLS:BOOL=ON \
|
|
-DENABLE_OPENSSL:BOOL=ON \
|
|
-DENABLE_WOLFSSL: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
|
|
|