[php-guzzlehttp-guzzle] Updated to 5.1.0 (BZ #1140134)
Shawn Iwinski
siwinski at fedoraproject.org
Mon Feb 9 03:34:08 UTC 2015
commit 3c4ad09ce6f3b648deefd84fc4c8717944e99986
Author: Shawn Iwinski <shawn.iwinski at gmail.com>
Date: Sun Feb 8 22:33:27 2015 -0500
Updated to 5.1.0 (BZ #1140134)
- CA cert no longer bundled (see https://github.com/guzzle/guzzle/blob/5.1.0/docs/clients.rst#verify)
- No tests because dependency package does not provide required test file
.gitignore | 1 +
php-guzzlehttp-guzzle.spec | 110 +++++++++++---------------------------------
sources | 2 +-
3 files changed, 29 insertions(+), 84 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 136bbc3..4d69444 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
/php-guzzlehttp-guzzle-4.1.2-095cf4db559bebc78d967890eb93280d8ceb5a08.tar.gz
/php-guzzlehttp-guzzle-4.1.4-5ae164dae6e65784286a698800190bc094407f7c.tar.gz
/php-guzzlehttp-guzzle-4.1.8-e196b8f44f9492a11261ea8f7b9724613a198daf.tar.gz
+/php-guzzlehttp-guzzle-5.1.0-f1085bb4e023766a66b7b051914ec73bdf7202b5.tar.gz
diff --git a/php-guzzlehttp-guzzle.spec b/php-guzzlehttp-guzzle.spec
index 34f01a4..447c968 100644
--- a/php-guzzlehttp-guzzle.spec
+++ b/php-guzzlehttp-guzzle.spec
@@ -1,7 +1,7 @@
#
# RPM spec file for php-guzzlehttp-guzzle
#
-# Copyright (c) 2014 Shawn Iwinski <shawn.iwinski at gmail.com>
+# Copyright (c) 2014-2015 Shawn Iwinski <shawn.iwinski at gmail.com>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -11,27 +11,27 @@
%global github_owner guzzle
%global github_name guzzle
-%global github_version 4.1.8
-%global github_commit e196b8f44f9492a11261ea8f7b9724613a198daf
+%global github_version 5.1.0
+%global github_commit f1085bb4e023766a66b7b051914ec73bdf7202b5
%global composer_vendor guzzlehttp
%global composer_project guzzle
# "php": ">=5.4.0"
%global php_min_ver 5.4.0
-# "guzzlehttp/streams": "~1.4"
-%global streams_min_ver 1.4
-%global streams_max_ver 2.0
+# "guzzlehttp/ringphp": "~1.0"
+%global ring_min_ver 1.0
+%global ring_max_ver 2.0
# "psr/log": "~1.0"
%global psr_log_min_ver 1.0
%global psr_log_max_ver 2.0
-# Build using "--without tests" to disable tests
-%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
+%{!?phpdir: %global phpdir %{_datadir}/php}
+%{!?__phpunit: %global __phpunit %{_bindir}/phpunit}
Name: php-%{composer_vendor}-%{composer_project}
Version: %{github_version}
-Release: 3%{?github_release}%{?dist}
+Release: 1%{?github_release}%{?dist}
Summary: PHP HTTP client and webservice framework
Group: Development/Libraries
@@ -39,42 +39,18 @@ License: MIT
URL: http://guzzlephp.org
Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
-Patch0: %{name}-upstream.patch
-
BuildArch: noarch
-%if %{with_tests}
-# For tests
-BuildRequires: nodejs
-# For tests: composer.json
-BuildRequires: php(language) >= %{php_min_ver}
-BuildRequires: php-composer(guzzlehttp/streams) >= %{streams_min_ver}
-BuildRequires: php-composer(guzzlehttp/streams) < %{streams_max_ver}
-BuildRequires: php-composer(psr/log) >= %{psr_log_min_ver}
-BuildRequires: php-composer(psr/log) < %{psr_log_max_ver}
-BuildRequires: php-phpunit-PHPUnit
-BuildRequires: php-curl
-BuildRequires: php-json
-# For tests: phpcompatinfo (computed from version 4.1.8)
-BuildRequires: php-date
-BuildRequires: php-filter
-BuildRequires: php-libxml
-BuildRequires: php-pcre
-BuildRequires: php-reflection
-BuildRequires: php-simplexml
-BuildRequires: php-spl
-%endif
Requires: ca-certificates
# composer.json
-Requires: php(language) >= %{php_min_ver}
-Requires: php-composer(guzzlehttp/streams) >= %{streams_min_ver}
-Requires: php-composer(guzzlehttp/streams) < %{streams_max_ver}
-Requires: php-json
-# composer.json: optional
+Requires: php(language) >= %{php_min_ver}
+Requires: php-composer(guzzlehttp/ringphp) >= %{ring_min_ver}
+Requires: php-composer(guzzlehttp/ringphp) < %{ring_max_ver}
+# phpcompatinfo (computed from version 5.1.0)
Requires: php-curl
-# phpcompatinfo (computed from version 4.1.8)
Requires: php-date
Requires: php-filter
+Requires: php-json
Requires: php-libxml
Requires: php-pcre
Requires: php-simplexml
@@ -101,68 +77,36 @@ the pain out of consuming web services.
%prep
%setup -qn %{github_name}-%{github_commit}
-%patch0 -p1
-
-# Remove bundled cert
-rm -f src/cacert.pem
-sed "s#__DIR__ . '/cacert.pem'#'%{_sysconfdir}/pki/tls/cert.pem'#" \
- -i src/Client.php
-sed "s#cacert.pem#%{_sysconfdir}/pki/tls/cert.pem#" \
- -i tests/ClientTest.php
-sed "s#__DIR__ . '/../../src/cacert.pem'#'%{_sysconfdir}/pki/tls/cert.pem'#" \
- -i tests/Adapter/StreamAdapterTest.php
-
-
%build
# Empty build section, nothing required
%install
-mkdir -pm 0755 %{buildroot}%{_datadir}/php/GuzzleHttp
-cp -pr src/* %{buildroot}%{_datadir}/php/GuzzleHttp/
+mkdir -p %{buildroot}%{phpdir}/GuzzleHttp
+cp -pr src/* %{buildroot}%{phpdir}/GuzzleHttp/
%check
-%if %{with_tests}
-# Ensure no bundled cert
-for DIR in src tests
-do
- find $DIR | grep 'cacert.pem' && exit 1
- grep -r 'cacert.pem' $DIR && exit 1
-done
-
-# Create autoloader
-mkdir vendor
-cat > vendor/autoload.php <<'AUTOLOAD'
-<?php
-
-spl_autoload_register(function ($class) {
- $src = str_replace(array('\\', '_'), '/', $class).'.php';
- @include_once $src;
-});
-
-require_once '%{_datadir}/php/GuzzleHttp/Stream/functions.php';
-require_once __DIR__ . '/../src/functions.php';
-AUTOLOAD
-
-# Create PHPUnit config w/ colors turned off
-sed 's/colors\s*=\s*"true"/colors="false"/' phpunit.xml.dist > phpunit.xml
-
-%{_bindir}/phpunit --include-path="%{buildroot}%{_datadir}/php" -d date.timezone="UTC"
-%else
-: Tests skipped
-%endif
+# Cannot run tests because RingPHP package does not provide tests
+# (tests/bootstrap.php requires GuzzleHttp\Tests\Ring\Client\Server)
%files
%{!?_licensedir:%global license %%doc}
%license LICENSE
-%doc *.md composer.json
-%{_datadir}/php/GuzzleHttp/*
+%doc *.md
+%doc composer.json
+%{phpdir}/GuzzleHttp/*
%changelog
+* Sun Feb 08 2015 Shawn Iwinski <shawn.iwinski at gmail.com> - 5.1.0-1
+- Updated to 5.1.0 (BZ #1140134)
+- CA cert no longer bundled (see
+ https://github.com/guzzle/guzzle/blob/5.1.0/docs/clients.rst#verify)
+- No tests because dependency package does not provide required test file
+
* Mon Jan 12 2015 Remi Collet <remi at fedoraproject.org> - 4.1.8-3
- Upstream patch for PHP behavior change, thanks Koschei
diff --git a/sources b/sources
index 5310a90..bcefb02 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-95f59d66db8265281269828cec375676 php-guzzlehttp-guzzle-4.1.8-e196b8f44f9492a11261ea8f7b9724613a198daf.tar.gz
+7a1a17bda04587c9708c01a2882b104f php-guzzlehttp-guzzle-5.1.0-f1085bb4e023766a66b7b051914ec73bdf7202b5.tar.gz
More information about the scm-commits
mailing list