# remirepo/fedora spec file for php-mongodb # # Copyright (c) 2015-2022 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # # disabled for https://fedoraproject.org/wiki/Changes/MongoDB_Removal %bcond_with tests %global gh_commit e4a7594ac4b31635fa77455c4038a7013024ba28 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner mongodb #global gh_date 20151102 %global gh_project mongo-php-library %global psr0 MongoDB %global upstream_version 1.12.0 #global upstream_prever alpha1 #global upstream_lower alpha1 %global ext_version 1.13 Name: php-%{gh_owner} Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}} %if 0%{?gh_date} Release: 1%{gh_date}git%{gh_short}%{?dist} %else Release: 1%{?dist} %endif Summary: MongoDB driver library License: ASL 2.0 URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{upstream_version}%{?upstream_prever}-%{gh_short}.tar.gz # Get rid of jean85/pretty-package-versions Patch0: %{name}-rpm.patch BuildArch: noarch BuildRequires: php(language) >= 7.2 BuildRequires: php-cli BuildRequires: php-reflection BuildRequires: php-date BuildRequires: php-dom BuildRequires: php-hash BuildRequires: php-json BuildRequires: php-spl # remirepo:1 %if 0%{?fedora} >= 31 || 0%{?rhel} >= 8 BuildRequires: (php-composer(symfony/polyfill-php80) >= 1.19 with php-composer(symfony/polyfill-php80) < 2) # remirepo:4 %else BuildRequires: php-symfony-polyfill < 2 BuildRequires: php-symfony-polyfill >= 1.19 %endif %if %{with tests} BuildRequires: mongodb-server >= 2.4 BuildRequires: php-pecl(mongodb) >= %{ext_version} # From composer.json, "require-dev": { # "phpunit/phpunit": "^6.4 || ^8.3", # "sebastian/comparator": "^2.0 || ^3.0", # "squizlabs/php_codesniffer": "^3.5, <3.5.5", # "symfony/phpunit-bridge": "^5.x@dev" %if 0%{?fedora} >= 32 || 0%{?rhel} >= 9 %global phpunit %{_bindir}/phpunit9 %else %global phpunit %{_bindir}/phpunit8 %endif BuildRequires: %{phpunit} %endif # For autoloader BuildRequires: php-composer(fedora/autoloader) # From composer.json, "require": { # "php": "^7.0 || ^8.0" # "ext-hash": "*", # "ext-json": "*", # "ext-mongodb": "^1.8.1" # "jean85/pretty-package-versions": "^1.2 || ^2.0.1" # "symfony/polyfill-php80": "^1.19" Requires: php(language) >= 7.2 Requires: php-hash Requires: php-json Requires: php-pecl(mongodb) >= %{ext_version} # remirepo:1 %if 0%{?fedora} >= 31 || 0%{?rhel} >= 8 Requires: (php-composer(symfony/polyfill-php80) >= 1.19 with php-composer(symfony/polyfill-php80) < 2) # remirepo:4 %else Requires: php-symfony-polyfill < 2 Requires: php-symfony-polyfill >= 1.19 %endif # From phpcompatinfo report for 1.8.0 Requires: php-reflection Requires: php-date Requires: php-spl # For autoloader Requires: php-composer(fedora/autoloader) # Composer Provides: php-composer(%{gh_owner}/%{gh_owner}) = %{version}%{?prever} %description This library provides a high-level abstraction around the lower-level drivers for PHP and HHVM (i.e. the mongodb extension). While the extension provides a limited API for executing commands, queries, and write operations, this library implements an API similar to that of the legacy PHP driver. It contains abstractions for client, database, and collection objects, and provides methods for CRUD operations and common commands (e.g. index and collection management). Autoloader: %{_datadir}/php/%{psr0}/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} cat << 'EOF' | tee src/autoload.php phpunit.xml cat << 'EOF' | tee tests/bootstrap.php - 1.12.0-1 - update to 1.12.0 - raise dependency on mongodb extension version 1.13 * Wed Dec 15 2021 Remi Collet - 1.11.0-1 - update to 1.11.0 - raise dependency on PHP 7.2 - raise dependency on mongodb extension version 1.12 * Wed Dec 8 2021 Remi Collet - 1.10.1-1 - update to 1.10.1 * Tue Nov 2 2021 Remi Collet - 1.10.0-1 - update to 1.10.0 - raise dependency on mongodb extension version 1.11 * Wed Jul 14 2021 Remi Collet - 1.9.0-1 - update to 1.9.0 - raise dependency on PHP 7.1 * Fri Apr 9 2021 Remi Collet - 1.9.0~alpha1-1 - update to 1.9.0 - raise dependency on mongodb extension version 1.10 * Wed Nov 25 2020 Remi Collet - 1.8.0-1 - update to 1.8.0 - raise dependency on mongodb extension 1.8.1 - add dependency on symfony/polyfill-php80 * Fri Nov 6 2020 Remi Collet - 1.7.2-1 - update to 1.7.2 * Mon Oct 12 2020 Remi Collet - 1.7.1-1 - update to 1.7.1 * Mon Aug 10 2020 Remi Collet - 1.7.0-1 - update to 1.7.0 - raise dependency on PHP 7.0 - raise dependency on mongodb extension 1.8 * Wed Feb 5 2020 Remi Collet - 1.6.0-1 - update to 1.6.0 - raise dependency on mongodb extension 1.7 * Tue Jan 14 2020 Remi Collet - 1.5.2-1 - update to 1.5.2 * Thu Nov 14 2019 Remi Collet - 1.5.1-1 - update to 1.5.1 * Mon Sep 9 2019 Remi Collet - 1.5.0-1 - update to 1.5.0 - raise dependency on PHP 5.6 - raise dependency on mongodb extension 1.6 * Mon Aug 19 2019 Remi Collet - 1.4.3-1 - update to 1.4.3 * Tue Feb 5 2019 Remi Collet - 1.4.2-3 - disable test suite and so mongodb-server build dependency for https://fedoraproject.org/wiki/Changes/MongoDB_Removal * Fri Aug 24 2018 Remi Collet - 1.4.2-1 - update to 1.4.2 * Wed Jul 11 2018 Remi Collet - 1.4.1-1 - update to 1.4.1 * Thu Jun 28 2018 Remi Collet - 1.4.0-1 - update to 1.4.0 - raise dependency on mongodb extension 1.5.0 * Fri Apr 20 2018 Remi Collet - 1.3.2-1 - update to 1.3.2 * Wed Apr 4 2018 Remi Collet - 1.3.1-1 - update to 1.3.1 * Fri Feb 9 2018 Remi Collet - 1.3.0-1 - Update to 1.3.0 - raise dependency on mongodb extension 1.4.0 * Tue Nov 14 2017 Remi Collet - 1.2.0-1 - Update to 1.2.0 - raise dependency on PHP 5.5 - raise dependency on mongodb extension 1.3.0 * Sun May 14 2017 Remi Collet - 1.1.2-2 - ensure fedora/autoloader is used * Fri Feb 17 2017 Remi Collet - 1.1.2-1 - update to 1.1.2 * Thu Jan 19 2017 Remi Collet - 1.1.1-1 - update to 1.1.1 * Wed Dec 7 2016 Remi Collet - 1.1.0-1 - update to 1.1.0 - raise dependency on php-pecl-mongodb 1.2.0 - switch to fedora/autoloader * Tue Dec 6 2016 Remi Collet - 1.0.4-1 - update to 1.0.4 * Tue Sep 27 2016 Remi Collet - 1.0.3-1 - update to 1.0.3 * Thu Jul 28 2016 Remi Collet - 1.0.2-2 - only run upstream test suite when build --with tests * Thu Mar 31 2016 Remi Collet - 1.0.2-1 - update to 1.0.2 * Sat Mar 5 2016 Remi Collet - 1.0.1-1 - update to 1.0.1 * Fri Jan 22 2016 Remi Collet - 1.0.0-1 - update to 1.0.0 * Mon Jan 4 2016 Remi Collet - 1.0.0-0.4.beta2 - update to 1.0.0beta2 - raise dependency on pecl/mongodb ^1.1.1 - run test suite with both PHP 5 and 7 when available * Tue Nov 3 2015 Remi Collet - 1.0.0-0.3.beta1 - update to 1.0.0beta1 * Mon Nov 2 2015 Remi Collet - 1.0.0-0.2.20151102gita3c0b97 - git snapshot * Sat Oct 31 2015 Remi Collet - 1.0.0-0.1.alpha1 - initial package