diff options
author | Remi Collet <remi@remirepo.net> | 2020-02-04 17:20:49 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-02-04 17:20:49 +0100 |
commit | 501053e2de2a1f7a1ba87cd899a978a7316b3e48 (patch) | |
tree | efe555dbda34d6b8e74656504674b84e701634ec /php-pecl-mongodb.spec | |
parent | 223c009e4fa800a1c94d18e224dfc91fa20c3715 (diff) |
update to 1.7.0
with libbson and libmongoc 1.16.1
with libmongocrypt 1.0.1
fix build with system libraries using patch from
https://github.com/mongodb/mongo-php-driver/pull/1095
Diffstat (limited to 'php-pecl-mongodb.spec')
-rw-r--r-- | php-pecl-mongodb.spec | 51 |
1 files changed, 35 insertions, 16 deletions
diff --git a/php-pecl-mongodb.spec b/php-pecl-mongodb.spec index 16a8feb..caddfeb 100644 --- a/php-pecl-mongodb.spec +++ b/php-pecl-mongodb.spec @@ -1,6 +1,6 @@ # remirepo spec file for php-pecl-mongodb # -# Copyright (c) 2015-2019 Remi Collet +# Copyright (c) 2015-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -30,34 +30,42 @@ %global with_tests 0%{?_with_tests:1} # F30 for fedora repo, F28 for remi -%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8 +%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8 %global with_syslib 1 -%global libver 1.15.2 -%global libbuildver %(pkg-config --silence-errors --modversion libmongoc-1.0 2>/dev/null || echo %{libver}) +%global libmongo 1.16.1 +%global libmongover %(pkg-config --silence-errors --modversion libmongoc-1.0 2>/dev/null || echo %{libmongoc}) +%global libcrypt 1.0.1 +%global libcryptver %(pkg-config --silence-errors --modversion libmongocrypt 2>/dev/null || echo %{libcrypt}) %else %global with_syslib 0 -%global libver 1.15.2 +%global libmongo 1.16.1 +%global libcrypt 1.0.1 %endif Summary: MongoDB driver for PHP Name: %{?sub_prefix}php-pecl-%{pecl_name} -%global upstream_version 1.6.1 +%global upstream_version 1.7.0 #global upstream_prever RC1 #global upstream_lower ~rc1 Version: %{upstream_version}%{?upstream_lower} Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: ASL 2.0 -URL: http://pecl.php.net/package/%{pecl_name} -Source0: http://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz +URL: https://pecl.php.net/package/%{pecl_name} +Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz + +Patch0: https://patch-diff.githubusercontent.com/raw/mongodb/mongo-php-driver/pull/1095.patch BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel > 5.6 BuildRequires: %{?scl_prefix}php-pear BuildRequires: %{?scl_prefix}php-json %if %{with_syslib} -BuildRequires: pkgconfig(libbson-1.0) >= %{libver} -BuildRequires: pkgconfig(libmongoc-1.0) >= %{libver} -Requires: mongo-c-driver-libs%{?_isa} >= %{libbuildver} +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} %else BuildRequires: cyrus-sasl-devel BuildRequires: openssl-devel @@ -65,8 +73,9 @@ BuildRequires: snappy-devel BuildRequires: zlib-devel # We require 50 to ensure use of libicu-last (same version than PHP) BuildRequires: libicu-devel >= 50 -Provides: bundled(libbson) = %{libver} -Provides: bundled(mongo-c-driver) = %{libver} +Provides: bundled(libbson) = %{libmongo} +Provides: bundled(mongo-c-driver) = %{libmongo} +Provides: bundled(libmongocrypt) = %{libcrypt} %endif %if %{with_tests} BuildRequires: mongodb-server @@ -138,6 +147,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +%patch0 -p1 -b .pr1095 + # Sanity check, really often broken extver=$(sed -n '/#define PHP_MONGODB_VERSION /{s/.* "//;s/".*$//;p}' phongo_version.h) if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then @@ -170,18 +181,19 @@ peclbuild() { %if %{with_syslib} # Ensure we use system library # Need to be removed only after phpize because of m4_include - rm -r src/libmongoc + rm -r src/libmongoc* %configure \ --with-php-config=%{_bindir}/${1}-config \ - --with-libbson \ - --with-libmongoc \ + --with-mongodb-system-libs \ + --with-mongodb-client-side-encryption \ --enable-mongodb %else %configure \ --with-php-config=%{_bindir}/${1}-config \ --enable-mongodb-crypto-system-profile \ + --with-mongodb-client-side-encryption \ --with-mongodb-sasl=cyrus \ --with-mongodb-icu=yes \ --with-mongodb-ssl=openssl \ @@ -328,6 +340,13 @@ exit $ret %changelog +* Tue Feb 4 2020 Remi Collet <remi@remirepo.net> - 1.7.0-1 +- update to 1.7.0 +- with libbson and libmongoc 1.16.1 +- with libmongocrypt 1.0.1 +- fix build with system libraries using patch from + https://github.com/mongodb/mongo-php-driver/pull/1095 + * Fri Dec 6 2019 Remi Collet <remi@remirepo.net> - 1.6.1-1 - update to 1.6.1 |