summaryrefslogtreecommitdiffstats
path: root/php-pecl-oauth.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-oauth.spec')
-rw-r--r--php-pecl-oauth.spec25
1 files changed, 24 insertions, 1 deletions
diff --git a/php-pecl-oauth.spec b/php-pecl-oauth.spec
index 38177bc..9668831 100644
--- a/php-pecl-oauth.spec
+++ b/php-pecl-oauth.spec
@@ -8,6 +8,9 @@
#
# Please, preserve the changelog entries
#
+
+%bcond_without tests
+
%if 0%{?scl:1}
%global sub_prefix %{scl_prefix}
%scl_package php-pecl-oauth
@@ -19,12 +22,14 @@
Name: %{?sub_prefix}php-pecl-oauth
Version: 2.0.6
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Summary: PHP OAuth consumer extension
License: BSD
URL: https://pecl.php.net/package/oauth
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Patch0: https://patch-diff.githubusercontent.com/raw/php/pecl-web_services-oauth/pull/16.patch
+
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7
BuildRequires: %{?scl_prefix}php-pear
@@ -92,6 +97,8 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
+%patch0 -p1 -b .pr
+
#sed -e '/PHP_OAUTH_VERSION/s/2.0.3-dev/2.0.3/' -i php_oauth.h
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_OAUTH_VERSION/{s/.* //;s/".*$//;p}' php_oauth.h)
@@ -177,11 +184,22 @@ fi
-d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep OAuth
+%if %{with tests}
+cd NTS
+: Upstream test suite for NTS extension
+TEST_PHP_EXECUTABLE=%{__php} \
+TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
+NO_INTERACTION=1 \
+REPORT_EXIT_STATUS=1 \
+%{__php} -n run-tests.php --show-diff
+%endif
+
%if %{with_zts}
: Minimal load test for ZTS extension
%{__ztsphp} -n \
-d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
--modules | grep OAuth
+
%endif
@@ -200,6 +218,11 @@ fi
%changelog
+* Thu Sep 10 2020 Remi Collet <remi@remirepo.net> - 2.0.6-2
+- add fix for PHP 8 from
+ https://github.com/php/pecl-web_services-oauth/pull/16
+- enable test suite
+
* Wed Sep 9 2020 Remi Collet <remi@remirepo.net> - 2.0.6-1
- update to 2.0.6