summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--composer.json23
-rw-r--r--php-rmccue-requests.spec24
3 files changed, 47 insertions, 4 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..91b0fd5
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../../common/Makefile
+
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..79744ce
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,23 @@
+{
+ "name": "rmccue/requests",
+ "description": "A HTTP library written in PHP, for human beings.",
+ "homepage": "http://github.com/rmccue/Requests",
+ "license": "ISC",
+ "keywords": ["http", "idna", "iri", "ipv6", "curl", "sockets", "fsockopen"],
+ "authors": [
+ {
+ "name": "Ryan McCue",
+ "homepage": "http://ryanmccue.info"
+ }
+ ],
+ "require": {
+ "php": ">=5.2"
+ },
+ "require-dev": {
+ "requests/test-server": "dev-master"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-0": {"Requests": "library/"}
+ }
+}
diff --git a/php-rmccue-requests.spec b/php-rmccue-requests.spec
index 8dc8e4a..379f39d 100644
--- a/php-rmccue-requests.spec
+++ b/php-rmccue-requests.spec
@@ -1,3 +1,12 @@
+# 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}
@@ -14,7 +23,7 @@ BuildRequires: php-composer(fedora/autoloader)
BuildRequires: php-fedora-autoloader-devel
BuildRequires: php-zip
BuildRequires: phpunit
-BuildRequires: procps-ng
+#BuildRequires: procps-ng
Requires: php(language) >= 5.5.0
Requires: php-composer(fedora/autoloader)
@@ -74,19 +83,22 @@ 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 \
+%{_bindir}/php -S 127.0.0.1:$port \
test-server-26334a7583c96ae1f966a5d88af9aafaf279f948/bin/serve.php &
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 bootstrap.php \
--filter \
^\(\(?!\(testHTTPS\|testAlternateNameSupport\|testSNISupport\|testAlternatePort\)\).\)*$ || \
(kill $PHPPID && exit 1)
@@ -96,6 +108,7 @@ kill $PHPPID
%files
+%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc CHANGELOG.md
%doc composer.json
@@ -106,6 +119,9 @@ kill $PHPPID
%changelog
+* 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.