From 74a655216900967d84bd92b50ccf19d8a938bb8a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 10 Sep 2020 16:30:55 +0200 Subject: add fix for PHP 8 from https://github.com/php/pecl-networking-ssh2/pull/42 --- php-pecl-ssh2.spec | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) (limited to 'php-pecl-ssh2.spec') diff --git a/php-pecl-ssh2.spec b/php-pecl-ssh2.spec index 287b8f4..63787cf 100644 --- a/php-pecl-ssh2.spec +++ b/php-pecl-ssh2.spec @@ -1,7 +1,7 @@ # remirepo spec file for php-pecl-ssh2 # with SCL compatibility # -# Copyright (c) 2011-2019 Remi Collet +# Copyright (c) 2011-2020 Remi Collet # # Fedora spec file for php-pecl-ssh2 # @@ -23,22 +23,23 @@ %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name ssh2 %global ini_name 40-%{pecl_name}.ini +%global buildver %(pkg-config --silence-errors --modversion libssh2 2>/dev/null || echo 65536) Name: %{?sub_prefix}php-pecl-ssh2 +Summary: Bindings for the libssh2 library Version: 1.2 %if 0%{?gh_date} Release: 0.7.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}%{?prever}-%{gh_short}.tar.gz %else -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz %endif -Summary: Bindings for the libssh2 library -%global buildver %(pkg-config --silence-errors --modversion libssh2 2>/dev/null || echo 65536) +Patch0: https://patch-diff.githubusercontent.com/raw/php/pecl-networking-ssh2/pull/44.patch License: PHP -URL: http://pecl.php.net/package/%{pecl_name} +URL: https://pecl.php.net/package/%{pecl_name} BuildRequires: libssh2-devel >= 1.2 BuildRequires: %{?dtsprefix}gcc @@ -59,29 +60,23 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{rele Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} %endif -%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} +%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} # Other third party repo stuff Obsoletes: php53-pecl-%{pecl_name} <= %{version} Obsoletes: php53u-pecl-%{pecl_name} <= %{version} Obsoletes: php54-pecl-%{pecl_name} <= %{version} -Obsoletes: php55u-pecl-%{pecl_name} <= %{version} -Obsoletes: php55w-pecl-%{pecl_name} <= %{version} Obsoletes: php56u-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 +%if "%{php_version}" > "8.0" +Obsoletes: php80-pecl-%{pecl_name} <= %{version} %endif %endif @@ -123,6 +118,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +%patch0 -p1 -b .pr43 + extver=$(sed -n '/#define PHP_SSH2_VERSION/{s/.*\t"//;s/".*$//;p}' php_ssh2.h) if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then : Error: Upstream version is now ${extver}, expecting %{version}%{?gh_date:-dev}. @@ -235,6 +232,13 @@ fi %changelog +* Thu Sep 10 2020 Remi Collet - 1.2-3 +- add fix for PHP 8 from + https://github.com/php/pecl-networking-ssh2/pull/42 + +* Wed Mar 11 2020 Remi Collet - 1.2-2 +- rebuild + * Wed Sep 18 2019 Remi Collet - 1.2-1 - update to 1.2 -- cgit