From 60957e364841bd307acd125878f9bd9952bf0261 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 3 Mar 2014 13:41:18 +0100 Subject: php-pecl-gearman: cleanups and rebuild --- php-pecl-gearman.spec | 134 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 89 insertions(+), 45 deletions(-) diff --git a/php-pecl-gearman.spec b/php-pecl-gearman.spec index 3c574ec..9e7e298 100644 --- a/php-pecl-gearman.spec +++ b/php-pecl-gearman.spec @@ -1,6 +1,19 @@ -%{!?__pecl: %{expand: %%global __pecl %{_bindir}/pecl}} +# spec file for php-pecl-gearman +# +# Copyright (c) 2011-2014 Remi Collet +# Copyright (c) 2011 Paul Whalen +# +# License: MIT +# http://opensource.org/licenses/MIT +# +# Please, preserve the changelog entries +# +%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d} +%{!?__pecl: %global __pecl %{_bindir}/pecl} +%{!?__php: %global __php %{_bindir}/php} %global pecl_name gearman +%global with_zts 0%{?__ztsphp:1} %if 0%{?fedora} >= 12 && 0%{?fedora} <= 15 %global extver 0.8.3 @@ -16,56 +29,66 @@ %endif -Name: php-pecl-gearman -Version: %{extver} -Release: 1%{?dist}.1 -Summary: PHP wrapper to libgearman +Name: php-pecl-gearman +Version: %{extver} +Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Summary: PHP wrapper to libgearman -Group: Development/Tools -License: PHP -URL: http://gearman.org -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Group: Development/Tools +License: PHP +URL: http://gearman.org +Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: libgearman-devel > %{libver} -BuildRequires: php-devel -BuildRequires: php-pear +BuildRequires: libgearman-devel > %{libver} +BuildRequires: php-devel +BuildRequires: php-pear # Required by phpize -BuildRequires: autoconf, automake, libtool +BuildRequires: autoconf, automake, libtool -Requires: php(zend-abi) = %{php_zend_api} -Requires: php(api) = %{php_core_api} -Requires(post): %{__pecl} +Requires: php(zend-abi) = %{php_zend_api} +Requires: php(api) = %{php_core_api} +Requires(post): %{__pecl} Requires(postun): %{__pecl} -Provides: php-%{pecl_name} = %{version} -Provides: php-%{pecl_name}%{?_isa} = %{version} -Provides: php-pecl(%{pecl_name}) = %{version} -Provides: php-pecl(%{pecl_name})%{?_isa} = %{version} +Provides: php-%{pecl_name} = %{version} +Provides: php-%{pecl_name}%{?_isa} = %{version} +Provides: php-pecl(%{pecl_name}) = %{version} +Provides: php-pecl(%{pecl_name})%{?_isa} = %{version} # Other third party repo stuff -Obsoletes: php53-pecl-%{pecl_name} -Obsoletes: php53u-pecl-%{pecl_name} -Obsoletes: php54-pecl-%{pecl_name} +Obsoletes: php53-pecl-%{pecl_name} +Obsoletes: php53u-pecl-%{pecl_name} +%if "%{php_version}" > "5.4" +Obsoletes: php54-pecl-%{pecl_name} +%endif %if "%{php_version}" > "5.5" -Obsoletes: php55u-pecl-%{pecl_name} +Obsoletes: php55u-pecl-%{pecl_name} +%endif +%if "%{php_version}" > "5.6" +Obsoletes: php56u-pecl-%{pecl_name} %endif -# Filter private shared +%if 0%{?fedora} < 20 +# Filter shared private %{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} %{?filter_setup} +%endif %description This extension uses libgearman library to provide API for communicating with gearmand, and writing clients and workers +Documentation: http://php.net/gearman + %prep %setup -q -c +mv %{pecl_name}-%{version} NTS -extver=$(sed -n '/#define PHP_GEARMAN_VERSION/{s/.* "//;s/".*$//;p}' %{pecl_name}-%{version}/php_gearman.h) +extver=$(sed -n '/#define PHP_GEARMAN_VERSION/{s/.* "//;s/".*$//;p}' NTS/php_gearman.h) if test "x${extver}" != "x%{version}"; then : Error: Upstream version is ${extver}, expecting %{version}. exit 1 @@ -76,51 +99,64 @@ cat >%{pecl_name}.ini < - 1.1.2-2 +- cleanups +- install documentation in pecl_docdir +- install tests in pecl_testdir + * Thu Aug 29 2013 Remi Collet - 1.1.2-1 - update to 1.1.2 -- cgit