From e260d7ef5f88be450fca0f9a149d9344aa2aba52 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 27 Feb 2023 14:30:03 +0100 Subject: update to 0.1.1 open https://github.com/SeasX/SeasClick/issues/16 PHP 5.x broken build --- php-pecl-seasclick.spec | 82 ++++++++++++++++--------------------------------- 1 file changed, 26 insertions(+), 56 deletions(-) (limited to 'php-pecl-seasclick.spec') diff --git a/php-pecl-seasclick.spec b/php-pecl-seasclick.spec index d9ca34e..58293bf 100644 --- a/php-pecl-seasclick.spec +++ b/php-pecl-seasclick.spec @@ -1,24 +1,24 @@ # remirepo spec file for php-pecl-seasclick # -# Copyright (c) 2019-2020 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2019-2023 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %if 0%{?scl:1} -%global sub_prefix %{scl_prefix} %scl_package php-pecl-seasclick %else %global _root_libdir %{_libdir} %endif +# tests require a server +%bcond_with tests + %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global proj_name SeasClick %global pecl_name %{proj_name} %global lowername seasclick -# tests require a server -%global with_tests 0%{?_with_tests:1} %if "%{php_version}" < "5.6" %global ini_name %{pecl_name}.ini %else @@ -26,23 +26,18 @@ %endif Summary: An Yandex ClickHouse client driven extension for PHP -Name: %{?sub_prefix}php-pecl-%{lowername} -Version: 0.1.0 -Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -License: ASL 2.0 +Name: %{?scl_prefix}php-pecl-%{lowername} +Version: 0.1.1 +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +License: Apache-2.0 URL: https://pecl.php.net/package/%{proj_name} Source0: https://pecl.php.net/get/%{proj_name}-%{version}.tgz -Patch0: https://github.com/SeasX/SeasClick/commit/fe089abf1a34a1ae5575bd7cc8b9bfa9a6605e16.patch -Patch1: https://github.com/SeasX/SeasClick/commit/e05a2b595d32d2b9a210a6f6afbed490f2d23148.patch - -%if 0%{?rhel} == 6 -BuildRequires: devtoolset-6-toolchain -%else +BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?dtsprefix}gcc-c++ -%endif -BuildRequires: %{?scl_prefix}php-devel +# see https://github.com/SeasX/SeasClick/issues/16 +BuildRequires: %{?scl_prefix}php-devel >= 7.0 BuildRequires: %{?scl_prefix}php-pear Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} @@ -54,36 +49,6 @@ Provides: %{?scl_prefix}php-%{lowername} = %{version} Provides: %{?scl_prefix}php-%{lowername}%{?_isa} = %{version} Provides: %{?scl_prefix}php-pecl(%{proj_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{proj_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 "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -%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 -%if "%{php_version}" > "7.3" -Obsoletes: php73-pecl-%{pecl_name} <= %{version} -Obsoletes: php73w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.4" -Obsoletes: php74-pecl-%{pecl_name} <= %{version} -Obsoletes: php74w-pecl-%{pecl_name} <= %{version} -%endif -%endif - -%if 0%{?fedora} < 20 && 0%{?rhel} < 7 -# Filter shared private -%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} -%{?filter_setup} -%endif %description @@ -103,9 +68,6 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS -%patch0 -p1 -b .up0 -%patch1 -p1 -b .up1 - : Sanity check, really often broken extver=$(sed -n '/#define PHP_SEASCLICK_VERSION /{s/.* "//;s/".*$//;p}' php_SeasClick.h) if test "x${extver}" != "x%{version}"; then @@ -127,9 +89,6 @@ EOF %build -%if 0%{?rhel} == 6 -source /opt/rh/devtoolset-6/enable -%endif %{?dtsenable} cd NTS @@ -150,9 +109,6 @@ make %{?_smp_mflags} %install -%if 0%{?rhel} == 6 -source /opt/rh/devtoolset-6/enable -%endif %{?dtsenable} make -C NTS install INSTALL_ROOT=%{buildroot} @@ -183,6 +139,15 @@ cd NTS --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep -i %{pecl_name} +%if %{with tests} +: Upstream test suite for NTS extension +TEST_PHP_EXECUTABLE=%{__php} \ +TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ +NO_INTERACTION=1 \ +REPORT_EXIT_STATUS=1 \ +%{__php} -n run-tests.php --show-diff +%endif + %if %{with_zts} cd ../ZTS : Minimal load test for ZTS extension @@ -193,6 +158,7 @@ cd ../ZTS %endif + %if 0%{?fedora} < 24 && 0%{?rhel} < 8 # when pear installed alone, after us %triggerin -- %{?scl_prefix}php-pear @@ -228,6 +194,10 @@ fi %changelog +* Mon Feb 27 2023 Remi Collet - 0.1.1-1 +- update to 0.1.1 +- open https://github.com/SeasX/SeasClick/issues/16 PHP 5.x broken build + * Wed Aug 19 2020 Remi Collet - 0.1.0-4 - add upstream patch for GCC 10 -- cgit