From 690343bb81739d4fa786225f694e5c57ead08b7d Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 1 Oct 2025 16:18:41 +0200 Subject: build using system OpenSSL --- php-pecl-couchbase4.spec | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'php-pecl-couchbase4.spec') diff --git a/php-pecl-couchbase4.spec b/php-pecl-couchbase4.spec index 95717fd..377070a 100644 --- a/php-pecl-couchbase4.spec +++ b/php-pecl-couchbase4.spec @@ -10,6 +10,9 @@ # NOTICE: mock requires: --enable-network # may help: --cleanup-after +# use system OpenSSL instead of bundled BoringSSL +%bcond_without openssl + # Disable RPATH check (no more needed) #global __arch_install_post /bin/true #global __brp_check_rpaths /bin/true @@ -28,7 +31,7 @@ Summary: Couchbase Server PHP extension Name: %{?scl_prefix}php-pecl-couchbase4 Version: 4.4.0 -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} # Apache-2.0 # src # src/deps/cache/json/LICENSE.ryu @@ -53,6 +56,8 @@ License: Apache-2.0 AND BSD-3-Clause AND BSD-2-Clause AND MIT AND BSL-1.0 URL: https://pecl.php.net/package/couchbase Source0: https://pecl.php.net/get/%{sources}.tgz +Patch0: %{pecl_name}-openssl.patch + BuildRequires: git BuildRequires: make BuildRequires: cmake >= 3.19 @@ -63,6 +68,12 @@ BuildRequires: %{?scl_prefix}php-pear BuildRequires: %{?scl_prefix}php-json BuildRequires: %{?scl_prefix}php-tokenizer BuildRequires: zlib-devel +%if %{with openssl} +BuildRequires: openssl-devel +%if 0%{?fedora} >= 41 +BuildRequires: openssl-devel-engine +%endif +%endif Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} @@ -95,8 +106,10 @@ Provides: bundled(fmt) Provides: bundled(gsl) Provides: bundled(http_parser) Provides: bundled(json) -Provides: bundled(boringssl) Provides: bundled(spdlog) +%if %{without openssl} +Provides: bundled(boringssl) +%endif %description @@ -118,6 +131,12 @@ sed -e '/LICENSE/s/role="doc"/role="src"/;/COPYING/s/role="doc"/role="src"/' -i : Collect license files mkdir lic cd %{sources} +%if %{with openssl} +%patch -P0 -p1 +rm -rf src/deps/cache/boringssl +%else +cp src/deps/cache/boringssl/*/boringssl/LICENSE ../lic/boringssl_LICENSE +%endif cp src/deps/cache/hdr_histogram/*/hdr_histogram/COPYING.txt ../lic/hdr_histogram_c_COPYING.txt cp src/deps/cache/hdr_histogram/*/hdr_histogram/LICENSE.txt ../lic/hdr_histogram_c_LICENSE.txt cp src/deps/cache/snappy/*/snappy/COPYING ../lic/snappy_COPYING @@ -129,7 +148,6 @@ cp src/deps/cache/json/*/json/LICENSE.double-conversion ../lic/json_LICENSE. cp src/deps/cache/json/*/json/LICENSE.itoa ../lic/json_LICENSE.itoa cp src/deps/cache/json/*/json/LICENSE.ryu ../lic/json_LICENSE.ryu cp src/deps/cache/spdlog/*/spdlog/LICENSE ../lic/spdlog_LICENSE -cp src/deps/cache/boringssl/*/boringssl/LICENSE ../lic/boringssl_LICENSE cp src/deps/couchbase-cxx-client/LICENSE.txt ../lic/LICENSE.txt : Parallel build @@ -231,6 +249,9 @@ install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml %changelog +* Wed Oct 1 2025 Remi Collet - 4.4.0-2 +- build using system OpenSSL + * Wed Oct 1 2025 Remi Collet - 4.4.0-1 - update to 4.4.0 -- cgit