X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=php-pecl-ssh2.spec;h=448ae2068edaadb5fbb7e8235d90ed2597cd523e;hb=4860b4fe747ae7d1c911dcb4af7ab677c6155db8;hp=b41e4c15b135b9fcef58444320a3945df156acf8;hpb=2903db35cdba233c5d34b5dab674509c2227eb33;p=packages%2Fphp-pecl-ssh2.git diff --git a/php-pecl-ssh2.spec b/php-pecl-ssh2.spec index b41e4c1..448ae20 100644 --- a/php-pecl-ssh2.spec +++ b/php-pecl-ssh2.spec @@ -1,65 +1,68 @@ -%define _modname ssh2 -%define _status beta - -Summary: %{_modname} - bindings for the libssh2 library -Summary(pl): %{_modname} - dowi±zania do biblioteki libssh2 -Name: php-pecl-%{_modname} -Version: 0.4.1 -Release: 1 +%define php_name php%{?php_suffix} +%define modname ssh2 +%define status beta +Summary: %{modname} - bindings for the libssh2 library +Summary(pl.UTF-8): %{modname} - dowiązania do biblioteki libssh2 +Name: %{php_name}-pecl-%{modname} +Version: 0.12 +Release: 4 License: PHP Group: Development/Languages/PHP -Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz -# Source0-md5: 7da1cc5249f7394edb06809183d13c10 +Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz +# Source0-md5: 409b91678a842bb0ff56f2cf018b9160 +Patch0: branch.diff URL: http://pecl.php.net/package/ssh2/ -BuildRequires: libssh2-devel >= 0.4 -BuildRequires: libtool +BuildRequires: %{php_name}-devel >= 4:5.0.4 +BuildRequires: libssh2-devel >= 1.2.9 BuildRequires: openssl-devel >= 0.9.7d -BuildRequires: php-devel >= 3:5.0.0 -Requires: php-common >= 3:5.0.0 -Obsoletes: php-pear-%{_modname} +BuildRequires: rpmbuild(macros) >= 1.650 +%{?requires_php_extension} +Provides: php(%{modname}) = %{version} BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define _sysconfdir /etc/php -%define extensionsdir %{_libdir}/php - %description Provides bindings to the functions of libssh2 which implements the SSH2 protocol. -In PECL status of this extension is: %{_status}. +In PECL status of this extension is: %{status}. -%description -l pl -Dostarcza dowi±zañ do ró¿nych funkcji biblioteki libssh2 -implementuj±cej protokó³ SSH2. +%description -l pl.UTF-8 +Dostarcza dowiązań do różnych funkcji biblioteki libssh2 +implementującej protokół SSH2. -To rozszerzenie ma w PECL status: %{_status}. +To rozszerzenie ma w PECL status: %{status}. %prep -%setup -q -c +%setup -qc +mv %{modname}-%{version}/* . +#%patch0 -p0 %build -cd %{_modname}-%{version} phpize %configure %{__make} %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{extensionsdir} - -install %{_modname}-%{version}/modules/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir} +install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}} +install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir} +cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini +; Enable %{modname} extension module +extension=%{modname}.so +EOF %clean rm -rf $RPM_BUILD_ROOT %post -%{_sbindir}/php-module-install install %{_modname} %{_sysconfdir}/php-cgi.ini +%php_webserver_restart -%preun -if [ "$1" = "0" ]; then - %{_sbindir}/php-module-install remove %{_modname} %{_sysconfdir}/php-cgi.ini +%postun +if [ "$1" = 0 ]; then + %php_webserver_restart fi %files %defattr(644,root,root,755) -%attr(755,root,root) %{extensionsdir}/%{_modname}.so +%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{modname}.ini +%attr(755,root,root) %{php_extensiondir}/%{modname}.so