diff options
Diffstat (limited to 'php-pecl-yaf.spec')
-rw-r--r-- | php-pecl-yaf.spec | 134 |
1 files changed, 79 insertions, 55 deletions
diff --git a/php-pecl-yaf.spec b/php-pecl-yaf.spec index fd4a34b..b03a56f 100644 --- a/php-pecl-yaf.spec +++ b/php-pecl-yaf.spec @@ -1,19 +1,15 @@ # remirepo spec file for php-pecl-yaf # -# Copyright (c) 2012-2021 Remi Collet +# Copyright (c) 2012-2024 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -# we don't want -z defs linker flag -%undefine _strict_symbol_defs_build +%{?scl:%scl_package php-pecl-yaf} -%if 0%{?scl:1} -%global sub_prefix %{scl_prefix} -%scl_package php-pecl-yaf -%endif +%bcond_without tests %global gh_commit 51e458e9746d7061efc565d49baaca26feacd7ff %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) @@ -23,21 +19,31 @@ %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name yaf %global ini_name 40-%{pecl_name}.ini +%if 0%{?gh_date:1} +%global sources %{gh_project}-%{gh_commit} +%else +%global sources %{pecl_name}-%{version} +%endif +%global _configure ../%{sources}/configure Summary: Yet Another Framework -Name: %{?sub_prefix}php-pecl-yaf -Version: 3.3.1 +Name: %{?scl_prefix}php-pecl-yaf +Version: 3.3.5 %if 0%{?gh_date:1} -Release: 0.12.%{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 +Release: 0.13.%{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}/%{sources}-%{gh_short}.tar.gz %else -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -Source: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz +Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Source: https://pecl.php.net/get/%{sources}%{?prever}.tgz %endif License: PHP URL: https://pecl.php.net/package/yaf Source1: %{pecl_name}.ini +Patch0: %{pecl_name}-php82.patch +Patch1: %{pecl_name}-php83.patch +Patch2: %{pecl_name}-php74.patch + BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.0 @@ -48,29 +54,11 @@ BuildRequires: %{?scl_prefix}php-json 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} -# Other third party repo stuff -%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 -%endif %description @@ -83,10 +71,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -qc %if 0%{?gh_date:1} -mv %{gh_project}-%{gh_commit} NTS -mv NTS/package.xml . -%else -mv %{pecl_name}-%{version} NTS +mv %{sources}/package.xml . %endif # Don't install/register tests @@ -94,7 +79,10 @@ sed -e 's/role="test"/role="src"/' \ %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ -i package.xml -cd NTS +cd %{sources} +%patch -P0 -p1 -b .php82 +%patch -P1 -p1 -b .php83 +%patch -P2 -p1 -b .php74 # Sanity check, really often broken extver=$(sed -n '/#define PHP_YAF_VERSION/{s/.*\t"//;s/".*$//;p}' php_yaf.h ) @@ -104,24 +92,25 @@ if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then fi cd .. +mkdir NTS %if %{with_zts} -# duplicate for ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif %build %{?dtsenable} -cd NTS -%{_bindir}/phpize -%configure --with-php-config=%{_bindir}/php-config +cd %{sources} +%{__phpize} + +cd ../NTS +%configure --with-php-config=%{__phpconfig} make %{?_smp_mflags} %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize -%configure --with-php-config=%{_bindir}/zts-php-config +%configure --with-php-config=%{__ztsphpconfig} make %{?_smp_mflags} %endif @@ -143,42 +132,44 @@ install -D -m 644 %{SOURCE1} %{buildroot}%{php_ztsinidir}/%{ini_name} install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml # Documentation -for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +cd %{sources} +for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') +do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done %check +cd %{sources} + OPTS="-n" [ -f %{php_extdir}/json.so ] && OPTS="$OPTS -d extension=json.so" -cd NTS : Minimal load test for NTS extension %{__php} --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep '^%{pecl_name}$' +%if %{with tests} : Upstream test suite for NTS extension TEST_PHP_EXECUTABLE=%{__php} \ -TEST_PHP_ARGS="$OPTS -d extension=$PWD/modules/%{pecl_name}.so" \ -NO_INTERACTION=1 \ +TEST_PHP_ARGS="$OPTS -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ -%{__php} -n run-tests.php --show-diff +%{__php} -n run-tests.php -q --show-diff +%endif %if %{with_zts} -cd ../ZTS - : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ --modules | grep '^%{pecl_name}$' +%if %{with tests} : Upstream test suite for NTS extension TEST_PHP_EXECUTABLE=%{__ztsphp} \ -TEST_PHP_ARGS="$OPTS -d extension=$PWD/modules/%{pecl_name}.so" \ -NO_INTERACTION=1 \ +TEST_PHP_ARGS="$OPTS -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \ REPORT_EXIT_STATUS=1 \ -%{__ztsphp} -n run-tests.php --show-diff +%{__ztsphp} -n run-tests.php -q --show-diff +%endif %endif @@ -203,7 +194,7 @@ fi %files -%{?_licensedir:%license NTS/LICENSE} +%{?_licensedir:%license %{sources}/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -217,6 +208,39 @@ fi %changelog +* Mon Feb 19 2024 Remi Collet <remi@remirepo.net> - 3.3.5-4 +- add patch for PHP 7.4 from + https://github.com/laruence/yaf/pull/579 + +* Thu Sep 14 2023 Remi Collet <remi@remirepo.net> - 3.3.5-3 +- add patch for PHP 8.3 from + https://github.com/laruence/yaf/pull/579 +- build out of sources tree + +* Mon Sep 19 2022 Remi Collet <remi@remirepo.net> - 3.3.5-2 +- add patch for PHP 8.2 from + https://github.com/laruence/yaf/pull/579 + +* Mon May 23 2022 Remi Collet <remi@remirepo.net> - 3.3.5-1 +- update to 3.3.5 + +* Thu Dec 16 2021 Remi Collet <remi@remirepo.net> - 3.3.4-1 +- update to 3.3.4 +- drop patch merged upstream + +* Wed Sep 01 2021 Remi Collet <remi@remirepo.net> - 3.3.3-3 +- rebuild for 8.1.0RC1 + +* Wed Jul 21 2021 Remi Collet <remi@remirepo.net> - 3.3.3-2 +- add patch for PHP 8.1.0beta1 from + https://github.com/laruence/yaf/pull/548 + +* Thu Jul 1 2021 Remi Collet <remi@remirepo.net> - 3.3.3-1 +- update to 3.3.3 + +* Fri Mar 5 2021 Remi Collet <remi@remirepo.net> - 3.3.2-1 +- update to 3.3.2 + * Sun Feb 21 2021 Remi Collet <remi@remirepo.net> - 3.3.1-1 - update to 3.3.1 |