diff options
Diffstat (limited to 'php-bartlett-PHP-CompatInfo.spec')
-rw-r--r-- | php-bartlett-PHP-CompatInfo.spec | 94 |
1 files changed, 64 insertions, 30 deletions
diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index 0e7fa54..0dc48f5 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -11,7 +11,7 @@ %undefine __brp_mangle_shebangs %{!?php_version: %global php_version %(php -r 'echo PHP_VERSION;' 2>/dev/null)} -%global gh_commit ecf11cf73912e56cc91814b540e4789cdc8739c6 +%global gh_commit e1239c5433be4a121ade2ab5aec9bb81faae7134 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20151005 %global gh_owner llaville @@ -26,7 +26,7 @@ %endif Name: php-bartlett-PHP-CompatInfo -Version: 5.0.12 +Version: 5.1.0 %global specrel 1 Release: %{?gh_date:1%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist} Summary: Find out version and the extensions required for a piece of code to run @@ -40,39 +40,53 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit Source1: fedora-review-check # Autoloader for RPM - die composer ! -Source2: %{name}-5.0.0-autoload.php +Source2: %{name}-5.1.0-autoload.php # Autoload and sqlite database path -Patch0: %{name}-5.0.0-rpm.patch +Patch0: %{name}-5.1.0-rpm.patch BuildArch: noarch BuildRequires: php(language) >= 5.5 %if %{with_tests} # to run test suite -BuildRequires: %{_bindir}/phpunit BuildRequires: php-pdo_sqlite -%if 0%{?fedora} >= 27 -BuildRequires: (php-composer(bartlett/php-reflect) >= 4.2 with php-composer(bartlett/php-reflect) < 5) -BuildRequires: (php-composer(bartlett/php-compatinfo-db) >= 1.23 with php-composer(bartlett/php-compatinfo-db) < 2) +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +%global phpunit %{_bindir}/phpunit7 +BuildRequires: (php-composer(bartlett/php-reflect) >= 4.3 with php-composer(bartlett/php-reflect) < 5) +BuildRequires: (php-composer(nikic/php-parser) >= 3.1 with php-composer(nikic/php-parser) < 4) +BuildRequires: (php-composer(bartlett/php-compatinfo-db) >= 1.23 with php-composer(bartlett/php-compatinfo-db) < 2) +BuildRequires: (php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2) +Requires: (php-composer(doctrine/cache) >= 1.3 with php-composer(doctrine/cache) < 2) +# remirepo:12 %else -BuildRequires: php-composer(bartlett/php-reflect) < 5 -BuildRequires: php-composer(bartlett/php-reflect) >= 4.2 -BuildRequires: php-composer(bartlett/php-compatinfo-db) < 2 -BuildRequires: php-composer(bartlett/php-compatinfo-db) >= 1.23 +%global phpunit %{_bindir}/phpunit +BuildRequires: php-composer(bartlett/php-reflect) < 5 +BuildRequires: php-composer(bartlett/php-reflect) >= 4.2 +BuildRequires: php-nikic-php-parser3 >= 3.1 +BuildRequires: php-composer(bartlett/php-compatinfo-db) < 2 +BuildRequires: php-composer(bartlett/php-compatinfo-db) >= 1.23 +BuildRequires: php-composer(psr/log) < 2 +BuildRequires: php-composer(psr/log) >= 1.0 +BuildRequires: php-composer(doctrine/cache) < 2 +BuildRequires: php-composer(doctrine/cache) >= 1.3 %endif +BuildRequires: %{phpunit} # For our patch / autoloader BuildRequires: php-composer(fedora/autoloader) %endif # From composer.json, "require" -# "php": ">=5.5", +# "php": "^5.5|^7.0", # "ext-libxml": "*", # "ext-pcre": "*", # "ext-spl": "*", # "ext-json": "*", # "ext-pdo_sqlite": "*", -# "bartlett/php-reflect": "^4.2", -# "bartlett/php-compatinfo-db": "^1.23" +# "bartlett/php-reflect": "^4.3", +# "nikic/php-parser": "^3.1", +# "bartlett/php-compatinfo-db": "^1.23", +# "psr/log": "^1.0" Requires: php(language) >= 5.5 Requires: php-cli Requires: php-json @@ -80,26 +94,31 @@ Requires: php-libxml Requires: php-pcre Requires: php-pdo_sqlite Requires: php-spl -%if 0%{?fedora} >= 27 -Requires: (php-composer(bartlett/php-reflect) >= 4.2 with php-composer(bartlett/php-reflect) < 5) -Requires: (php-composer(bartlett/php-compatinfo-db) >= 1.23 with php-composer(bartlett/php-compatinfo-db) < 2) +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-composer(bartlett/php-reflect) >= 4.3 with php-composer(bartlett/php-reflect) < 5) +Requires: (php-composer(nikic/php-parser) >= 3.1 with php-composer(nikic/php-parser) < 4) +Requires: (php-composer(bartlett/php-compatinfo-db) >= 1.23 with php-composer(bartlett/php-compatinfo-db) < 2) +Requires: (php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2) +# Mandatory for our patch +Requires: (php-composer(doctrine/cache) >= 1.3 with php-composer(doctrine/cache) < 2) +# remirepo:12 %else -Requires: php-composer(bartlett/php-reflect) < 5 -Requires: php-composer(bartlett/php-reflect) >= 4.2 +Requires: php-composer(bartlett/php-reflect) < 5 +Requires: php-composer(bartlett/php-reflect) >= 4.2 +Requires: php-nikic-php-parser3 >= 3.1 Requires: php-composer(bartlett/php-compatinfo-db) < 2 Requires: php-composer(bartlett/php-compatinfo-db) >= 1.23 +Requires: php-composer(psr/log) < 2 +Requires: php-composer(psr/log) >= 1.0 +# Mandatory for our patch +Requires: php-composer(doctrine/cache) < 2 +Requires: php-composer(doctrine/cache) >= 1.3 %endif # From composer.json, "require-dev": { -# "doctrine/cache": "^1.3", -# "psr/log": "^1.0", # "monolog/monolog": "^1.10", -# "bartlett/monolog-callbackfilterhandler": "^1.0", -# "bartlett/monolog-growlhandler": "^1.0", -# "bartlett/phpunit-loggertestlistener": "^1.5", -# "bartlett/umlwriter": "^1.0" # From composer.json, "suggest" # "doctrine/cache": "Allow caching results, since bartlett/php-reflect 2.2", -# "psr/log": "Allow logging events with the LogPlugin", # "monolog/monolog": "Allow logging events with the LogPlugin", # "bartlett/monolog-callbackfilterhandler": "Advanced filtering strategies for Monolog", # "bartlett/monolog-growlhandler": "Sends notifications to Growl for Monolog", @@ -107,6 +126,11 @@ Requires: php-composer(bartlett/php-compatinfo-db) >= 1.23 # "bartlett/umlwriter": "Allow writing UML class diagrams (Graphviz or PlantUML)" # "doctrine/cache": "Allow caching results, since bartlett/php-reflect 2.2" # "bartlett/umlwriter": "Allow writing UML class diagrams (Graphviz or PlantUML)" +# remirepo:1 +%if 0%{?fedora} >= 21 || 0%{?rhel} >= 8 +Suggests: php-composer(monolog/monolog) +# remirepo:1 +%endif # Required by autoloader Requires: php-composer(fedora/autoloader) @@ -160,9 +184,11 @@ ln -s %{buildroot}%{_datadir}/php/Bartlett/CompatInfo/autoload.php vendor/ ret=0 -for cmd in php php70 php71 php72; do - if which $cmd; then - $cmd %{_bindir}/phpunit --include-path %{buildroot}%{_datadir}/php --verbose || ret=1 +for cmdarg in "php %{phpunit}" "php70 %{_bindir}/phpunit" php71 php72 php73; do + if which $cmdarg; then + set $cmdarg + $1 ${2:-%{_bindir}/phpunit7} \ + --include-path %{buildroot}%{_datadir}/php --verbose || ret=1 fi done exit $ret @@ -188,6 +214,14 @@ fi %changelog +* Wed Nov 28 2018 Remi Collet <remi@remirepo.net> - 5.1.0-1 +- update to 5.1.0 +- raise dependency on bartlett/php-reflect 4.3 +- add explicit dependency on nikic/php-parser +- add explicit dependency on doctrine/cache +- add dependency on psr/log +- switch to phpunit7 + * Fri Feb 2 2018 Remi Collet <remi@remirepo.net> - 5.0.12-1 - Update to 5.0.12 (no change) - use range dependency on F27+ |