diff options
author | Remi Collet <remi@remirepo.net> | 2025-04-10 10:40:39 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2025-04-10 10:40:39 +0200 |
commit | 408c79296116c8d49fb9cd2fa84de9c50c34e114 (patch) | |
tree | ece5f91e33af1e048b8af8b9cf931ab43c217f9a /php-pecl-mongodb2.spec | |
parent | 562cf6c1bbe02f1986d5d657aa45a7d70ca90460 (diff) |
rename to php-pecl-mongodb2 for new API
always use bundled libraries
Diffstat (limited to 'php-pecl-mongodb2.spec')
-rw-r--r-- | php-pecl-mongodb2.spec | 95 |
1 files changed, 23 insertions, 72 deletions
diff --git a/php-pecl-mongodb2.spec b/php-pecl-mongodb2.spec index 894d8a2..87d4eb0 100644 --- a/php-pecl-mongodb2.spec +++ b/php-pecl-mongodb2.spec @@ -1,4 +1,4 @@ -# remirepo spec file for php-pecl-mongodb +# remirepo spec file for php-pecl-mongodb2 # # SPDX-FileCopyrightText: Copyright 2015-2025 Remi Collet # SPDX-License-Identifier: CECILL-2.1 @@ -7,11 +7,7 @@ # Please, preserve the changelog entries # -%if 0%{?scl:1} -%scl_package php-pecl-mongodb -%else -%global _root_prefix %{_prefix} -%endif +%{?scl:%scl_package php-pecl-mongodb2} %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pie_vend mongodb @@ -20,21 +16,14 @@ # After 40-smbclient.ini, see https://jira.mongodb.org/browse/PHPC-658 %global ini_name 50-%{pecl_name}.ini -# test suite requires a MongoDB server -%bcond_with tests - -# temp for EL until available in EPEL -%if 0%{?fedora} >= 37 || 0%{?rhel} >= 8 -%bcond_without syslib -%else -%bcond_with syslib -%endif +# use bundled libraries by default because of upcoming v2 +%bcond_with syslib # Bundled versions -%global bundled_libmongo 1.30.1 +%global bundled_libmongo 1.30.3 %global bundled_libcrypt 1.12.0 # Required versions (in config.m4) -%global minimal_libmongo 1.30.1 +%global minimal_libmongo 1.30.3 %global minimal_libcrypt 1.12.0 %if %{with syslib} @@ -46,9 +35,9 @@ %global runtime_libcrypt %(pkg-config --silence-errors --modversion libmongocrypt 2>/dev/null || echo %{system_libcrypt}) %endif -Summary: MongoDB driver for PHP -Name: %{?scl_prefix}php-pecl-%{pecl_name} -%global upstream_version 1.21.0 +Summary: MongoDB driver for PHP version 2 +Name: %{?scl_prefix}php-pecl-%{pecl_name}2 +%global upstream_version 2.0.0 #global upstream_prever beta1 #global upstream_lower ~beta1 %global sources %{pecl_name}-%{upstream_version}%{?upstream_prever} @@ -91,9 +80,6 @@ Provides: bundled(libbson) = %{bundled_libmongo} Provides: bundled(mongo-c-driver) = %{bundled_libmongo} Provides: bundled(libmongocrypt) = %{bundled_libcrypt} %endif -%if %{with tests} -BuildRequires: mongodb-server -%endif Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} @@ -105,6 +91,15 @@ Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} Provides: %{?scl_prefix}php-pie(%{pie_vend}/%{pie_proj}) = %{version} Provides: %{?scl_prefix}php-%{pie_vend}-%{pie_proj} = %{version} +%if 0%{?fedora} >= 43 || 0%{?rhel} >= 11 || "%{php_version}" > "8.5" +Obsoletes: %{?scl_prefix}php-pecl-%{pecl_name} < 2 +Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} +Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} +%else +# A single version can be installed +Conflicts: %{?scl_prefix}php-pecl-%{pecl_name} < 2 +%endif + %description The purpose of this driver is to provide exceptionally thin glue between MongoDB and PHP, implementing only fundemental and performance-critical @@ -245,55 +240,6 @@ OPT="-n" --modules | grep %{pecl_name} %endif -%if %{with tests} -ret=0 - -%global mongo_version %(mongod --version | sed -n '/db version/{s/.*v//;p}' 2>/dev/null) -#global mongo_version 4 - -: Run a mongodb server version %{mongo_version} -mkdir dbtest -mongod \ - --journal \ - --bind_ip 127.0.0.1 \ - --unixSocketPrefix /tmp \ - --logpath $PWD/server.log \ - --pidfilepath $PWD/server.pid \ - --dbpath $PWD/dbtest \ - --fork || : skip test as server cant start - -if [ -s server.pid ] ; then - : Drop known to fail tests -%if "%{mongo_version}" < "3.4" - ### With mongodb 3.2 -%endif - - : Run the test suite - echo '{"STANDALONE": "mongodb://127.0.0.1:27017"}' | tee /tmp/PHONGO-SERVERS.json - - pushd %{sources} - TEST_PHP_ARGS="$OPT -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \ - REPORT_EXIT_STATUS=1 \ - %{__php} -n run-tests.php -q -P --show-diff || ret=1 - popd - -%if %{with_zts} - pushd ZTS - TEST_PHP_ARGS="$OPT -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \ - REPORT_EXIT_STATUS=1 \ - %{__ztsphp} -n run-tests.php -q -P --show-diff || ret=1 - popd -%endif - - : Cleanup - kill $(cat server.pid) -fi - -exit $ret -%else -: check disabled, missing '--with tests' option -%endif - %files %license %{sources}/LICENSE @@ -310,6 +256,11 @@ exit $ret %changelog +* Thu Apr 10 2025 Remi Collet <remi@remirepo.net> - 2.0.0-1 +- update to 2.0.0 +- rename to php-pecl-mongodb2 for new API +- always use bundled libraries + * Fri Feb 28 2025 Remi Collet <remi@remirepo.net> - 1.21.0-1 - update to 1.21.0 - raise dependency on PHP 8.1 |