summaryrefslogtreecommitdiffstats
path: root/php-guzzlehttp-guzzle6.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-guzzlehttp-guzzle6.spec')
-rw-r--r--php-guzzlehttp-guzzle6.spec34
1 files changed, 28 insertions, 6 deletions
diff --git a/php-guzzlehttp-guzzle6.spec b/php-guzzlehttp-guzzle6.spec
index e4c82c1..ff2891c 100644
--- a/php-guzzlehttp-guzzle6.spec
+++ b/php-guzzlehttp-guzzle6.spec
@@ -39,7 +39,7 @@
Name: php-%{composer_vendor}-%{composer_project}6
Version: %{github_version}
-Release: 1%{?github_release}%{?dist}
+Release: 2%{?github_release}%{?dist}
Summary: PHP HTTP client library
Group: Development/Libraries
@@ -51,10 +51,14 @@ URL: http://guzzlephp.org
Source0: %{name}-%{github_version}-%{github_commit}.tar.gz
Source1: %{name}-get-source.sh
+# [ClientInterface] Fix VERSION for 6.3.0 release
+# https://github.com/guzzle/guzzle/pull/1864
+# https://github.com/guzzle/guzzle/pull/1864.patch
+Patch0: %{name}-upstream-pull-1864.patch
+
BuildArch: noarch
-# Tests
-%if %{with_tests}
-BuildRequires: nodejs
+# Library version value and autoloader check
+BuildRequires: php-cli
## composer.json
BuildRequires: php(language) >= %{php_min_ver}
BuildRequires: php-composer(guzzlehttp/promises) >= %{promises_min_ver}
@@ -64,6 +68,11 @@ BuildRequires: php-composer(guzzlehttp/psr7) < %{psr7_max_ver}
BuildRequires: php-composer(phpunit/phpunit)
BuildRequires: php-composer(psr/log) >= %{psr_log_min_ver}
BuildRequires: php-composer(psr/log) < %{psr_log_max_ver}
+## Autoloader
+BuildRequires: php-composer(fedora/autoloader)
+# Tests
+%if %{with_tests}
+BuildRequires: nodejs
## phpcompatinfo (computed from version 6.3.0)
BuildRequires: php-curl
BuildRequires: php-date
@@ -74,8 +83,6 @@ BuildRequires: php-pcre
BuildRequires: php-reflection
BuildRequires: php-spl
BuildRequires: php-zlib
-## Autoloader
-BuildRequires: php-composer(fedora/autoloader)
%endif
Requires: ca-certificates
@@ -122,6 +129,9 @@ Autoloader: %{phpdir}/GuzzleHttp6/autoload.php
%prep
%setup -qn %{github_name}-%{github_commit}
+: [ClientInterface] Fix VERSION for 6.3.0 release
+%patch0 -p1
+
%build
: Create common autoloader
@@ -150,6 +160,14 @@ cp -pr src %{buildroot}%{phpdir}/GuzzleHttp6
%check
+: Library version value and autoloader check
+%{_bindir}/php -r '
+ require_once "%{buildroot}%{phpdir}/GuzzleHttp6/autoload.php";
+ $version = \GuzzleHttp\ClientInterface::VERSION;
+ echo "Version $version (expected %{version})\n";
+ exit(version_compare("%{version}", "$version", "=") ? 0 : 1);
+'
+
%if %{with_tests}
: Create mock Composer autoloader
mkdir vendor
@@ -186,6 +204,10 @@ exit $RETURN_CODE
%changelog
+* Wed Jul 05 2017 Shawn Iwinski <shawn@iwin.ski> - 6.3.0-2
+- Add patch to fix version
+- Add check for version and run whether tests are skipped or not
+
* Fri Jun 23 2017 Shawn Iwinski <shawn@iwin.ski> - 6.3.0-1
- Update to 6.3.0 (RHBZ #1464283)
- Remove patch