diff options
author | Shawn Iwinski <shawn@iwin.ski> | 2017-09-21 16:38:07 +0000 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2017-09-22 14:53:21 +0200 |
commit | 6a223231c482deaad6dc3e5f8dc31847a5828b0a (patch) | |
tree | 671c8019b8474198e964e698ccfd72c72f4aeffd /php-goutte.spec | |
parent | 227c71f2c15909e645fed6036a542bf387a75326 (diff) |
Add max versions to BuildRequires / Allow Symfony 3 / Modify tests
Diffstat (limited to 'php-goutte.spec')
-rw-r--r-- | php-goutte.spec | 48 |
1 files changed, 32 insertions, 16 deletions
diff --git a/php-goutte.spec b/php-goutte.spec index 485fb49..d294bcf 100644 --- a/php-goutte.spec +++ b/php-goutte.spec @@ -37,7 +37,7 @@ Name: php-goutte Version: %{github_version} -Release: 1%{?github_release}%{?dist} +Release: 4%{?github_release}%{?dist} Summary: A simple PHP web scraper Group: Development/Libraries @@ -54,8 +54,11 @@ BuildRequires: php-composer(phpunit/phpunit) BuildRequires: php(language) >= %{php_min_ver} BuildRequires: php-composer(guzzlehttp/guzzle) < %{guzzle_max_ver} BuildRequires: php-composer(guzzlehttp/guzzle) >= %{guzzle_min_ver} +BuildRequires: php-composer(symfony/browser-kit) < %{symfony_max_ver} BuildRequires: php-composer(symfony/browser-kit) >= %{symfony_min_ver} +BuildRequires: php-composer(symfony/css-selector) < %{symfony_max_ver} BuildRequires: php-composer(symfony/css-selector) >= %{symfony_min_ver} +BuildRequires: php-composer(symfony/dom-crawler) < %{symfony_max_ver} BuildRequires: php-composer(symfony/dom-crawler) >= %{symfony_min_ver} ## phpcompatinfo (computed from version 3.2.0) BuildRequires: php-reflection @@ -110,9 +113,18 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php'; \Fedora\Autoloader\Dependencies::required([ '%{phpdir}/GuzzleHttp6/autoload.php', - '%{phpdir}/Symfony/Component/BrowserKit/autoload.php', - '%{phpdir}/Symfony/Component/CssSelector/autoload.php', - '%{phpdir}/Symfony/Component/DomCrawler/autoload.php', + [ + '%{phpdir}/Symfony3/Component/BrowserKit/autoload.php', + '%{phpdir}/Symfony/Component/BrowserKit/autoload.php', + ], + [ + '%{phpdir}/Symfony3/Component/CssSelector/autoload.php', + '%{phpdir}/Symfony/Component/CssSelector/autoload.php', + ], + [ + '%{phpdir}/Symfony3/Component/DomCrawler/autoload.php', + '%{phpdir}/Symfony/Component/DomCrawler/autoload.php', + ], ]); AUTOLOAD @@ -126,18 +138,17 @@ cp -p Goutte/{autoload,Client}.php %{buildroot}/%{phpdir}/Goutte/ %check %if %{with_tests} -BOOTSTRAP=%{buildroot}/%{phpdir}/Goutte/autoload.php - -%{_bindir}/phpunit --verbose --bootstrap $BOOTSTRAP - -: Upstream tests with SCLs if available -SCL_RETURN_CODE=0 -for SCL in php56 php70 php71; do - if which $SCL; then - $SCL %{_bindir}/phpunit --verbose --bootstrap $BOOTSTRAP || SCL_RETURN_CODE=1 - fi -done -exit $SCL_RETURN_CODE +: Upstream tests +RETURN_CODE=0 +PHPUNIT=$(which phpunit) +for PHP_EXEC in "" php56 php70 php71 php72; do + if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then + $PHP_EXEC $PHPUNIT --verbose \ + --bootstrap %{buildroot}/%{phpdir}/Goutte/autoload.php \ + || RETURN_CODE=1 + fi + done +exit $RETURN_CODE %else : Tests skipped %endif @@ -157,6 +168,11 @@ rm -rf %{buildroot} %changelog +* Thu Sep 21 2017 Shawn Iwinski <shawn.iwinski@gmail.com> - 3.2.0-4 +- Add max versions to BuildRequires +- Allow Symfony 3 +- Modify tests + * Thu Jan 5 2017 Remi Collet <remi@remirepo.net> - 3.2.1-1 - update to 3.2.1 |