summaryrefslogtreecommitdiffstats
path: root/php-pecl-gearman.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-gearman.spec')
-rw-r--r--php-pecl-gearman.spec65
1 files changed, 51 insertions, 14 deletions
diff --git a/php-pecl-gearman.spec b/php-pecl-gearman.spec
index 408eb35..99aa84e 100644
--- a/php-pecl-gearman.spec
+++ b/php-pecl-gearman.spec
@@ -9,36 +9,37 @@
# Please, preserve the changelog entries
#
%if 0%{?scl:1}
-%if "%{scl}" == "rh-php56"
-%global sub_prefix more-php56-
-%else
-%global sub_prefix %{scl_prefix}
-%endif
+%global sub_prefix %{scl_prefix}
+%scl_package php-pecl-gearman
%endif
-%{?scl: %scl_package php-pecl-gearman}
-
-%global pecl_name gearman
-%global with_zts 0%{?__ztsphp:1}
+%global gh_commit 4cb9afcc9dc73a8dd8bcd481f9e8df25a09048fc
+%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
+%global gh_date 20161112
+%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
%if "%{php_version}" < "5.6"
%global ini_name %{pecl_name}.ini
%else
%global ini_name 40-%{pecl_name}.ini
%endif
-%global extver 1.1.2
+%global extver 2.0.3
%global libver 1.1.0
Name: %{?sub_prefix}php-pecl-gearman
Version: %{extver}
-Release: 8%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+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
+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
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -56,8 +57,10 @@ 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 "%{?scl_prefix}" != "%{?sub_prefix}"
Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
+%endif
%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
@@ -73,6 +76,18 @@ Obsoletes: php55w-pecl-%{pecl_name} <= %{version}
Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
%endif
+%if "%{php_version}" > "7.0"
+Obsoletes: php70u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php70w-pecl-%{pecl_name} <= %{version}
+%endif
+%if "%{php_version}" > "7.1"
+Obsoletes: php71u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php71w-pecl-%{pecl_name} <= %{version}
+%endif
+%if "%{php_version}" > "7.2"
+Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
+%endif
%endif
%if 0%{?fedora} < 20 && 0%{?rhel} < 7
@@ -93,13 +108,19 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%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"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
-mv %{pecl_name}-%{version} NTS
extver=$(sed -n '/#define PHP_GEARMAN_VERSION/{s/.* "//;s/".*$//;p}' NTS/php_gearman.h)
if test "x${extver}" != "x%{version}"; then
@@ -209,6 +230,22 @@ fi
%changelog
+* Tue Jul 18 2017 Remi Collet <remi@remirepo.net> - 2.0.3-2.7.0
+- rebuild for PHP 7.2.0beta1 new API
+
+* Mon Jan 16 2017 Remi Collet <remi@fedoraproject.org> - 2.0.3-1
+- update to 2.0.3
+
+* Thu Dec 1 2016 Remi Collet <remi@fedoraproject.org> - 2.0.2-2
+- rebuild with PHP 7.1.0 GA
+
+* Sat Nov 12 2016 Remi Collet <remi@fedoraproject.org> - 2.0.2-1
+- update to 2.0.2
+
+* Tue Sep 20 2016 Remi Collet <remi@fedoraproject.org> - 2.0.1-1
+- update to 2.0.1 for PHP 7
+- use sources from https://github.com/wcgallego/pecl-gearman fork
+
* Wed Mar 9 2016 Remi Collet <remi@fedoraproject.org> - 1.1.2-8
- adapt for F24