summaryrefslogtreecommitdiffstats
path: root/php-pecl-mongodb.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-02-09 15:06:37 +0100
committerRemi Collet <remi@php.net>2023-02-09 15:06:37 +0100
commitf2bfc07eb0a5cbffd2e70a49f92877574fb12ca8 (patch)
tree471e9bdc84f2657146db01715b6f51a920360f87 /php-pecl-mongodb.spec
parent773d3d5f908daa53eb3c0e139f3f6efa325f11b3 (diff)
update to 1.15.1
EL-7 use bundled libbson and libmongc 1.23.2 cleanup spec macros use spdx license id
Diffstat (limited to 'php-pecl-mongodb.spec')
-rw-r--r--php-pecl-mongodb.spec69
1 files changed, 42 insertions, 27 deletions
diff --git a/php-pecl-mongodb.spec b/php-pecl-mongodb.spec
index 1c8e055..0dd702a 100644
--- a/php-pecl-mongodb.spec
+++ b/php-pecl-mongodb.spec
@@ -1,7 +1,7 @@
# remirepo spec file for php-pecl-mongodb
#
-# Copyright (c) 2015-2022 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2015-2023 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
@@ -32,27 +32,31 @@
%bcond_with syslib
%endif
-%if %{with syslib}
-# Build dependency
-%global libmongo 1.23.1
-%global libcrypt 1.5.2
-# Runtime dependency
-%global libmongover %(pkg-config --silence-errors --modversion libmongoc-1.0 2>/dev/null || echo %{libmongo})
-%global libcryptver %(pkg-config --silence-errors --modversion libmongocrypt 2>/dev/null || echo %{libcrypt})
-%else
# Bundled versions
-%global libmongo 1.23.1
-%global libcrypt 1.5.2
+%global bundled_libmongo 1.23.2
+%global bundled_libcrypt 1.5.2
+
+%if %{with syslib}
+# Build dependencies
+%global system_libmongo 1.23.1
+%global system_libcrypt 1.5.2
+# Runtime dependencies
+%global runtime_libmongo %(pkg-config --silence-errors --modversion libmongoc-1.0 2>/dev/null || echo %{system_libmongo})
+%global runtime_libcrypt %(pkg-config --silence-errors --modversion libmongocrypt 2>/dev/null || echo %{system_libcrypt})
%endif
Summary: MongoDB driver for PHP
Name: %{?sub_prefix}php-pecl-%{pecl_name}
-%global upstream_version 1.15.0
+%global upstream_version 1.15.1
#global upstream_prever beta1
#global upstream_lower ~beta1
Version: %{upstream_version}%{?upstream_lower}
Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-License: ASL 2.0
+%if %{with syslib}
+License: Apache-2.0
+%else
+License: Apache-2.0 AND ISC AND MIT AND Zlib AND BSD-3-Clause
+%endif
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
@@ -62,12 +66,12 @@ BuildRequires: %{?scl_prefix}php-devel >= 7.2
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-json
%if %{with syslib}
-BuildRequires: pkgconfig(libbson-1.0) >= %{libmongo}
-BuildRequires: pkgconfig(libmongoc-1.0) >= %{libmongo}
-BuildRequires: pkgconfig(libmongocrypt) >= %{libcrypt}
-Requires: libbson%{?_isa} >= %{libmongover}
-Requires: mongo-c-driver-libs%{?_isa} >= %{libmongover}
-Requires: libmongocrypt%{?_isa} >= %{libcryptver}
+BuildRequires: pkgconfig(libbson-1.0) >= %{system_libmongo}
+BuildRequires: pkgconfig(libmongoc-1.0) >= %{system_libmongo}
+BuildRequires: pkgconfig(libmongocrypt) >= %{system_libcrypt}
+Requires: libbson%{?_isa} >= %{runtime_libmongo}
+Requires: mongo-c-driver-libs%{?_isa} >= %{runtime_libmongo}
+Requires: libmongocrypt%{?_isa} >= %{runtime_libcrypt}
%else
BuildRequires: cyrus-sasl-devel
BuildRequires: openssl-devel
@@ -76,9 +80,9 @@ BuildRequires: snappy-devel
BuildRequires: zlib-devel
# We require 69 to ensure we use the same version than PHP
BuildRequires: pkgconfig(icu-uc) >= 69
-Provides: bundled(libbson) = %{libmongo}
-Provides: bundled(mongo-c-driver) = %{libmongo}
-Provides: bundled(libmongocrypt) = %{libcrypt}
+Provides: bundled(libbson) = %{bundled_libmongo}
+Provides: bundled(mongo-c-driver) = %{bundled_libmongo}
+Provides: bundled(libmongocrypt) = %{bundled_libcrypt}
%endif
%if %{with tests}
BuildRequires: mongodb-server
@@ -134,10 +138,10 @@ sed -e 's/role="test"/role="src"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
-cd NTS
+pushd NTS
%if %{with syslib}
-# temporary: lower minimal required version
-sed -e 's/1.21.1/%{libmongo}/;s/1.3.2/%{libcrypt}/' -i config.m4
+# temporary: lower minimal required versions
+sed -e 's/%{bundled_libmongo}/%{system_libmongo}/;s/%{bundled_libcrypt}/%{system_libcrypt}/' -i config.m4
%endif
# Sanity check, really often broken
@@ -146,8 +150,13 @@ if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
: Error: Upstream extension version is ${extver}, expecting %{upstream_version}%{?upstream_prever}.
exit 1
fi
-cd ..
+# Check our macro values
+cat src/*_VERSION_CURRENT
+grep %{bundled_libmongo} src/LIBMONGOC_VERSION_CURRENT
+grep %{bundled_libcrypt} src/LIBMONGOCRYPT_VERSION_CURRENT
+
+popd
%if %{with_zts}
# Duplicate source tree for NTS / ZTS build
cp -pr NTS ZTS
@@ -323,6 +332,12 @@ exit $ret
%changelog
+* Thu Feb 9 2023 Remi Collet <remi@remirepo.net> - 1.15.1-1
+- update to 1.15.1
+- EL-7 use bundled libbson and libmongc 1.23.2
+- cleanup spec macros
+- use spdx license id
+
* Wed Nov 23 2022 Remi Collet <remi@remirepo.net> - 1.15.0-1
- update to 1.15.0
- EL-7 use bundled libbson and libmongc 1.23.1