diff options
-rw-r--r-- | php-symfony-polyfill.spec | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/php-symfony-polyfill.spec b/php-symfony-polyfill.spec index 2c6863e..e0c3a37 100644 --- a/php-symfony-polyfill.spec +++ b/php-symfony-polyfill.spec @@ -18,6 +18,10 @@ %global composer_vendor symfony %global composer_project polyfill +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +# raise dependency on PHP 7 and ignore *_compat +%global php_min_ver 7.0 +%else # "php": ">=5.3.3" %global php_min_ver 5.3.3 # "ircmaxell/password-compat": "~1.0" @@ -26,6 +30,7 @@ # "paragonie/random_compat": "~1.0|~2.0" %global paragonie_random_compat_min_ver 1.0 %global paragonie_random_compat_max_ver 3.0 +%endif # Build using "--without tests" to disable tests %global with_tests 0%{!?_without_tests:1} @@ -34,7 +39,7 @@ Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} -Release: 1%{?github_release}%{?dist} +Release: 3%{?github_release}%{?dist} Summary: Symfony polyfills backporting features to lower PHP versions License: MIT @@ -49,10 +54,7 @@ BuildRequires: php-fedora-autoloader-devel BuildRequires: php-composer(phpunit/phpunit) ## composer.json BuildRequires: php(language) >= %{php_min_ver} -%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: (php-composer(ircmaxell/password-compat) >= %{ircmaxell_password_compat_min_ver} with php-composer(ircmaxell/password-compat) < %{ircmaxell_password_compat_max_ver}) -BuildRequires: (php-composer(paragonie/random_compat) >= %{paragonie_random_compat_min_ver} with php-composer(paragonie/random_compat) < %{paragonie_random_compat_max_ver}) -%else +%if 0%{?fedora} < 27 && 0%{?rhel} < 8 BuildRequires: php-composer(ircmaxell/password-compat) < %{ircmaxell_password_compat_max_ver} BuildRequires: php-composer(ircmaxell/password-compat) >= %{ircmaxell_password_compat_min_ver} BuildRequires: php-composer(paragonie/random_compat) < %{paragonie_random_compat_max_ver} @@ -71,10 +73,7 @@ BuildRequires: php-spl # composer.json Requires: php(language) >= %{php_min_ver} -%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -Requires: (php-composer(ircmaxell/password-compat) >= %{ircmaxell_password_compat_min_ver} with php-composer(ircmaxell/password-compat) < %{ircmaxell_password_compat_max_ver}) -Requires: (php-composer(paragonie/random_compat) >= %{paragonie_random_compat_min_ver} with php-composer(paragonie/random_compat) < %{paragonie_random_compat_max_ver}) -%else +%if 0%{?fedora} < 27 && 0%{?rhel} < 8 Requires: php-composer(ircmaxell/password-compat) < %{ircmaxell_password_compat_max_ver} Requires: php-composer(ircmaxell/password-compat) >= %{ircmaxell_password_compat_min_ver} Requires: php-composer(paragonie/random_compat) < %{paragonie_random_compat_max_ver} @@ -146,6 +145,8 @@ cat <<'AUTOLOAD' | tee -a src/autoload.php __DIR__ . '/Php71/bootstrap.php', __DIR__ . '/Php72/bootstrap.php', __DIR__ . '/Php73/bootstrap.php', +)); +\Fedora\Autoloader\Dependencies::optional(array( '%{phpdir}/password_compat/password.php', '%{phpdir}/random_compat/autoload.php', )); @@ -187,6 +188,10 @@ exit $RETURN_CODE %changelog +* Mon Jul 16 2018 Remi Collet <remi@remirepo.net> - 1.8.0-3 +- raise dependency on PHP 7 and ignore dependencies on + ircmaxell/password-compat and paragonie/random_compat + * Fri May 4 2018 Remi Collet <remi@remirepo.net> - 1.8.0-1 - update to 1.8.0 - add symfony/polyfill-php73 |