diff options
author | Remi Collet <remi@remirepo.net> | 2019-06-12 15:37:48 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2019-06-12 15:37:48 +0200 |
commit | 34c270024ce419eb2f2ba5d5951d62afb769a93f (patch) | |
tree | 618b6f48d7f7a935160e6331500362761f1d4ba7 /php-codeception-specify.spec | |
parent | 5d958aae98302fb55787a4e49138ee5e7e692504 (diff) |
- use php-myclabs-deep-copy19 on EL 6 and 7
Diffstat (limited to 'php-codeception-specify.spec')
-rw-r--r-- | php-codeception-specify.spec | 69 |
1 files changed, 44 insertions, 25 deletions
diff --git a/php-codeception-specify.spec b/php-codeception-specify.spec index eddf1b9..b8d4834 100644 --- a/php-codeception-specify.spec +++ b/php-codeception-specify.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-codeception-specify # -# Copyright (c) 2017 Shawn Iwinski <shawn@iwin.ski> +# Copyright (c) 2017-2019 Shawn Iwinski <shawn@iwin.ski> # # License: MIT # http://opensource.org/licenses/MIT @@ -12,17 +12,18 @@ %global github_owner Codeception %global github_name Specify -%global github_version 0.4.6 -%global github_commit 21b586f503ca444aa519dd9cafb32f113a05f286 +%global github_version 1.1.0 +%global github_commit 504ac7a882e6f7226b0cff44c72a6c0bbd0bad95 %global composer_vendor codeception %global composer_project specify -# "php": ">=5.4.0" -%global php_min_ver 5.4 +# "php": ">=7.1.0" +%global php_min_ver 7.1.0 # "myclabs/deep-copy": "~1.1" %global myclabs_deep_copy_min_ver 1.1 %global myclabs_deep_copy_max_ver 2.0 +# "phpunit/phpunit": "^7.0" # Build using "--without tests" to disable tests %global with_tests 0%{!?_without_tests:1} @@ -34,7 +35,6 @@ Version: %{github_version} Release: 2%{?github_release}%{?dist} Summary: BDD code blocks for PHPUnit and Codeception -Group: Development/Libraries License: MIT URL: https://github.com/%{github_owner}/%{github_name} Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz @@ -46,19 +46,28 @@ BuildRequires: php-fedora-autoloader-devel %if %{with_tests} ## composer.json BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: php-composer(myclabs/deep-copy) < %{myclabs_deep_copy_max_ver} -BuildRequires: php-composer(myclabs/deep-copy) >= %{myclabs_deep_copy_min_ver} -BuildRequires: php-composer(phpunit/phpunit) -## phpcompatinfo (computed from version 0.4.6) +BuildRequires: phpunit7 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-composer(myclabs/deep-copy) >= %{myclabs_deep_copy_min_ver} with php-composer(myclabs/deep-copy) < %{myclabs_deep_copy_max_ver}) +%else +BuildRequires: php-myclabs-deep-copy19 +%endif +## phpcompatinfo (computed from version 1.1.0) +BuildRequires: php-pcre BuildRequires: php-reflection BuildRequires: php-spl %endif # composer.json Requires: php(language) >= %{php_min_ver} -Requires: php-composer(myclabs/deep-copy) < %{myclabs_deep_copy_max_ver} -Requires: php-composer(myclabs/deep-copy) >= %{myclabs_deep_copy_min_ver} -# phpcompatinfo (computed from version 0.4.6) +Requires: phpunit7 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-composer(myclabs/deep-copy) >= %{myclabs_deep_copy_min_ver} with php-composer(myclabs/deep-copy) < %{myclabs_deep_copy_max_ver}) +%else +Requires: php-myclabs-deep-copy19 +%endif +# phpcompatinfo (computed from version 1.1.0) +Requires: php-pcre Requires: php-reflection Requires: php-spl # Autoloader @@ -87,7 +96,11 @@ Autoloader: %{phpdir}/Codeception/Specify/autoload.php cat <<'AUTOLOAD' | tee -a src/Codeception/Specify/autoload.php \Fedora\Autoloader\Dependencies::required(array( - '%{phpdir}/DeepCopy/autoload.php', + [ + '%{phpdir}/DeepCopy19/autoload.php', + '%{phpdir}/DeepCopy/autoload.php', + ], + '%{phpdir}/PHPUnit7/autoload.php', )); AUTOLOAD @@ -99,21 +112,16 @@ cp -rp src/Codeception %{buildroot}%{phpdir}/ %check %if %{with_tests} -: Create tests bootstrap -cat <<'BOOTSTRAP' | tee bootstrap.php -<?php -require '%{buildroot}%{phpdir}/Codeception/Specify/autoload.php'; -\Fedora\Autoloader\Dependencies::required(array( - __DIR__.'/tests/_support/SpecifyUnitTest.php' -)); -BOOTSTRAP +: Mock Composer autoload +mkdir vendor +ln -s %{buildroot}%{phpdir}/Codeception/Specify/autoload.php vendor/autoload.php : Upstream tests RETURN_CODE=0 -PHPUNIT=$(which phpunit) -for PHP_EXEC in php %{?rhel:php55} php56 php70 php71 php72; do +PHPUNIT=$(which phpunit7) +for PHP_EXEC in php71 php72 php73 php74; do if [ "php" == "$PHP_EXEC" ] || which $PHP_EXEC; then - $PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php || RETURN_CODE=1 + $PHP_EXEC $PHPUNIT --verbose || RETURN_CODE=1 fi done exit $RETURN_CODE @@ -133,6 +141,17 @@ exit $RETURN_CODE %changelog +* Wed Jun 12 2019 Remi Collet <remi@remirepo.net> - 1.1.0-2 +- sync with fedora +- use php-myclabs-deep-copy19 on EL 6 and 7 + +* Mon May 27 2019 Shawn Iwinski <shawn@iwin.ski> - 1.1.0-2 +- Update phpcompatinfo dependencies + +* Mon May 27 2019 Shawn Iwinski <shawn@iwin.ski> - 1.1.0-1 +- Update to 1.1.0 (RHBZ #1515810) +- Add range version dependencies for Fedora >= 27 || RHEL >= 8 + * Tue Sep 05 2017 Shawn Iwinski <shawn@iwin.ski> - 0.4.6-2 - Remove empty Suggests |