added php7 subpackage [release 1.4-3mamba;Wed Feb 07 2024]

This commit is contained in:
Silvan Calarco 2024-02-09 19:53:46 +01:00
parent 9df5770794
commit 98356ca484

View File

@ -1,7 +1,8 @@
%define php_majver %(php-config --version | cut -d. -f1-2) %define php_majver %(php-config --version | cut -d. -f1-2)
%define php7_majver %(php-config7 --version | cut -d. -f1-2)
Name: php-ssh2 Name: php-ssh2
Version: 1.4 Version: 1.4
Release: 2mamba Release: 3mamba
Summary: PHP bindings for the libssh2 library Summary: PHP bindings for the libssh2 library
Group: Applications/Web Group: Applications/Web
Vendor: openmamba Vendor: openmamba
@ -15,33 +16,52 @@ BuildRequires: glibc-devel
BuildRequires: libssh2-devel BuildRequires: libssh2-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRequires: php-devel >= 8.3.1-1mamba BuildRequires: php-devel >= 8.3.1-1mamba
BuildRequires: php7-devel >= 7.4.33-4mamba
Requires: php >= %{php_majver} Requires: php >= %{php_majver}
Requires: php <= %{php_majver}.99 Requires: php <= %{php_majver}.99
%systemd_requires
%description %description
PHP bindings for the libssh2 library. 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 %debug_package
%prep %prep
%setup -q -n ssh2-%{version} %setup -q -n ssh2-%{version} -a0
mv ssh2-%{version} php7
%build %build
phpize phpize
%configure %configure
%make %make
cd php7
phpize7
%configure
%make
%install %install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall INSTALL_ROOT=%{buildroot} %makeinstall INSTALL_ROOT=%{buildroot}
install -d -m0755 %{buildroot}%{_sysconfdir}/php/php.d %makeinstall -C php7 INSTALL_ROOT=%{buildroot}
install -d -m0755 %{buildroot}%{_sysconfdir}/php{,7}/php.d
cat > %{buildroot}%{_sysconfdir}/php/php.d/ssh2.ini <<EOF cat > %{buildroot}%{_sysconfdir}/php/php.d/ssh2.ini <<EOF
; Enable ssh2 extension module ; Enable ssh2 extension module
extension=ssh2.so extension=ssh2.so
EOF EOF
cp %{buildroot}%{_sysconfdir}/php{,7}/php.d/ssh2.ini
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -63,7 +83,16 @@ fi
%{_libdir}/php/extensions/ssh2.so %{_libdir}/php/extensions/ssh2.so
%doc LICENSE %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 %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 * 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 - rebuilt by autoport with build requirements: php-devel>=8.3.1-1mamba