summaryrefslogtreecommitdiffstats
path: root/php-pecl-request.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-04-08 15:24:20 +0200
committerRemi Collet <remi@remirepo.net>2020-04-08 15:24:20 +0200
commit1801d324e95dca425a850088c8489ce626da1f92 (patch)
tree31bac9cfea16ef4a79c11563ee60b11c40d4574d /php-pecl-request.spec
parent403b1d90e1be7f14175baf1ddd48e186341fb2f2 (diff)
update to 2.0.0HEADmaster
raise dependency on PHP 7.3 add devel sub-package
Diffstat (limited to 'php-pecl-request.spec')
-rw-r--r--php-pecl-request.spec90
1 files changed, 59 insertions, 31 deletions
diff --git a/php-pecl-request.spec b/php-pecl-request.spec
index 0d8fdeb..9ebb8c4 100644
--- a/php-pecl-request.spec
+++ b/php-pecl-request.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-request
#
-# Copyright (c) 2016-2019 Remi Collet
+# Copyright (c) 2016-2020 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -14,21 +14,18 @@
%global pecl_name request
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
-%global prever b2
+#global prever b2
Summary: Server-side request and response objects
Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 1.0.0
-Release: 0.11.%{prever}%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Version: 2.0.0
+Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: PHP
-URL: http://pecl.php.net/package/%{pecl_name}
-Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
-
-Patch0: https://patch-diff.githubusercontent.com/raw/pmjones/ext-request/pull/12.patch
-Patch1: https://patch-diff.githubusercontent.com/raw/pmjones/ext-request/pull/14.patch
+URL: https://pecl.php.net/package/%{pecl_name}
+Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel > 7
+BuildRequires: %{?scl_prefix}php-devel > 7.3
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-json
@@ -54,20 +51,16 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{rele
%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
-Obsoletes: php70u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php70w-pecl-%{pecl_name} <= %{version}
-%if "%{php_version}" > "7.1"
-Obsoletes: php71u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php71w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.2"
Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
-%endif
%if "%{php_version}" > "7.3"
Obsoletes: php73-pecl-%{pecl_name} <= %{version}
Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
%endif
+%if "%{php_version}" > "7.4"
+Obsoletes: php74-pecl-%{pecl_name} <= %{version}
+Obsoletes: php74w-pecl-%{pecl_name} <= %{version}
+%endif
%endif
%if 0%{?fedora} < 20 && 0%{?rhel} < 7
@@ -79,25 +72,36 @@ Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
%description
This extension provides server-side request and response objects for PHP.
-These are *not* HTTP message objects proper. They are more like wrappers
-for existing global PHP variables and functions, with some limited
-additional convenience functionality.
-This extension defines two classes in the global namespace:
+These are *not* HTTP message objects proper. They are more like wrappers
+for existing global PHP variables and functions.
-- ServerRequest, composed of read-only copies of PHP superglobals and some
- other commonly-used values, with methods for adding application-specific
- request information in immutable fashion.
+Four classes and one interface are defined in the global namespace:
-- ServerResponse, essentially a wrapper around (and buffer for) response-
- related PHP functions, with some additional convenience methods, and self-
- sending capability.
+- SapiRequest, composed of read-only copies of PHP superglobals and
+ some other commonly-used values.
+- SapiUpload, a value-object style descriptor of each uploaded file.
+- SapiResponse and SapiResponseInterface, essentially a wrapper around
+ (and buffer for) response-related PHP functions.
+- SapiResponseSender, for sending a SapiResponse.
Documentation: https://gitlab.com/pmjones/phprequest
Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
+%package devel
+Summary: %{name} developer files (header)
+Group: Development/Libraries
+Requires: %{name}%{?_isa} = %{version}-%{release}
+Requires: %{?scl_prefix}php-devel%{?_isa}
+Provides: %{?scl_prefix}php-pecl-%{pecl_name}-devel = %{version}-%{release}
+Provides: %{?scl_prefix}php-pecl-%{pecl_name}-devel%{?_isa} = %{version}-%{release}
+
+%description devel
+These are the files needed to compile programs using %{name}.
+
+
%prep
%setup -q -c
mv %{pecl_name}-%{version}%{?prever} NTS
@@ -108,9 +112,6 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
-%patch0 -p1 -b .pr12
-%patch1 -p1 -b .pr14
-
# Sanity check, really often broken
extver=$(sed -n '/define PHP_REQUEST_VERSION/{s/.* "//;s/".*$//;p}' php_request.h)
if test "x${extver}" != "x%{version}%{?prever}"; then
@@ -178,6 +179,9 @@ for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
+mkdir -p %{buildroot}%{pecl_testdir}/%{pecl_name}
+cp -pr tests %{buildroot}%{pecl_testdir}/%{pecl_name}/tests
+
%if 0%{?fedora} < 24 && 0%{?rhel} < 8
# when pear installed alone, after us
@@ -200,6 +204,12 @@ fi
%check
+# CGI tests
+find ?TS/tests \
+ -name \*.phpt \
+ -exec grep -qE '^--(POST_RAW|CGI)--$' {} \; \
+ -delete
+
: Minimal load test for NTS extension
cd NTS
%{_bindir}/php --no-php-ini \
@@ -217,6 +227,11 @@ REPORT_EXIT_STATUS=1 \
%if %{with_zts}
: Minimal load test for ZTS extension
cd ../ZTS
+# failing for ZTS
+rm tests/request/cookie.phpt
+rm tests/request/input.phpt
+rm tests/request/query.phpt
+rm tests/request/variables_order.phpt
%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
@@ -244,8 +259,21 @@ REPORT_EXIT_STATUS=1 \
%{php_ztsextdir}/%{pecl_name}.so
%endif
+%files devel
+%doc %{pecl_testdir}/%{pecl_name}
+%{php_incldir}/ext/%{pecl_name}
+
+%if %{with_zts}
+%{php_ztsincldir}/ext/%{pecl_name}
+%endif
+
%changelog
+* Wed Apr 8 2020 Remi Collet <remi@remirepo.net> - 2.0.0-1
+- update to 2.0.0
+- raise dependency on PHP 7.3
+- add devel sub-package
+
* Tue Aug 27 2019 Remi Collet <remi@remirepo.net> - 1.0.0-0.11.b2
- add build dependency on php-json