summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--php-google-apiclient.spec39
2 files changed, 11 insertions, 30 deletions
diff --git a/Makefile b/Makefile
index 91b0fd5..13af741 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
SRCDIR := $(shell pwd)
NAME := $(shell basename $(SRCDIR))
-include ../../common/Makefile
+include ../../../common/Makefile
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/*