summaryrefslogtreecommitdiffstats
path: root/php-pecl-ssh2.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2026-03-27 10:13:02 +0100
committerRemi Collet <remi@php.net>2026-03-27 10:13:02 +0100
commit4e5be76509cbe51aeba01bb873c5c0dcfdb9b305 (patch)
tree53e039e93ad19c27ee12de69e51547ebb8d32c40 /php-pecl-ssh2.spec
parent7ecdb2d12a3c78af27cb4f01ff8e0458eb4bbacc (diff)
drop pear/pecl dependencyHEADmaster
sources from github
Diffstat (limited to 'php-pecl-ssh2.spec')
-rw-r--r--php-pecl-ssh2.spec62
1 files changed, 23 insertions, 39 deletions
diff --git a/php-pecl-ssh2.spec b/php-pecl-ssh2.spec
index a049457..222ee94 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-2024 Remi Collet
+# Copyright (c) 2011-2026 Remi Collet
#
# Fedora spec file for php-pecl-ssh2
#
@@ -11,36 +11,31 @@
#
%{?scl:%scl_package php-pecl-ssh2}
-# See https://github.com/php/pecl-networking-ssh2/commits/master
-%global gh_commit 50d97a52c39166d59e59222a20e841f3f3ce594d
-%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
-#global gh_date 20160113
-%global gh_owner php
-%global gh_project pecl-networking-ssh2
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name ssh2
%global buildver %(pkg-config --silence-errors --modversion libssh2 2>/dev/null || echo 65536)
-%global sources %{pecl_name}-%{version}
+%global sources %{gh_proj}-%{version}
%global _configure ../%{sources}/configure
+# Github forge
+%global gh_vend php
+%global gh_proj pecl-networking-ssh2
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+%global tag %{version}
+
Name: %{?scl_prefix}php-pecl-ssh2
Summary: Bindings for the libssh2 library
+License: PHP-3.01
Version: 1.4.1
-%if 0%{?gh_date}
-Release: 0.12.%{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: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
-%endif
+Release: 4%{?dist}
+%forgemeta
+URL: %{forgeurl}
+Source0: %{forgesource}
-License: PHP-3.01
-URL: https://pecl.php.net/package/%{pecl_name}
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.0
-BuildRequires: %{?scl_prefix}php-pear
%if 0%{?vendeur:1} && 0%{?fedora} < 39 && 0%{?rhel} < 9
%global move_to_opt 1
BuildRequires: %{vendeur}-libssh2-devel >= 1.11
@@ -60,10 +55,13 @@ Requires: libssh2%{?_isa} >= %{buildver}
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
+# Extension
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
+# PECL
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
+# No PIE for now
%if %{move_to_opt}
%{?filter_requires_in: %filter_requires_in %{_libdir}/.*\.so$}
@@ -83,28 +81,14 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -c -q
-%if 0%{?gh_date}
-%{__php} -r '
- $pkg = simplexml_load_file("NTS/package.xml");
- $pkg->date = substr("%{gh_date}",0,4)."-".substr("%{gh_date}",4,2)."-".substr("%{gh_date}",6,2);
- $pkg->version->release = "%{version}dev";
- $pkg->stability->release = "devel";
- $pkg->asXML("package.xml");
-'
-%endif
-
-# Don't install/register tests
-sed -e 's/role="test"/role="src"/' \
- -e '/LICENSE/s/role="doc"/role="src"/' \
- -i package.xml
cd %{sources}
: fix lib usage
sed -e 's:SSH2_DIR/lib:SSH2_DIR/$PHP_LIBDIR:' -i config.m4
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}.
+if test "x${extver}" != "x%{version}"; then
+ : Error: Upstream version is now ${extver}, expecting %{version}.
: Update the pdover macro and rebuild.
exit 1
fi
@@ -157,9 +141,6 @@ cd ../ZTS
%make_install -C NTS
-# Install XML package description
-install -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
-
# install config file
install -Dpm644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
@@ -193,8 +174,7 @@ done
%files
%license %{sources}/LICENSE
-%doc %{pecl_docdir}/%{pecl_name}
-%{pecl_xmldir}/%{name}.xml
+%doc %{sources}/*.md
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
@@ -206,6 +186,10 @@ done
%changelog
+* Fri Mar 27 2026 Remi Collet <remi@remirepo.net> - 1.4.1-4
+- drop pear/pecl dependency
+- sources from github
+
* Thu Sep 25 2025 Remi Collet <remi@remirepo.net> - 1.4.1-3
- rebuild for PHP 8.5.0RC1