diff options
Diffstat (limited to 'php-rmccue-requests.spec')
-rw-r--r-- | php-rmccue-requests.spec | 57 |
1 files changed, 44 insertions, 13 deletions
diff --git a/php-rmccue-requests.spec b/php-rmccue-requests.spec index 8dc8e4a..9b34256 100644 --- a/php-rmccue-requests.spec +++ b/php-rmccue-requests.spec @@ -1,20 +1,34 @@ +# remirepo spec file for php-rmccue-requests +# +# Fedora spec file for php-rmccue-requests +# +# License: MIT +# http://opensource.org/licenses/MIT +# +# Please preserve changelog entries +# Name: php-rmccue-requests -Version: 1.7.0 -Release: 2%{?dist} +Version: 1.8.0 +Release: 1%{?dist} BuildArch: noarch License: ISC and BSD Summary: Requests for PHP is a humble HTTP request library -URL: https://github.com/rmccue/Requests +URL: https://github.com/WordPress/Requests Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz +# Upstream strips docs, examples and tests from the tarball, +# so we have to generate it manually. +# dlothers.sh is used to do this, and is included in this repository. +Source1: docs-v%{version}.tar.bz2 +Source2: examples-v%{version}.tar.bz2 +Source3: tests-v%{version}.tar.bz2 # This is only needed to run the test suite. -Source1: https://github.com/RequestsPHP/test-server/archive/26334a7583c96ae1f966a5d88af9aafaf279f948/requests-tests-26334a75.tar.gz +Source4: requests-tests-26334a75.tar.gz BuildRequires: php-composer(fedora/autoloader) BuildRequires: php-fedora-autoloader-devel BuildRequires: php-zip BuildRequires: phpunit -BuildRequires: procps-ng Requires: php(language) >= 5.5.0 Requires: php-composer(fedora/autoloader) @@ -48,9 +62,12 @@ We all have better things to do. That's why Requests was born. %prep -%autosetup -n Requests-%{version} +%autosetup -n Requests-%{version} -p1 tar xvf %{S:1} +tar xvf %{S:2} +tar xvf %{S:3} +tar xvf %{S:4} # Remove the bundled CA list and use Fedora's rm library/Requests/Transport/cacert.pem @@ -74,28 +91,30 @@ cp -ar library/* %{buildroot}/%{_datadir}/php/rmccue/Requests sed -i "s:include.*:require('%{buildroot}/%{_datadir}/php/rmccue/Requests/autoload.php');:" \ tests/bootstrap.php -if [ "$(netstat -ln | grep 8080)" != "" ] +port=$(expr 8070 + %{?fedora}%{?rhel}) +: use port $port to allow parallel build + +if [ "$(netstat -ln | grep $port)" != "" ] then kill php fi -%{_bindir}/php -S 127.0.0.1:8080 \ - test-server-26334a7583c96ae1f966a5d88af9aafaf279f948/bin/serve.php & +%{_bindir}/php -S 127.0.0.1:$port \ + test-server-26334a7583c96ae1f966a5d88af9aafaf279f948/bin/serve.php >serve.log 2>&1 & PHPPID=$! -pushd tests # The request test server doesn't run over TLS so we skip HTTPS tests. The other tests fail if they # can't resolve domain names, so they are skipped as well. -REQUESTS_TEST_HOST="127.0.0.1:8080" phpunit --bootstrap bootstrap.php \ +REQUESTS_TEST_HOST="127.0.0.1:$port" phpunit --no-coverage --bootstrap tests/bootstrap.php \ --filter \ - ^\(\(?!\(testHTTPS\|testAlternateNameSupport\|testSNISupport\|testAlternatePort\)\).\)*$ || \ + ^\(\(?!\(testHTTPS\|testExpiredHTTPS\|testRevokedHTTPS\|testBadDomain\|testResponseByteLimit\|testResponseByteLimitWithFile\|testAlternateNameSupport\|testSNISupport\)\).\)*$ || \ (kill $PHPPID && exit 1) -popd kill $PHPPID %files +%{!?_licensedir:%global license %%doc} %license LICENSE %doc CHANGELOG.md %doc composer.json @@ -106,6 +125,18 @@ kill $PHPPID %changelog +* Wed May 12 2021 Sundeep Anand <suanand@redhat.com> - 1.8.0-1 +- Update to 1.8.0 (rhbz#1954316) +- Add dlothers.sh to download docs, examples and tests +- Drop php-rmccue-requests-pr297.patch + +* Mon Oct 23 2017 Remi Collet <remi@remirepo.net> - 1.7.0-4 +- fix FTBFS from Koschei, add path for recent PHPUnit + from https://github.com/rmccue/Requests/pull/297 + +* Thu Mar 9 2017 Remi Collet <remi@remirepo.net> - 1.7.0-2 +- backport for #remirepo + * Sun Mar 05 2017 Randy Barlow <bowlofeggs@fedoraproject.org> - 1.7.0-2 - Change license tag to ISC and BSD. - Use a better method for killing the test server. |