summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-08-26 10:54:59 +0200
committerRemi Collet <fedora@famillecollet.com>2014-08-26 10:54:59 +0200
commitd40d8a4fb5fbb143bc7b41a4397bcb0e662fc980 (patch)
tree1b63fc6e6d3195778bf9c09e2ace7d79a27a68c1
parent6ef21cd4bfd4b2a733c6943d985c9b16fe43c1b0 (diff)
php-pecl-* improve SCL build for 5.6 (done)
-rw-r--r--php-pecl-varnish.spec46
1 files changed, 33 insertions, 13 deletions
diff --git a/php-pecl-varnish.spec b/php-pecl-varnish.spec
index 57dfe0f..fa22602 100644
--- a/php-pecl-varnish.spec
+++ b/php-pecl-varnish.spec
@@ -6,6 +6,7 @@
#
# Please, preserve the changelog entries
#
+%{?scl: %scl_package php-pecl-varnish}
%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d}
%{!?__pecl: %global __pecl %{_bindir}/pecl}
%{!?__php: %global __php %{_bindir}/php}
@@ -20,18 +21,18 @@
%endif
Summary: Varnish Cache bindings
-Name: php-pecl-%{pecl_name}
+Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 1.1.1
-Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Release: 3%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: BSD
Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: php-devel > 5.3
-BuildRequires: php-pear
-BuildRequires: php-hash
+BuildRequires: %{?scl_prefix}php-devel > 5.3
+BuildRequires: %{?scl_prefix}php-pear
+BuildRequires: %{?scl_prefix}php-hash
BuildRequires: varnish-libs-devel > 3
# For tests
%if %{with_tests}
@@ -40,14 +41,30 @@ BuildRequires: varnish
Requires(post): %{__pecl}
Requires(postun): %{__pecl}
-Requires: php(zend-abi) = %{php_zend_api}
-Requires: php(api) = %{php_core_api}
-Requires: php-hash%{?_isa}
-
-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: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
+Requires: %{?scl_prefix}php(api) = %{php_core_api}
+Requires: %{?scl_prefix}php-hash%{?_isa}
+
+Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
+Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
+Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
+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} <= %{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} <= %{version}
+Obsoletes: php55w-pecl-%{pecl_name} <= %{version}
+%endif
+%if "%{php_version}" > "5.6"
+Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
+%endif
+%endif
%if 0%{?fedora} < 20 && 0%{?rhel} < 7
# Filter shared private
@@ -244,6 +261,9 @@ rm -rf %{buildroot}
%changelog
+* Tue Aug 26 2014 Remi Collet <rcollet@redhat.com> - 1.1.1-3
+- allow SCL build
+
* Thu Apr 17 2014 Remi Collet <remi@fedoraproject.org> - 1.1.1-2
- add numerical prefix to extension configuration file (php 5.6)