php-ssh2/php-ssh2.spec

122 lines
3.2 KiB
RPMSpec

%define php_majver %(php-config --version | cut -d. -f1-2)
%define php7_majver %(php-config7 --version | cut -d. -f1-2)
Name: php-ssh2
Version: 1.4
Release: 3mamba
Summary: PHP bindings for the libssh2 library
Group: Applications/Web
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://pecl.php.net/package/ssh2
Source: https://pecl.php.net/get/ssh2-%{version}.tgz
License: PHP License
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libssh2-devel
## AUTOBUILDREQ-END
BuildRequires: php-devel >= 8.3.1-1mamba
BuildRequires: php7-devel >= 7.4.33-4mamba
Requires: php >= %{php_majver}
Requires: php <= %{php_majver}.99
%description
PHP bindings for the libssh2 library.
%package -n php7-ssh2
Group: System/Libraries
Summary: PHP 7 bindings for the libssh2 library.
Requires: php7 >= %{php7_majver}
Requires: php7 <= %{php7_majver}.99
%description -n php7-ssh2
PHP 7 bindings for the libssh2 library.
%debug_package
%prep
%setup -q -n ssh2-%{version} -a0
mv ssh2-%{version} php7
%build
phpize
%configure
%make
cd php7
phpize7
%configure
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall INSTALL_ROOT=%{buildroot}
%makeinstall -C php7 INSTALL_ROOT=%{buildroot}
install -d -m0755 %{buildroot}%{_sysconfdir}/php{,7}/php.d
cat > %{buildroot}%{_sysconfdir}/php/php.d/ssh2.ini <<EOF
; Enable ssh2 extension module
extension=ssh2.so
EOF
cp %{buildroot}%{_sysconfdir}/php{,7}/php.d/ssh2.ini
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
if [ $1 -ge 1 ]; then
systemctl -q reload httpd
fi
:
%postun
if [ $1 -eq 0 ]; then
systemctl -q reload httpd
fi
:
%files
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/php/php.d/ssh2.ini
%{_libdir}/php/extensions/ssh2.so
%doc LICENSE
%files -n php7-ssh2
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/php7/php.d/ssh2.ini
%{_libdir}/php7/extensions/ssh2.so
%doc LICENSE
%changelog
* Wed Feb 07 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 1.4-3mamba
- added php7 subpackage
* Tue Jan 16 2024 Automatic Build System <autodist@mambasoft.it> 1.4-2mamba
- rebuilt by autoport with build requirements: php-devel>=8.3.1-1mamba
* Sun Apr 23 2023 Automatic Build System <autodist@mambasoft.it> 1.4-1mamba
- automatic version update by autodist
* Tue May 10 2022 Automatic Build System <autodist@mambasoft.it> 1.3.1-1mamba
- automatic version update by autodist
* Sun May 31 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 1.2-1mamba
- update to 1.2
* Wed Feb 20 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 1.1.2.20190220git-1mamba
- update to 1.1.2.20190220git
* Wed Feb 20 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 0.12.20190220git-1mamba
- update to 0.12.20190220git
* Wed Jan 27 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.12.20160127-1mamba
- update to 0.12.20160127
* Sat Feb 21 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 0.12-2mamba
- path to fix crash with sftp/wordpress (https://bugs.launchpad.net/ubuntu/+source/php-ssh2/+bug/1407377)
* Fri Jan 30 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 0.12-1mamba
- package created using the webbuild interface