diff options
Diffstat (limited to 'php-pecl-gearman.spec')
-rw-r--r-- | php-pecl-gearman.spec | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/php-pecl-gearman.spec b/php-pecl-gearman.spec index ec47d3a..8da46ec 100644 --- a/php-pecl-gearman.spec +++ b/php-pecl-gearman.spec @@ -21,19 +21,22 @@ %global ini_name 40-%{pecl_name}.ini %endif +%bcond_without tests + %global extver 2.1.0 %global libver 1.1.0 - Name: %{?sub_prefix}php-pecl-gearman Version: %{extver} -Release: 3%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release: 5%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} Summary: PHP wrapper to libgearman License: PHP URL: https://pecl.php.net/package/gearman Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Patch0: %{pecl_name}-php81.patch + BuildRequires: libgearman-devel > %{libver} BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -70,6 +73,9 @@ Obsoletes: php74-pecl-%{pecl_name} <= %{version} %if "%{php_version}" > "8.0" Obsoletes: php80-pecl-%{pecl_name} <= %{version} %endif +%if "%{php_version}" > "8.1" +Obsoletes: php81-pecl-%{pecl_name} <= %{version} +%endif %endif @@ -92,11 +98,15 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml -extver=$(sed -n '/#define PHP_GEARMAN_VERSION/{s/.* "//;s/".*$//;p}' NTS/php_gearman.h) +pushd NTS +%patch0 -p1 + +extver=$(sed -n '/#define PHP_GEARMAN_VERSION/{s/.* "//;s/".*$//;p}' php_gearman.h) if test "x${extver}" != "x%{version}"; then : Error: Upstream version is ${extver}, expecting %{version}. exit 1 fi +popd cat >%{ini_name} <<EOF ; enable %{pecl_name} extension @@ -154,6 +164,15 @@ done --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep '^%{pecl_name}$' +%if %{with tests} +: Upstream test suite for NTS extension +cd NTS +TEST_PHP_EXECUTABLE=%{__php} \ +TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ +REPORT_EXIT_STATUS=1 \ +%{__php} -n run-tests.php -q --offline --show-diff +%endif + %if %{with_zts} : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ @@ -197,6 +216,13 @@ fi %changelog +* Wed Sep 01 2021 Remi Collet <remi@remirepo.net> - 2.1.0-5 +- rebuild for 8.1.0RC1 + +* Fri Jun 11 2021 Remi Collet <remi@remirepo.net> - 2.1.0-4 +- add upstream patch for PHP 8.1 +- run test suite in %%check + * Fri Apr 30 2021 Remi Collet <remi@remirepo.net> - 2.1.0-3 - F34 rebuild for https://github.com/remicollet/remirepo/issues/174 |