summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-pecl-ssh2.spec32
1 files changed, 23 insertions, 9 deletions
diff --git a/php-pecl-ssh2.spec b/php-pecl-ssh2.spec
index 327fd3f..f0fe580 100644
--- a/php-pecl-ssh2.spec
+++ b/php-pecl-ssh2.spec
@@ -21,9 +21,11 @@
Name: %{?scl_prefix}php-pecl-ssh2
Version: 0.12
-Release: 4%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Release: 5%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
Summary: Bindings for the libssh2 library
+%global buildver %(pkg-config --silence-errors --modversion libssh2 2>/dev/null || echo 65536)
+
License: PHP
Group: Development/Languages
URL: http://pecl.php.net/package/ssh2
@@ -34,11 +36,16 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libssh2-devel >= 1.2
BuildRequires: %{?scl_prefix}php-devel
BuildRequires: %{?scl_prefix}php-pear
+# needed to use pkg-config (for buildver)
+BuildRequires: openssl-devel
+BuildRequires: pkgconfig
Requires(post): %{__pecl}
Requires(postun): %{__pecl}
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
+Requires: libssh2%{?_isa} >= %{buildver}
+%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
@@ -47,17 +54,17 @@ Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1}
# Other third party repo stuff
-Obsoletes: php53-pecl-%{pecl_name}
-Obsoletes: php53u-pecl-%{pecl_name}
-Obsoletes: php54-pecl-%{pecl_name}
-Obsoletes: php54w-pecl-%{pecl_name}
+Obsoletes: php53-pecl-%{pecl_name} <= %{version}
+Obsoletes: php53u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php54-pecl-%{pecl_name} <= %{version}
+Obsoletes: php54w-pecl-%{pecl_name} <= %{version}
%if "%{php_version}" > "5.5"
-Obsoletes: php55u-pecl-%{pecl_name}
-Obsoletes: php55w-pecl-%{pecl_name}
+Obsoletes: php55u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php55w-pecl-%{pecl_name} <= %{version}
%endif
%if "%{php_version}" > "5.6"
-Obsoletes: php56u-pecl-%{pecl_name}
-Obsoletes: php56w-pecl-%{pecl_name}
+Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
%endif
%endif
@@ -75,6 +82,8 @@ a secure cryptographic transport.
Documentation: http://php.net/ssh2
+Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection}.
+
%prep
%setup -c -q
@@ -176,6 +185,7 @@ rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
+%{?_licensedir:%license NTS/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/ssh2.so
@@ -188,6 +198,10 @@ rm -rf %{buildroot}
%changelog
+* Sat Dec 20 2014 Remi Collet <remi@fedoraproject.org> - 0.12-5
+- rebuild for new libssh2 in EL-5
+- ensure dependency on libssh2 used at buildtime
+
* Mon Aug 25 2014 Remi Collet <rcollet@redhat.com> - 0.12-4
- improve SCL build