# remirepo spec file for php-phalcon5 # # Copyright (c) 2014-2023 Remi Collet # License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # %{?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.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}} Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Summary: Phalcon Framework License: BSD-3-Clause 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/%{sources}.tgz BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.4.1 BuildRequires: %{?scl_prefix}php-devel < 8.3 BuildRequires: %{?scl_prefix}php-pear BuildRequires: %{?scl_prefix}php-hash BuildRequires: %{?scl_prefix}php-json BuildRequires: %{?scl_prefix}php-pdo Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} 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} Provides: %{?scl_prefix}php-phalcon = %{version}-%{release} Provides: %{?scl_prefix}php-phalcon%{?_isa} = %{version}-%{release} Obsoletes: %{?scl_prefix}php-phalcon < 4 Obsoletes: %{?scl_prefix}php-phalcon2 < 4 Obsoletes: %{?scl_prefix}php-phalcon3 < 4 %if 0%{?fedora} >= 37 || 0%{?rhel} >= 10 || "%{php_version}" > "8.0" Obsoletes: %{?scl_prefix}php-phalcon4 < 5 %else # Only one version can be installed Conflicts: %{?scl_prefix}php-phalcon4 < 5 %endif # PECL Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} %description Phalcon is a web framework implemented as a C extension offering high performance and lower resource consumption. 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})}. %prep %setup -qc %{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} 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 : Error: Upstream extension version is ${extver}, expecting %{upstream_ver}%{?upstream_pre:%{upstream_pre}}. exit 1 fi cd .. mkdir NTS %if %{with_zts} mkdir ZTS %endif # Create configuration file cat << 'EOF' | tee %{ini_name} ; Enable '%{summary}' extension module extension=%{pecl_name}.so ; Configuration ;phalcon.db.escape_identifiers = On ;phalcon.db.force_casting = Off ;phalcon.orm.case_insensitive_column_map = Off ;phalcon.orm.cast_last_insert_id_to_int = Off ;phalcon.orm.cast_on_hydrate = Off ;phalcon.orm.column_renaming = On ;phalcon.orm.disable_assign_setters = Off ;phalcon.orm.enable_implicit_joins = On ;phalcon.orm.enable_literals = On ;phalcon.orm.events = On ;phalcon.orm.exception_on_failed_save = Off ;phalcon.orm.exception_on_failed_metadata_save = On ;phalcon.orm.ignore_unknown_columns = Off ;phalcon.orm.late_state_binding = Off ;phalcon.orm.not_null_validations = On ;phalcon.orm.resultset_prefetch_records = Off ;phalcon.orm.update_snapshot_on_save = On ;phalcon.orm.virtual_foreign_keys = On ;phalcon.warning.enable = On EOF %build %{?dtsenable} peclconf() { %configure \ --enable-phalcon \ --with-libdir=%{_lib} \ --with-php-config=$1 } cd %{sources} %{__phpize} : Build NTS extension cd ../NTS peclconf %{__phpconfig} make %{?_smp_mflags} %if %{with_zts} : Build ZTS extension cd ../ZTS peclconf %{__ztsphpconfig} make %{?_smp_mflags} %endif %install %{?dtsenable} # Install XML package description install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml # Install the NTS stuff make -C NTS install INSTALL_ROOT=%{buildroot} install -Dpm644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} %if %{with_zts} # Install the ZTS stuff make -C ZTS install INSTALL_ROOT=%{buildroot} install -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} %endif # Documentation for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i done %check # Shared needed extensions modules="" for mod in hash json pdo; do if [ -f %{php_extdir}/${mod}.so ]; then modules="$modules -d extension=${mod}.so" fi done : Minimal load test for NTS extension %{__php} --no-php-ini \ $modules \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --modules | grep -i '^%{pecl_name}$' %if %{with_zts} : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ $modules \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ --modules | grep -i '^%{pecl_name}$' %endif %if 0%{?fedora} < 24 && 0%{?rhel} < 8 # when pear installed alone, after us %triggerin -- %{?scl_prefix}php-pear if [ -x %{__pecl} ] ; then %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : fi # posttrans as pear can be installed after us %posttrans if [ -x %{__pecl} ] ; then %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : fi %postun if [ $1 -eq 0 -a -x %{__pecl} ] ; then %{pecl_uninstall} %{pecl_name} >/dev/null || : fi %endif %files %{?_licensedir:%license %{sources}/LICENSE.txt} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so %exclude %{php_incldir}/ext/%{pecl_name}/php_phalcon.h %if %{with_zts} %config(noreplace) %{php_ztsinidir}/%{ini_name} %{php_ztsextdir}/%{pecl_name}.so %exclude %{php_ztsincldir}/ext/%{pecl_name}/php_phalcon.h %endif %changelog * Thu Jul 27 2023 Remi Collet - 5.2.3-1 - update to 5.2.3 - build out of sources tree * Mon Jun 19 2023 Remi Collet - 5.2.2-1 - update to 5.2.2 * Wed Mar 1 2023 Remi Collet - 5.2.1-1 - update to 5.2.1 * Tue Feb 28 2023 Remi Collet - 5.2.0-1 - update to 5.2.0 - fix License - add patch for https://github.com/phalcon/cphalcon/issues/16295 build failure on EL7 with 8.2, from https://github.com/phalcon/cphalcon/pull/16296 * Wed Jan 11 2023 Remi Collet - 5.1.4-1 - update to 5.1.4 * Mon Dec 26 2022 Remi Collet - 5.1.3-1 - update to 5.1.3 * Thu Dec 1 2022 Remi Collet - 5.1.2-1 - update to 5.1.2 * Mon Nov 14 2022 Remi Collet - 5.1.1-1 - update to 5.1.1 * Wed Nov 2 2022 Remi Collet - 5.1.0-1 - update to 5.1.0 * Tue Oct 25 2022 Remi Collet - 5.0.5-1 - update to 5.0.5 * Tue Oct 18 2022 Remi Collet - 5.0.4-1 - update to 5.0.4 * Fri Oct 7 2022 Remi Collet - 5.0.3-1 - update to 5.0.3 * Wed Sep 28 2022 Remi Collet - 5.0.2-1 - update to 5.0.2 * Sat Sep 24 2022 Remi Collet - 5.0.1-1 - update to 5.0.1 * Fri Sep 23 2022 Remi Collet - 5.0.0-1 - update to 5.0.0 * Tue Aug 9 2022 Remi Collet - 5.0.0~rc4-1 - update to 5.0.0RC4 * Tue Jul 12 2022 Remi Collet - 5.0.0~rc3-1 - update to 5.0.0RC3 * Fri Jun 10 2022 Remi Collet - 5.0.0~rc2-1 - update to 5.0.0RC2 * Wed Jun 1 2022 Remi Collet - 5.0.0~rc1-1 - update to 5.0.0RC1 - drop dependency on psr extension * Mon Feb 7 2022 Remi Collet - 5.0.0~beta3-1 - update to 5.0.0beta3 * Thu Jan 6 2022 Remi Collet - 5.0.0~beta2-1 - update to 5.0.0beta2 * Sun Dec 26 2021 Remi Collet - 5.0.0~beta1-1 - update to 5.0.0beta1 * Wed Nov 17 2021 Remi Collet - 5.0.0~alpha7-1 - update to 5.0.0alpha7 * Sat Sep 18 2021 Remi Collet - 5.0.0~alpha6-1 - update to 5.0.0alpha6 * Thu Sep 9 2021 Remi Collet - 5.0.0~alpha5-1 - update to 5.0.0alpha5 * Tue Sep 7 2021 Remi Collet - 5.0.0~alpha4-1 - update to 5.0.0alpha4 - raise dependency on psr 1.1.0 - add fix for https://github.com/phalcon/cphalcon/issues/15645 from https://github.com/phalcon/cphalcon/pull/15646 * Thu Jul 1 2021 Remi Collet - 5.0.0~alpha3-1 - update to 5.0.0alpha3 * Thu May 6 2021 Remi Collet - 5.0.0~alpha2-1 - update to 5.0.0-alpha.2 - rename to php-phalcon5 - raise dependency on PHP 7.4 - raise dependency on psr 1.0.1 * Mon Apr 26 2021 Remi Collet - 4.1.2-1 - update to 4.1.2 * Thu Apr 22 2021 Remi Collet - 4.1.1-1 - update to 4.1.1 * Tue Nov 10 2020 Remi Collet - 4.1.0-1 - update to 4.1.0 * Wed Jul 22 2020 Remi Collet - 4.0.6-2 - rebuild for PHP 7.4.8 see https://github.com/phalcon/cphalcon/issues/15107 * Sun May 17 2020 Remi Collet - 4.0.6-1 - update to 4.0.6 * Mon Mar 9 2020 Remi Collet - 4.0.5-1 - update to 4.0.5 * Mon Feb 17 2020 Remi Collet - 4.0.4-1 - update to 4.0.4 * Sun Jan 26 2020 Remi Collet - 4.0.3-1 - update to 4.0.3 * Mon Jan 13 2020 Remi Collet - 4.0.2-1 - update to 4.0.2 - sources from pecl * Sun Dec 22 2019 Remi Collet - 4.0.0-1 - update to 4.0.0 * Mon Nov 18 2019 Remi Collet - 4.0.0~rc.3-1 - update to 4.0.0-rc.3 * Mon Oct 28 2019 Remi Collet - 4.0.0~rc.2-1 - update to 4.0.0-rc.2 * Mon Sep 23 2019 Remi Collet - 4.0.0~rc.1-1 - update to 4.0.0-rc.1 - rename to php-phalcon4 - build without zephir (use upstream generated sources) - add dependency on php-hash and php-psr - raise dependency on PHP 7.2 * Mon Jul 1 2019 Remi Collet - 3.4.4-1 - update to 3.4.4 * Fri Jun 28 2019 Remi Collet - 3.4.3-4 - rebuild using zephir 0.10.16 for https://github.com/phalcon/cphalcon/issues/14160 * Thu Jun 27 2019 Remi Collet - 3.4.3-3 - test build for https://github.com/phalcon/cphalcon/issues/14160 * Mon Feb 25 2019 Remi Collet - 3.4.3-2 - drop fake minifiers * Mon Feb 25 2019 Remi Collet - 3.4.3-1 - update to 3.4.3 using zephir 0.10.15 - make minifiers return unchanged input value backported from upstream version 4.x * Mon Dec 3 2018 Remi Collet - 3.4.2-1 - update to 3.4.2 using zephir 0.10.14 * Sat Oct 20 2018 Remi Collet - 3.4.1-3 - rebuild with zephir 0.10.12 for PHP 7.3 * Tue Aug 21 2018 Remi Collet - 3.4.1-2 - update to 3.4.1 using zephir 0.10.10 * Thu Aug 16 2018 Remi Collet - 3.4.1-1 - update to 3.4.1 using zephir 0.11.0 - open https://github.com/phalcon/cphalcon/issues/13465 * Mon May 28 2018 Remi Collet - 3.4.0-1 - update to 3.4.0 using zephir 0.10.10 * Wed Mar 7 2018 Remi Collet - 3.3.2-1 - update to 3.3.2 using zephir 0.10.7 * Wed Jan 10 2018 Remi Collet - 3.3.1-1 - Update to 3.3.1 using zephir 0.10.7 * Sun Dec 24 2017 Remi Collet - 3.3.0-1 - Update to 3.3.0 using zephir 0.10.6 * Mon Oct 23 2017 Remi Collet - 3.2.4-1 - Update to 3.2.4 using zephir 0.10.4 * Fri Oct 13 2017 Remi Collet - 3.2.3-1 - Update to 3.2.3 using zephir 0.10.3 - open https://github.com/phalcon/cphalcon/issues/13117 conflicts * Mon Aug 14 2017 Remi Collet - 3.2.2-1 - Update to 3.2.2 using zephir 0.9.11 * Tue Jul 18 2017 Remi Collet - 3.2.1-2 - rebuild for PHP 7.2.0beta1 new API * Tue Jul 11 2017 Remi Collet - 3.2.1-1 - Update to 3.2.1 * Wed Jun 21 2017 Remi Collet - 3.2.0-2 - test build with zephir 0.9.9 * Mon Jun 19 2017 Remi Collet - 3.2.0-1 - Update to 3.2.0 - open https://github.com/phalcon/cphalcon/issues/12909 - PHP 5 compat * Thu Apr 6 2017 Remi Collet - 3.1.2-1 - Update to 3.1.2 * Sun Mar 26 2017 Remi Collet - 3.1.1-1 - Update to 3.1.1 * Thu Mar 23 2017 Remi Collet - 3.1.0-1 - Update to 3.1.0 * Tue Feb 21 2017 Remi Collet - 3.0.4-1 - update to 3.0.4 * Sun Dec 25 2016 Remi Collet - 3.0.3-1 - update to 3.0.3 * Sun Nov 27 2016 Remi Collet - 3.0.2-1 - update to 3.0.2 * Fri Sep 2 2016 Remi Collet - 3.0.1-1 - update to 3.0.1 * Sat Jul 30 2016 Remi Collet - 3.0.0-2 - generate sources using zephir * Sat Jul 30 2016 Remi Collet - 3.0.0-1 - update to 3.0.0 - rename to php-phalcon3 - PHP 7 build is broken for now open https://github.com/phalcon/cphalcon/issues/12054 * Fri May 20 2016 Remi Collet - 2.0.13-1 - update to 2.0.13 * Tue May 17 2016 Remi Collet - 2.0.12-1 - update to 2.0.12 * Thu May 5 2016 Remi Collet - 2.0.11-1 - update to 2.0.11 * Sun Feb 7 2016 Remi Collet - 2.0.10-1 - update to 2.0.10 * Wed Nov 25 2015 Remi Collet - 2.0.9-1 - update to 2.0.9 * Sat Sep 26 2015 Remi Collet - 2.0.8-1 - update to 2.0.8 - allow build against rh-php56 (as more-php56) * Fri Aug 21 2015 Remi Collet - 2.0.7-1 - update to 2.0.7 * Wed Jul 22 2015 Remi Collet - 2.0.6-1 - update to 2.0.6 * Wed Jul 15 2015 Remi Collet - 2.0.5-1 - update to 2.0.5 * Mon Jul 13 2015 Remi Collet - 2.0.4-1 - update to 2.0.4 * Thu Jun 11 2015 Remi Collet - 2.0.3-1 - update to 2.0.3 * Tue May 26 2015 Remi Collet - 2.0.2-1 - update to 2.0.2 * Thu May 14 2015 Remi Collet - 2.0.1-1 - update to 2.0.1 * Tue Apr 21 2015 Remi Collet - 2.0.0-1 - update to 2.0.0 - rename to php-phalcon2 * Wed Dec 24 2014 Remi Collet - 1.3.4-1.1 - Fedora 21 SCL mass rebuild * Sat Nov 15 2014 Remi Collet - 1.3.4-1 - update to 1.3.4 * Mon Sep 29 2014 Remi Collet - 1.3.3-1 - update to 1.3.3 - drop all patches merged upstream * Sun Sep 7 2014 Remi Collet - 1.3.2-2 - use striped archive, without non-free sources - generate and use optimized sources - open https://github.com/phalcon/cphalcon/pull/2793 * Thu Sep 4 2014 Remi Collet - 1.3.2-1 - initial package, version 1.3.2 - open https://github.com/phalcon/cphalcon/pull/2772 (merged) - open https://github.com/phalcon/cphalcon/pull/2774 - open https://github.com/phalcon/cphalcon/pull/2775