summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-07-20 11:49:39 +0200
committerRemi Collet <remi@php.net>2023-07-20 11:49:39 +0200
commit5ec7c1bbe00220e8c5b31ffc97fc6f2c243ba5ff (patch)
tree0bb71c2c2baacfb5bde8765faa5b2678e352032d
parentb0a725ce9b9c9e079cec43f7d5f7f38e8f78628c (diff)
build out of sources tree
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-ssh2.spec34
2 files changed, 19 insertions, 17 deletions
diff --git a/REFLECTION b/REFLECTION
index 56976ff..3b78296 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #122 ssh2 version 1.4 ] {
+Extension [ <persistent> extension #124 ssh2 version 1.4 ] {
- Constants [21] {
Constant [ int SSH2_FINGERPRINT_MD5 ] { 0 }
diff --git a/php-pecl-ssh2.spec b/php-pecl-ssh2.spec
index 2eea3b9..c186724 100644
--- a/php-pecl-ssh2.spec
+++ b/php-pecl-ssh2.spec
@@ -20,6 +20,8 @@
%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 _configure ../%{sources}/configure
Name: %{?scl_prefix}php-pecl-ssh2
Summary: Bindings for the libssh2 library
@@ -28,7 +30,7 @@ Version: 1.4
Release: 0.9.%{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: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+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
@@ -55,10 +57,8 @@ Requires: libssh2%{?_isa} >= %{buildver}
%global ini_name 40-%{pecl_name}.ini
%endif
-
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
@@ -98,7 +98,6 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -c -q
%if 0%{?gh_date}
-mv %{gh_project}-%{gh_commit} NTS
%{__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);
@@ -106,8 +105,6 @@ mv %{gh_project}-%{gh_commit} NTS
$pkg->stability->release = "devel";
$pkg->asXML("package.xml");
'
-%else
-mv %{pecl_name}-%{version} NTS
%endif
# Don't install/register tests
@@ -115,7 +112,7 @@ sed -e 's/role="test"/role="src"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
-cd NTS
+cd %{sources}
: fix lib usage
sed -e 's:SSH2_DIR/lib:SSH2_DIR/$PHP_LIBDIR:' -i config.m4
@@ -132,33 +129,35 @@ cat > %{ini_name} << 'EOF'
extension=%{pecl_name}.so
EOF
+mkdir NTS
%if %{with_zts}
-: Duplicate source tree for NTS / ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
+
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
%configure \
%if %{move_to_opt}
--with-ssh2=/opt/%{vendeur}/libssh2 \
%endif
--with-libdir=%{_lib} \
- --with-php-config=%{_bindir}/php-config
+ --with-php-config=%{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
%if %{move_to_opt}
--with-ssh2=/opt/%{vendeur}/libssh2 \
%endif
--with-libdir=%{_lib} \
- --with-php-config=%{_bindir}/zts-php-config
+ --with-php-config=%{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -181,7 +180,7 @@ install -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
# Documentation
for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
+do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
@@ -226,7 +225,7 @@ fi
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -240,6 +239,9 @@ fi
%changelog
+* Thu Jul 20 2023 Remi Collet <remi@remirepo.net> - 1.4-3
+- build out of sources tree
+
* Tue May 2 2023 Remi Collet <remi@remirepo.net> - 1.4-2
- EL-7 and EL-8: rename 40-ssh2.ini to 19-ssh2.ini to ensure
ssh2 extension is loaded before curl extension