From b6111d70ed462e6e28f50cf9f9d5d129fa43afa4 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 20 Jul 2023 11:09:03 +0200 Subject: build out of sources tree --- php-pecl-gearman.spec | 76 ++++++++++++++++++++------------------------------- 1 file changed, 29 insertions(+), 47 deletions(-) (limited to 'php-pecl-gearman.spec') diff --git a/php-pecl-gearman.spec b/php-pecl-gearman.spec index 8da46ec..4674333 100644 --- a/php-pecl-gearman.spec +++ b/php-pecl-gearman.spec @@ -8,30 +8,25 @@ # # Please, preserve the changelog entries # -%if 0%{?scl:1} -%global sub_prefix %{scl_prefix} -%scl_package php-pecl-gearman -%endif +%{?scl:%scl_package php-pecl-gearman} %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 ini_name 40-%{pecl_name}.ini +%global sources %{pecl_name}-%{version} +%global _configure ../%{sources}/configure -%bcond_without tests +%bcond_without tests -%global extver 2.1.0 -%global libver 1.1.0 +%global extver 2.1.0 +%global libver 1.1.0 -Name: %{?sub_prefix}php-pecl-gearman +Name: %{?scl_prefix}php-pecl-gearman Version: %{extver} -Release: 5%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release: 6%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} Summary: PHP wrapper to libgearman -License: PHP +License: PHP-3.01 URL: https://pecl.php.net/package/gearman Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz @@ -48,34 +43,17 @@ BuildRequires: autoconf, automake, libtool Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} 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 "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} +%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} == 7 # Other third party repo stuff Obsoletes: php55w-pecl-%{pecl_name} <= %{version} Obsoletes: php56u-pecl-%{pecl_name} <= %{version} Obsoletes: php56w-pecl-%{pecl_name} <= %{version} -%if "%{php_version}" > "7.3" -Obsoletes: php73-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.4" -Obsoletes: php74-pecl-%{pecl_name} <= %{version} -%endif -%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 @@ -90,7 +68,6 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -q -c -mv %{pecl_name}-%{version} NTS # Dont register tests on install sed -e 's/role="test"/role="src"/' \ @@ -98,8 +75,8 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml -pushd NTS -%patch0 -p1 +pushd %{sources} +%patch -P0 -p1 extver=$(sed -n '/#define PHP_GEARMAN_VERSION/{s/.* "//;s/".*$//;p}' php_gearman.h) if test "x${extver}" != "x%{version}"; then @@ -113,25 +90,27 @@ cat >%{ini_name} < - 2.1.0-6 +- build out of sources tree + * Wed Sep 01 2021 Remi Collet - 2.1.0-5 - rebuild for 8.1.0RC1 -- cgit