diff options
Diffstat (limited to 'php-phalcon5.spec')
-rw-r--r-- | php-phalcon5.spec | 62 |
1 files changed, 22 insertions, 40 deletions
diff --git a/php-phalcon5.spec b/php-phalcon5.spec index 9b238fd..e962940 100644 --- a/php-phalcon5.spec +++ b/php-phalcon5.spec @@ -7,24 +7,17 @@ # Please, preserve the changelog entries # -# we don't want -z defs linker flag -%undefine _strict_symbol_defs_build - -%if 0%{?scl:1} -%scl_package php-phalcon5 -%else -%global pkg_name %{name} -%endif - -%bcond_with tests +%{?scl:%scl_package php-phalcon5} %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global pecl_name phalcon # after 40-json.ini, 20-pdo.ini %global ini_name 50-%{pecl_name}.ini -%global upstream_ver 5.2.2 +%global upstream_ver 5.2.3 #global upstream_pre RC4 #global upstream_low %%(echo %%{upstream_pre} | tr '[:upper:]' '[:lower:]') +%global sources %{pecl_name}-%{upstream_ver}%{?upstream_pre} +%global _configure ../%{sources}/configure Name: %{?scl_prefix}php-phalcon5 Version: %{upstream_ver}%{?upstream_pre:~%{upstream_low}} @@ -32,12 +25,12 @@ Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_ Summary: Phalcon Framework License: BSD-3-Clause -URL: https://pecl.php.net/package/phalcon +URL: https://phalcon.io/ # when missing on pecl, generated from git # git checkout v#.#.# # ln -s build/phalcon/* . # pecl package -Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_ver}%{?upstream_pre}.tgz +Source0: https://pecl.php.net/get/%{sources}.tgz BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.4.1 @@ -52,7 +45,6 @@ Requires: %{?scl_prefix}php(api) = %{php_core_api} Requires: %{?scl_prefix}php-hash%{?_isa} Requires: %{?scl_prefix}php-json%{?_isa} Requires: %{?scl_prefix}php-pdo%{?_isa} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} Provides: %{?scl_prefix}php-phalcon = %{version}-%{release} Provides: %{?scl_prefix}php-phalcon%{?_isa} = %{version}-%{release} @@ -72,14 +64,12 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{rele Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} -# Don't provides php-composer(phalcon/cphalcon), not registered on packagist - %description Phalcon is a web framework implemented as a C extension offering high performance and lower resource consumption. -Documentation: http://docs.phalconphp.com +Documentation: https://docs.phalcon.io/ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}. @@ -89,9 +79,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} -mv %{pecl_name}-%{upstream_ver}%{?upstream_pre} NTS - -cd NTS +cd %{sources} # Sanity check, really often broken extver=$(sed -n '/#define PHP_PHALCON_VERSION/{s/.* "//;s/".*$//;p}' php_phalcon.h) if test "x${extver}" != "x%{upstream_ver}%{?upstream_pre:%{upstream_pre}}"; then @@ -100,9 +88,9 @@ if test "x${extver}" != "x%{upstream_ver}%{?upstream_pre:%{upstream_pre}}"; then fi cd .. +mkdir NTS %if %{with_zts} -# duplicate for ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif # Create configuration file @@ -143,17 +131,18 @@ peclconf() { --with-php-config=$1 } +cd %{sources} +%{__phpize} + : Build NTS extension -cd NTS -%{_bindir}/phpize -peclconf %{_bindir}/php-config +cd ../NTS +peclconf %{__phpconfig} make %{?_smp_mflags} %if %{with_zts} : Build ZTS extension cd ../ZTS -%{_bindir}/zts-phpize -peclconf %{_bindir}/zts-php-config +peclconf %{__ztsphpconfig} make %{?_smp_mflags} %endif @@ -176,7 +165,7 @@ install -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} # 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 +do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done @@ -195,17 +184,6 @@ done --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep -i '^%{pecl_name}$' -%if %{with tests} -: Upstream test suite NTS extension -cd build/NTS -SKIP_ONLINE_TESTS=1 \ -TEST_PHP_EXECUTABLE=%{__php} \ -TEST_PHP_ARGS="-n $modules -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} : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ @@ -236,7 +214,7 @@ fi %files -%{?_licensedir:%license NTS/LICENSE.txt} +%{?_licensedir:%license %{sources}/LICENSE.txt} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -252,6 +230,10 @@ fi %changelog +* Thu Jul 27 2023 Remi Collet <remi@remirepo.net> - 5.2.3-1 +- update to 5.2.3 +- build out of sources tree + * Mon Jun 19 2023 Remi Collet <remi@remirepo.net> - 5.2.2-1 - update to 5.2.2 |