%define pecl_name ssh2 %global ini_name 40-%{pecl_name}.ini %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} Name: php-pecl-ssh2 Version: 1.3.1 Release: 6%{?dist} Summary: Bindings for the libssh2 library License: PHP URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz BuildRequires: make BuildRequires: gcc BuildRequires: libssh2-devel >= 1.2 BuildRequires: php-devel >= 7.0 BuildRequires: php-pear Provides: php-%{pecl_name} = %{version} Provides: php-%{pecl_name}%{?_isa} = %{version} Provides: php-pecl(%{pecl_name}) = %{version} Provides: php-pecl(%{pecl_name})%{?_isa} = %{version} Requires: php(zend-abi) = %{php_zend_api} Requires: php(api) = %{php_core_api} %description Bindings to the libssh2 library which provide access to resources (shell, remote exec, tunneling, file transfer) on a remote machine using a secure cryptographic transport. Documentation: http://php.net/ssh2 %prep %setup -c -q mv %{pecl_name}-%{version} NTS # Don't install/register tests sed -e 's/role="test"/role="src"/' \ -e '/LICENSE/s/role="doc"/role="src"/' \ -i package.xml cd NTS extver=$(sed -n '/#define PHP_SSH2_VERSION/{s/.*\t"//;s/".*$//;p}' php_ssh2.h) if test "x${extver}" != "x%{version}"; then : Error: Upstream version is now ${extver}, expecting %{version}. : Update the pdover macro and rebuild. exit 1 fi cd .. cat > %{ini_name} << 'EOF' ; Enable %{pecl_name} extension module extension=%{pecl_name}.so EOF %if %{with_zts} : Duplicate source tree for NTS / ZTS build cp -pr NTS ZTS %endif %build cd NTS %{_bindir}/phpize %configure --with-php-config=%{_bindir}/php-config make %{?_smp_mflags} %if %{with_zts} cd ../ZTS %{_bindir}/zts-phpize %configure --with-php-config=%{_bindir}/zts-php-config make %{?_smp_mflags} %endif %install make -C NTS install INSTALL_ROOT=%{buildroot} # 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} %if %{with_zts} make -C ZTS install INSTALL_ROOT=%{buildroot} install -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # 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 done %check : Minimal load test for NTS extension %{__php} --no-php-ini \ --define extension_dir=%{buildroot}%{php_extdir} \ --define extension=%{pecl_name}.so \ --modules | grep %{pecl_name} %if %{with_zts} : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ --define extension_dir=%{buildroot}%{php_ztsextdir} \ --define extension=%{pecl_name}.so \ --modules | grep %{pecl_name} %endif %files %license NTS/LICENSE %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml %config(noreplace) %{_sysconfdir}/php.d/%{ini_name} %{php_extdir}/%{pecl_name}.so %if %{with_zts} %config(noreplace) %{php_ztsinidir}/%{ini_name} %{php_ztsextdir}/%{pecl_name}.so %endif %changelog * Wed Oct 05 2022 Remi Collet - 1.3.1-6 - rebuild for https://fedoraproject.org/wiki/Changes/php82 * Fri Jul 22 2022 Fedora Release Engineering - 1.3.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Fri Jan 21 2022 Fedora Release Engineering - 1.3.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Oct 28 2021 Remi Collet - 1.3.1-3 - rebuild for https://fedoraproject.org/wiki/Changes/php81 * Fri Jul 23 2021 Fedora Release Engineering - 1.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Thu Mar 4 2021 Remi Collet - 1.3.1-1 - Update to 1.3.1 * Wed Jan 27 2021 Fedora Release Engineering - 1.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Tue Jul 28 2020 Fedora Release Engineering - 1.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Thu Jan 30 2020 Fedora Release Engineering - 1.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Oct 03 2019 Remi Collet - 1.2-2 - rebuild for https://fedoraproject.org/wiki/Changes/php74 * Wed Sep 18 2019 Remi Collet - 1.2-1 - Update to 1.2 * Fri Jul 26 2019 Fedora Release Engineering - 1.1.2-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sat Feb 02 2019 Fedora Release Engineering - 1.1.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Thu Oct 11 2018 Remi Collet - 1.1.2-5 - Rebuild for https://fedoraproject.org/wiki/Changes/php73 - add upstream patches for 7.3 * Fri Jul 13 2018 Fedora Release Engineering - 1.1.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Fri Feb 09 2018 Fedora Release Engineering - 1.1.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Tue Oct 03 2017 Remi Collet - 1.1.2-2 - rebuild for https://fedoraproject.org/wiki/Changes/php72 * Thu Aug 3 2017 Remi Collet - 1.1.2-1 - Update to 1.1 (alpha) - no change - drop RPM specific README file - add link to documentation in package description - add ZTS extension * Thu Aug 03 2017 Fedora Release Engineering - 1.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Wed Jun 14 2017 Remi Collet - 1.1-1 - Update to 1.1 (alpha) - drop patch merged upstream * Sat Feb 11 2017 Fedora Release Engineering - 1.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Nov 14 2016 Remi Collet - 1.0-3 - rebuild for https://fedoraproject.org/wiki/Changes/php71 * Thu Nov 10 2016 Remi Collet - 1.0-2 - add patch for parse_url change in PHP 7.0.13 * Mon Jun 27 2016 Remi Collet - 1.0-1 - update to 1.0 - rebuild for https://fedoraproject.org/wiki/Changes/php70 - spec cleanup * Thu Feb 25 2016 Remi Collet - 0.12-8 - drop scriptlets (replaced by file triggers in php-pear) #1310546 * Thu Feb 04 2016 Fedora Release Engineering - 0.12-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Jun 18 2015 Fedora Release Engineering - 0.12-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sun Aug 17 2014 Fedora Release Engineering - 0.12-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Thu Jun 19 2014 Remi Collet - 1.2.0-4 - rebuild for https://fedoraproject.org/wiki/Changes/Php56 - add numerical prefix to extension configuration file * Sat Jun 07 2014 Fedora Release Engineering - 0.12-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Aug 04 2013 Fedora Release Engineering - 0.12-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Fri Mar 22 2013 Remi Collet - 0.12-1 - update to 0.12 - rebuild for http://fedoraproject.org/wiki/Features/Php55 * Thu Feb 14 2013 Fedora Release Engineering - 0.11.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sat Jul 21 2012 Fedora Release Engineering - 0.11.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Thu Jan 19 2012 Remi Collet - 0.11.3-1 - update to 0.11.3 for php 5.4 - add filter to fix private-shared-object-provides - add %%check for php extension * Sat Jan 14 2012 Fedora Release Engineering - 0.11.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Wed Feb 09 2011 Fedora Release Engineering - 0.11.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Thu Jan 14 2010 Chris Weyl 0.11.0-6 - bump for libssh2 rebuild * Mon Sep 21 2009 Chris Weyl - 0.11.0-5 - rebuild for libssh2 1.2 * Sun Jul 26 2009 Fedora Release Engineering - 0.11.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Sun Jul 12 2009 Remi Collet - 0.11.0-3 - add ssh2-php53.patch - rebuild for new PHP 5.3.0 ABI (20090626) * Thu Feb 26 2009 Fedora Release Engineering - 0.11.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Sat Dec 20 2008 Itamar Reis Peixoto 0.11.0-1 - convert package.xml to V2 format, update to 0.11.0 #BZ 476405 * Sat Nov 15 2008 Itamar Reis Peixoto 0.10-2 - Install pecl xml, license and readme files * Wed Jul 16 2008 Itamar Reis Peixoto 0.10-1 - Initial release