%global source_date_epoch_from_changelog %{nil} %global debug_package %{nil} %global __brp_check_rpaths %{nil} %global __strip /bin/true %define _buildshell /bin/bash %define name0 curl Name: %{name0}x Version: 8.14.1 Release: 2%{?dist} Summary: Curl with SNI controlled by environment variable CURLX_SNI License: curl URL: https://curl.se/ Source0: https://%{name0}.se/download/%{name0}-%{version}.tar.xz Source1: https://curl.se/download/%{name0}-8.14.1.tar.xz.asc Source2: https://daniel.haxx.se/mykey.asc Source3: openssl_patch.c BuildRequires: gnupg2 BuildRequires: gvim BuildRequires: cmake cmake-data extra-cmake-modules ninja-build gcc BuildRequires: brotli-devel BuildRequires: libidn2-devel BuildRequires: libnghttp2-devel BuildRequires: libpsl-devel BuildRequires: libssh2-devel BuildRequires: libzstd-devel BuildRequires: openldap-devel BuildRequires: openssl-devel BuildRequires: zlib-ng-compat-devel BuildRequires: c-ares-devel # /etc/ssl/certs/ca-certificates.crt # update-ca-trust # /etc/ssl/certs/ca-certificates.crt # /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem %description %prep ( cd %{_sourcedir}; %{gpgverify} --keyring=mykey.asc --signature=%{name0}-%{version}.tar.xz.asc --data=%{name0}-%{version}.tar.xz; ) %setup -q -n %{name0}-%{version} cd lib/vtls set +H A=( --clean #-c "/SSL_set_tlsext_host_name/ delete" #-c "/SSL_set_tlsext_host_name(octx->ssl, peer->sni))" -c "normal! dd" -c "/^ if(!SSL_set_tlsext_host_name(octx->ssl, peer->sni)) {\$" -c "normal! dk" -c "normal! k" -c "r %{_sourcedir}/openssl_patch.c" -c "w! openssl.c_" -c "q!" ) ( exec -a vim gvim "${A[@]}" openssl.c &>/dev/null ) diff -u openssl.c openssl.c_ && exit 1 mv -v openssl.c_ openssl.c %conf C=( # hier cmake -G Ninja -B build/ -DCMAKE_PREFIX_PATH=%{_prefix} -DCMAKE_LIBRARY_PATH=%{_lib} -DCMAKE_INSTALL_RPATH=/opt/%{name}/%{_lib} -DCMAKE_BUILD_WITH_INSTALL_RPATH=1 -DOPENSSL_ROOT_DIR=%{_prefix} # features not supported by distro openssl #-DUSE_ECH=1 # ech support missing in openssl #-DUSE_NGTCP2=1 #-DUSE_OPENSSL_QUIC=1 #-DUSE_QUICHE=1 #-DUSE_MSH3=1 # features -DENABLE_ARES=1 -DUSE_HTTPSRR=1 #-DUSE_LIBRTMP=1 # BuildRequires: librtmp-devel # rpmfusion-free rpmfusion-free-tainted rpmfusion-free-updates -DUSE_SSLS_EXPORT=1 # debugging -DCMAKE_BUILD_TYPE=Release -DENABLE_CURLDEBUG=0 -DENABLE_DEBUG=0 -DENABLE_SERVER_DEBUG=1 ) "${C[@]}" %build cmake --build build/ %install export QA_RPATHS=$((0x0002|0x0004)) cmake --install build --prefix %{buildroot}/opt/%{name} mkdir -pv %{buildroot}%{_bindir} ln -sfv "/opt/%{name}/bin/%{name0}" $_/%{name} %check %files /opt/%{name} %{_bindir} %changelog