summaryrefslogtreecommitdiffstats
path: root/php-phalcon4.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-phalcon4.spec')
-rw-r--r--php-phalcon4.spec114
1 files changed, 59 insertions, 55 deletions
diff --git a/php-phalcon4.spec b/php-phalcon4.spec
index 26e980d..099fd17 100644
--- a/php-phalcon4.spec
+++ b/php-phalcon4.spec
@@ -1,4 +1,4 @@
-# remirepo spec file for php-phalcon3
+# remirepo spec file for php-phalcon4
#
# Copyright (c) 2014-2019 Remi Collet
# License: CC-BY-SA
@@ -12,77 +12,80 @@
%if 0%{?scl:1}
%global sub_prefix %{scl_prefix}
-%scl_package php-phalcon3
+%scl_package php-phalcon4
%else
%global pkg_name %{name}
%endif
-%global gh_commit cc0cde0eb28faef05e9074e03c07e55d8ff0ed34
+%global gh_commit a48b31967a1ce27c10cbed61bee42e0c90addc86
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner phalcon
%global gh_project cphalcon
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global with_tests 0%{?_with_tests:1}
%global ext_name phalcon
-%global zephir_ver 0.10.16
-%if "%{php_version}" < "5.6"
-# after pdo.ini, json.ini, igbinary.ini
-%global ini_name z-%{ext_name}.ini
-%else
-# after 40-json.ini, 20-pdo.ini, 40-igbinary.ini
+# See ext/php_phalcon.h
+#global zephir_ver 0.12.4
+# after 40-json.ini, 20-pdo.ini, 40-psr.ini
%global ini_name 50-%{ext_name}.ini
-%endif
+%global upstream_ver 4.0.0
+%global upstream_pre rc.1
-Name: %{?sub_prefix}php-phalcon3
-Version: 3.4.4
+Name: %{?sub_prefix}php-phalcon4
+Version: %{upstream_ver}%{?upstream_pre:~%{upstream_pre}}
Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Summary: Phalcon Framework
License: MIT
URL: https://github.com/%{gh_owner}/%{gh_project}
-Source0: %{gh_project}-%{version}-strip.tar.xz
-# Script to generate the stripped archive from a git clone
-Source1: strip.sh
-# Backported from 4.x
-Patch0: %{gh_project}-nominifier.patch
+Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{upstream_ver}%{?upstream_pre:-%{upstream_pre}}-%{gh_short}.tar.gz
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel > 5.5
+BuildRequires: %{?scl_prefix}php-devel > 7.2
+BuildRequires: %{?scl_prefix}php-hash
BuildRequires: %{?scl_prefix}php-json
BuildRequires: %{?scl_prefix}php-pdo
+BuildRequires: %{?scl_prefix}php-psr
# For sources generation
%if 0%{?zephir_ver:1}
BuildRequires: %{?scl_prefix}zephir = %{zephir_ver}
BuildRequires: %{?scl_prefix}php-gd
-BuildRequires: %{?scl_prefix}php-pecl(libsodium)
BuildRequires: %{?scl_prefix}php-mbstring
BuildRequires: %{?scl_prefix}php-memcached
+BuildRequires: %{?scl_prefix}php-msgpack
+BuildRequires: %{?scl_prefix}php-igbinary
BuildRequires: %{?scl_prefix}php-imagick
BuildRequires: %{?scl_prefix}php-yaml
+BuildRequires: %{?scl_prefix}php-mongodb
+BuildRequires: %{?scl_prefix}php-redis
# pull php-pecl-apcu (PHP 5) or php-pecl-apcu-bc (PHP 7)
BuildRequires: %{?scl_prefix}php-apc
%endif
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}
+Requires: %{?scl_prefix}php-psr%{?_isa}
%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
Provides: %{?scl_prefix}php-phalcon = %{version}-%{release}
Provides: %{?scl_prefix}php-phalcon%{?_isa} = %{version}-%{release}
%if "%{?scl_prefix}" != "%{?sub_prefix}"
-Provides: %{?scl_prefix}php-phalcon3 = %{version}-%{release}
-Provides: %{?scl_prefix}php-phalcon3%{?_isa} = %{version}-%{release}
+Provides: %{?scl_prefix}php-phalcon4 = %{version}-%{release}
+Provides: %{?scl_prefix}php-phalcon4%{?_isa} = %{version}-%{release}
%endif
-%if "%{php_version}" > "7"
-Obsoletes: %{?scl_prefix}php-phalcon < 3
-Obsoletes: %{?scl_prefix}php-phalcon2 < 3
+%if "%{php_version}" > "7.4"
+Obsoletes: %{?scl_prefix}php-phalcon < 4
+Obsoletes: %{?scl_prefix}php-phalcon2 < 4
+Obsoletes: %{?scl_prefix}php-phalcon3 < 4
%else
# Only one version can be installed
-Conflicts: %{?scl_prefix}php-phalcon < 3
-Conflicts: %{?scl_prefix}php-phalcon2 < 3
+Conflicts: %{?scl_prefix}php-phalcon < 4
+Conflicts: %{?scl_prefix}php-phalcon2 < 4
%endif
+Conflicts: %{?scl_prefix}php-phalcon3 < 4
# Don't provides php-composer(phalcon/cphalcon), not registered on packagist
@@ -97,8 +100,6 @@ Conflicts: %{?scl_prefix}php-phalcon2 < 3
Phalcon is a web framework implemented as a C extension offering
high performance and lower resource consumption.
-Notice: non-free JS and CSS minifiers are disabled.
-
Documentation: http://docs.phalconphp.com
Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
@@ -106,12 +107,11 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-%patch0 -p1 -b .nominifier
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_PHALCON_VERSION/{s/.* "//;s/".*$//;p}' ext/php_phalcon.h)
-if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then
- : Error: Upstream extension version is ${extver}, expecting %{version}%{?prever:-%{prever}}.
+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
@@ -121,20 +121,23 @@ cat << 'EOF' | tee %{ini_name}
extension=%{ext_name}.so
; Configuration
-;phalcon.db.escape_identifiers = '1'
-;phalcon.db.force_casting = '0'
-;phalcon.orm.events = '1'
-;phalcon.orm.virtual_foreign_keys = '1'
-;phalcon.orm.column_renaming = '1'
-;phalcon.orm.not_null_validations = '1'
-;phalcon.orm.exception_on_failed_save = '0'
-;phalcon.orm.enable_literals = '1'
-;phalcon.orm.late_state_binding = '0'
-;phalcon.orm.enable_implicit_joins = '1'
-;phalcon.orm.cast_on_hydrate = '0'
-;phalcon.orm.ignore_unknown_columns = '0'
-;phalcon.orm.update_snapshot_on_save = '1'
-;phalcon.orm.disable_assign_setters = '0'
+;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.update_snapshot_on_save = On
+;phalcon.orm.virtual_foreign_keys = On
EOF
: Check Zephir version
@@ -153,19 +156,13 @@ peclconf() {
: Generate the SAFE sources - optimization seems no more needed
-%if "%{php_version}" > "7.0"
%if 0%{?zephir_ver:1}
-%{_bindir}/zephir generate --backend=ZendEngine3
+%{_bindir}/zephir clean
+%{_bindir}/zephir fullclean
+%{_bindir}/zephir generate
%endif
%{__php} build/gen-build.php
mv build/php7/safe build/NTS
-%else
-%if 0%{?zephir_ver:1}
-%{_bindir}/zephir generate --backend=ZendEngine2
-%endif
-%{__php} build/gen-build.php
-mv build/php5/safe build/NTS
-%endif
%if %{with_zts}
: Duplicate source tree for NTS / ZTS build
@@ -204,7 +201,7 @@ install -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%check
# Shared needed extensions
modules=""
-for mod in json pdo; do
+for mod in hash json pdo psr; do
if [ -f %{php_extdir}/${mod}.so ]; then
modules="$modules -d extension=${mod}.so"
fi
@@ -253,6 +250,13 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Mon Sep 23 2019 Remi Collet <remi@remirepo.net> - 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 <remi@remirepo.net> - 3.4.4-1
- update to 3.4.4