From 741369c241e9eafffbb80b7d7a4db1303c26b9ce Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 23 Jun 2017 15:31:31 +0200 Subject: add patch for 7.2 --- php-pecl-pq.spec | 112 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 75 insertions(+), 37 deletions(-) (limited to 'php-pecl-pq.spec') diff --git a/php-pecl-pq.spec b/php-pecl-pq.spec index 9de4d80..77886aa 100644 --- a/php-pecl-pq.spec +++ b/php-pecl-pq.spec @@ -7,17 +7,18 @@ # 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 %scl_package php-pecl-pq %endif -%global with_zts 0%{?__ztsphp:1} +%global gh_commit e381164032a750583657e449875f62d52b7b6609 +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner m6w6 +%global gh_project ext-pq +#global gh_date 20150819 +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name pq -#global rcver RC1 +#global prever RC1 %if %{?runselftest}%{!?runselftest:1} # Build using "--without tests" to disable tests %global with_tests 0%{!?_without_tests:1} @@ -35,20 +36,23 @@ Summary: PostgreSQL client library (libpq) binding Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 1.1.1 -%if 0%{?rcver:1} -Release: 0.1.%{rcver}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Version: 2.1.1 +%if 0%{?gh_date:1} +Release: 0.5.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz %else -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 5%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz %endif License: BSD Group: Development/Languages URL: http://pecl.php.net/package/%{pecl_name} -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?rcver}.tgz + +Patch0: %{pecl_name}-upstream.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: postgresql-devel > 9 -BuildRequires: %{?scl_prefix}php-devel > 5.4 +BuildRequires: %{?scl_prefix}php-devel > 7 BuildRequires: %{?scl_prefix}php-pear BuildRequires: %{?scl_prefix}php-json BuildRequires: %{?sub_prefix}php-pecl-raphf-devel >= 1.1.0 @@ -74,17 +78,21 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{rele %if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} # 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} +Obsoletes: php70u-pecl-%{pecl_name} <= %{version} +Obsoletes: php70w-pecl-%{pecl_name} <= %{version} +%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 @@ -111,19 +119,25 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -q -c -mv %{pecl_name}-%{version}%{?rcver} NTS +%if 0%{?ghdate} +mv %{gh_project}-%{gh_commit} NTS +mv NTS/package.xml . +%else +mv %{pecl_name}-%{version}%{?prever} NTS +%endif # Don't install tests -sed -e 's/role="test"/role="src"/' \ - %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ +sed -e '/role="test"/d' \ + %{?_licensedir: -e '/LICENSE/s/role="doc"/role="src"/' }\ -i package.xml cd NTS +%patch0 -p1 -b .upstream # Sanity check, really often broken extver=$(sed -n '/#define PHP_PQ_VERSION/{s/.* "//;s/".*$//;p}' php_pq.h) -if test "x${extver}" != "x%{version}%{?rcver}"; then - : Error: Upstream extension version is ${extver}, expecting %{version}%{?rcver}. +if test "x${extver}" != "x%{version}%{?prever}"; then + : Error: Upstream extension version is ${extver}, expecting %{version}%{?prever}. exit 1 fi cd .. @@ -281,10 +295,10 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) -%{?_licensedir:%license NTS/LICENSE} %doc %{pecl_docdir}/%{pecl_name} -%{pecl_xmldir}/%{name}.xml +%{?_licensedir:%license NTS/LICENSE} +%{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so @@ -295,29 +309,53 @@ rm -rf %{buildroot} %changelog -* Fri May 20 2016 Remi Collet - 1.1.1-1 -- update to 1.1.1 (php 5, stable) +* Fri Jun 23 2017 Remi Collet - 2.1.1-5 +- add upstream patch for 7.2 + +* Thu Dec 1 2016 Remi Collet - 2.1.1-4 +- rebuild with PHP 7.1.0 GA + +* Tue Nov 15 2016 Remi Collet - 2.1.1-3 +- add upstream patch for 7.1 + https://github.com/m6w6/ext-pq/issues/23 + +* Wed Sep 14 2016 Remi Collet - 2.1.1-2 +- rebuild for PHP 7.1 new API version + +* Fri May 20 2016 Remi Collet - 2.1.1-1 +- update to 2.1.1 (php 7, stable) - open https://github.com/m6w6/ext-pq/issues/19 failed tests so temporarily ignore them with pgsql < 9.3 -* Fri May 20 2016 Remi Collet - 1.1.0-1 -- update to 1.1.0 (php 5, stable) +* Fri May 20 2016 Remi Collet - 2.1.0-1 +- update to 2.1.0 (php 7, stable) - open https://github.com/m6w6/ext-pq/issues/18 pgsql < 9.3 -* Wed May 4 2016 Remi Collet - 1.0.1-1 -- update to 1.0.1 (php 5, stable) +* Wed May 4 2016 Remi Collet - 2.0.1-1 +- update to 2.0.1 (php 7, stable) -* Tue Mar 8 2016 Remi Collet - 1.0.0-3 +* Sun Mar 6 2016 Remi Collet - 2.0.0-2 - adapt for F24 -* Tue Jan 19 2016 Remi Collet - 1.0.0-1 -- Update to 1.0.0 (stable) +* Thu Jan 21 2016 Remi Collet - 2.0.0-1 +- Update to 2.0.0 (stable) + +* Mon Dec 7 2015 Remi Collet - 2.0.0-0.5.RC1 +- Update to 2.0.0RC1 (beta) +- sources from pecl tarball + +* Tue Oct 13 2015 Remi Collet - 2.0.0-0.4.20150819gite381164 +- rebuild for PHP 7.0.0RC5 new API version + +* Fri Sep 18 2015 Remi Collet - 2.0.0-0.3.20150819gite381164 +- F23 rebuild with rh_layout -* Mon Dec 7 2015 Remi Collet - 1.0.0-0.1.RC1 -- Update to 1.0.0RC1 (beta) +* Tue Aug 25 2015 Remi Collet - 2.0.0-0.2.20150819gite381164 +- really drop dependency on pear -* Sat Sep 5 2015 Remi Collet - 0.6.0-1 -- Update to 0.6.0 (beta) +* Tue Aug 25 2015 Remi Collet - 2.0.0-0.1.20150819gite381164 +- update to 2.0.0dev for PHP 7 +- sources from github * Wed Jul 29 2015 Remi Collet - 0.6.0-0.3.RC2 - allow build against rh-php56 (as more-php56) -- cgit