summaryrefslogtreecommitdiffstats
path: root/php-guzzlehttp-psr7.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-guzzlehttp-psr7.spec')
-rw-r--r--php-guzzlehttp-psr7.spec34
1 files changed, 14 insertions, 20 deletions
diff --git a/php-guzzlehttp-psr7.spec b/php-guzzlehttp-psr7.spec
index 0889721..660c05a 100644
--- a/php-guzzlehttp-psr7.spec
+++ b/php-guzzlehttp-psr7.spec
@@ -43,7 +43,6 @@ URL: https://github.com/%{github_owner}/%{github_name}
Source0: %{name}-%{github_version}-%{github_commit}.tar.gz
Source1: %{name}-get-source.sh
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
# Tests
%if %{with_tests}
@@ -52,7 +51,7 @@ BuildRequires: php(language) >= %{php_min_ver}
BuildRequires: php-composer(phpunit/phpunit)
BuildRequires: php-composer(psr/http-message) < %{psr_http_message_max_ver}
BuildRequires: php-composer(psr/http-message) >= %{psr_http_message_min_ver}
-## phpcompatinfo (computed from version 1.4.1)
+## phpcompatinfo (computed from version 1.4.2)
BuildRequires: php-hash
BuildRequires: php-pcre
BuildRequires: php-reflection
@@ -66,7 +65,7 @@ BuildRequires: php-composer(fedora/autoloader)
Requires: php(language) >= %{php_min_ver}
Requires: php-composer(psr/http-message) < %{psr_http_message_max_ver}
Requires: php-composer(psr/http-message) >= %{psr_http_message_min_ver}
-# phpcompatinfo (computed from version 1.4.1)
+# phpcompatinfo (computed from version 1.4.2)
Requires: php-hash
Requires: php-pcre
Requires: php-spl
@@ -97,46 +96,37 @@ cat <<'AUTOLOAD' | tee src/autoload.php
require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('GuzzleHttp\\Psr7\\', __DIR__);
+require_once __DIR__.'/functions_include.php';
\Fedora\Autoloader\Dependencies::required([
- __DIR__.'/functions_include.php',
'%{phpdir}/Psr/Http/Message/autoload.php',
]);
AUTOLOAD
%install
-rm -rf %{buildroot}
-
mkdir -p %{buildroot}%{phpdir}/GuzzleHttp/Psr7
cp -rp src/* %{buildroot}%{phpdir}/GuzzleHttp/Psr7/
%check
%if %{with_tests}
-BOOTSTRAP=%{buildroot}%{phpdir}/GuzzleHttp/Psr7/autoload.php
-
: Upstream tests
-%{_bindir}/phpunit --verbose --bootstrap $BOOTSTRAP
-
-: Upstream tests with SCLs if available
-SCL_RETURN_CODE=0
-for SCL in %{?rhel:php55} php56 php70 php71; do
- if which $SCL; then
- $SCL %{_bindir}/phpunit --verbose --bootstrap $BOOTSTRAP || SCL_RETURN_CODE=1
+RETURN_CODE=0
+for PHP_EXEC in php %{?rhel:php55} php56 php70 php71; do
+ if [ "php" == "$PHP_EXEC" ] || which $PHP_EXEC; then
+ $PHP_EXEC %{_bindir}/phpunit --verbose \
+ --bootstrap %{buildroot}%{phpdir}/GuzzleHttp/Psr7/autoload.php \
+ || RETURN_CODE=1
fi
done
+exit $RETURN_CODE
%else
: Tests skipped
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md
@@ -146,6 +136,10 @@ rm -rf %{buildroot}
%changelog
+* Sat Apr 08 2017 Shawn Iwinski <shawn.iwinski@gmail.com> - 1.4.2-1
+- Updated to 1.4.2 (RHBZ #1434198)
+- Don't use autoloader to load functions include
+
* Wed Mar 22 2017 Remi Collet <remi@remirepo.net> - 1.4.2-1
- Update to 1.4.2