diff options
author | Remi Collet <remi@remirepo.net> | 2019-06-19 14:29:46 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2019-06-19 14:29:46 +0200 |
commit | 1e8f5734edfb41e1ac15dcb0aeb0503068d31852 (patch) | |
tree | 4d78be69ea0e85a1c93296f18d5940e6c4f12385 /php-google-apiclient.spec | |
parent | 4868017b4604e1a237805080b17af57253220be9 (diff) |
Diffstat (limited to 'php-google-apiclient.spec')
-rw-r--r-- | php-google-apiclient.spec | 39 |
1 files changed, 10 insertions, 29 deletions
diff --git a/php-google-apiclient.spec b/php-google-apiclient.spec index 4622aec..49180c2 100644 --- a/php-google-apiclient.spec +++ b/php-google-apiclient.spec @@ -29,17 +29,15 @@ Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} -Release: 2%{?dist} +Release: 7%{?dist} # Epoch bumped to permit downgrade to 1.1.7 due to breaking change in 1.1.8 from v2 to v3 google API bz#1386167 Epoch: 2 Summary: Client library for Google APIs -Group: Development/Libraries License: ASL 2.0 URL: https://developers.google.com/api-client-library/php/ Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch # Tests %if %{with_tests} @@ -58,8 +56,7 @@ BuildRequires: php-session BuildRequires: php-spl %endif -# use path as ca-certificates doesn't exists on EL-5 -Requires: /etc/pki/tls/certs/ca-bundle.crt +Requires: ca-certificates # composer.json Requires: php(language) >= %{php_min_ver} # phpcompatinfo (computed from version 1.1.8) @@ -94,7 +91,6 @@ Autoloader: %{phpdir}/Google/autoload.php %package examples Summary: Client library for Google APIs: Examples -Group: Development/Libraries Requires: %{name} = %{epoch}:%{version}-%{release} %description examples @@ -119,8 +115,6 @@ sed "s#.*require.*autoload.*#require_once '%{phpdir}/Google/autoload.php';#" \ %install -rm -rf %{buildroot} - mkdir -p %{buildroot}%{phpdir} cp -rp src/* %{buildroot}%{phpdir}/ @@ -134,41 +128,28 @@ grep '%{_sysconfdir}/pki/tls/certs/ca-bundle.crt' --quiet \ : Skip tests requiring network access rm -f tests/general/ApiBatchRequestTest.php -: Run tests -run=0 -ret=0 -if which php56; then - php56 %{_bindir}/phpunit || ret=1 - run=1 -fi -if which php71; then - php71 %{_bindir}/phpunit || ret=1 - run=1 -fi -if [ $run -eq 0 ]; then -%{_bindir}/phpunit --verbose -fi -exit $ret +: Upstream tests +RETURN_CODE=0 +for PHP_EXEC in %{_bindir}/php %{?rhel:php54 php55 php56 php70} php71 php72 php73 php74; do + if [ "%{_bindir}/php" == "$PHP_EXEC" ] || which $PHP_EXEC; then + $PHP_EXEC %{_bindir}/phpunit || RETURN_CODE=1 + fi +done +exit $RETURN_CODE %else : Tests skipped %endif -%clean -rm -rf %{buildroot} - - %{!?_licensedir:%global license %%doc} %files -%defattr(-,root,root,-) %license LICENSE %doc *.md %doc composer.json %{phpdir}/Google %files examples -%defattr(-,root,root,-) %doc examples/* |