From e3411434d3e1fb5e7d64a9bc8190106025a02201 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sep 20 2016 15:22:27 +0000 Subject: - update to 2.0.1 for PHP 7 - use sources from https://github.com/wcgallego/pecl-gearman fork - spec cleanup --- diff --git a/.gitignore b/.gitignore index 897b1d6..80784ce 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ clog /gearman-1.1.0.tgz /gearman-1.1.1.tgz /gearman-1.1.2.tgz +/gearman-2.0.1-f7ec3cf.tar.gz diff --git a/php-pecl-gearman.spec b/php-pecl-gearman.spec index 4c95d4b..46b0f8c 100644 --- a/php-pecl-gearman.spec +++ b/php-pecl-gearman.spec @@ -1,24 +1,30 @@ -%{!?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 "%{php_version}" < "5.6" -%global ini_name %{pecl_name}.ini -%else -%global ini_name 40-%{pecl_name}.ini -%endif +# Fedora spec file for php-pecl-gearman +# +# License: MIT +# http://opensource.org/licenses/MIT +# +# Please, preserve the changelog entries +# + +%global gh_commit f7ec3cf044f654a3db4c415658941898a6e4d42f +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_date 20160816 +%global gh_owner wcgallego +%global gh_project pecl-gearman +%global with_tests 0%{?_with_tests:1} +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} +%global pecl_name gearman +%global ini_name 40-%{pecl_name}.ini Name: php-pecl-gearman -Version: 1.1.2 -Release: 4%{?dist} +Version: 2.0.1 +Release: 1%{?dist} Summary: PHP wrapper to libgearman Group: Development/Tools License: PHP -URL: http://gearman.org -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +URL: https://github.com/%{gh_owner}/%{gh_project} +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}%{?prever}-%{gh_short}.tar.gz BuildRequires: libgearman-devel > 1.1.0 BuildRequires: php-devel @@ -28,22 +34,12 @@ BuildRequires: autoconf, automake, libtool Requires: php(zend-abi) = %{php_zend_api} Requires: php(api) = %{php_core_api} -%if 0%{?fedora} < 24 -Requires(post): %{__pecl} -Requires(postun): %{__pecl} -%endif Provides: php-%{pecl_name} = %{version} Provides: php-%{pecl_name}%{?_isa} = %{version} Provides: php-pecl(%{pecl_name}) = %{version} Provides: php-pecl(%{pecl_name})%{?_isa} = %{version} -%if 0%{?fedora} < 20 && 0%{?rhel} < 7 -# Filter shared private -%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} -%{?filter_setup} -%endif - %description This extension uses libgearman library to provide API for @@ -54,11 +50,18 @@ Documentation: http://php.net/gearman %prep %setup -q -c +mv %{gh_project}-%{gh_commit} NTS +%{__php} -r ' + $pkg = simplexml_load_file("NTS/package.xml"); + $pkg->date = substr("%{gh_date}",0,4)."-".substr("%{gh_date}",4,2)."-".substr("%{gh_date}",6,2); + $pkg->version->release = "%{version}"; + $pkg->asXML("package.xml"); +' # Dont register tests on install -sed -e 's/role="test"/role="src"/' -i package.xml - -mv %{pecl_name}-%{version} NTS +sed -e 's/role="test"/role="src"/' \ + %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ + -i package.xml # Upstream often forget to change this extver=$(sed -n '/#define PHP_GEARMAN_VERSION/{s/.* "//;s/".*$//;p}' NTS/php_gearman.h) @@ -125,19 +128,8 @@ done %endif -%if 0%{?fedora} < 24 -%post -%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : - -%postun -if [ $1 -eq 0 ] ; then - %{pecl_uninstall} %{pecl_name} >/dev/null || : -fi -%endif - - %files -%{?_licensedir:%license NTS/LICENSE} +%license NTS/LICENSE %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -151,6 +143,11 @@ fi %changelog +* Tue Sep 20 2016 Remi Collet - 2.0.1 +- update to 2.0.1 for PHP 7 +- use sources from https://github.com/wcgallego/pecl-gearman fork +- spec cleanup + * Wed Feb 10 2016 Remi Collet - 1.1.2-4 - F24: drop scriptlets (replaced by file triggers in php-pear) diff --git a/sources b/sources index 781d59b..2b64810 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -fb3bc8df2d017048726d5654459e8433 gearman-1.1.2.tgz +7ecda897400b974c7316bfbe23325fc6 gearman-2.0.1-f7ec3cf.tar.gz