Allow cakephp cache engine to be set during build

This commit is contained in:
Andrew Bauer 2021-06-18 12:12:01 -05:00
parent 0ca10fe7cd
commit a423f2620e
4 changed files with 13 additions and 9 deletions

View File

@ -189,8 +189,14 @@ set(ZM_MANPAGE_DEST_PREFIX "share/man" CACHE PATH
"Relative path used to install ZoneMinder's Man pages into a "Relative path used to install ZoneMinder's Man pages into a
non-standard folder. Most Linux users will not need to change this. non-standard folder. Most Linux users will not need to change this.
BSD users may need to set this.") BSD users may need to set this.")
set(ZM_CAKEPHP_CACHE "Apc" CACHE STRING
"Set the CakePHP cache engine, default: Apc")
# Reassign some variables if a target distro has been specified # Reassign some variables if a target distro has been specified
if(ZM_TARGET_DISTRO MATCHES "^fc")
set(ZM_CAKEPHP_CACHE "Memcached")
endif()
if((ZM_TARGET_DISTRO MATCHES "^el") OR (ZM_TARGET_DISTRO MATCHES "^fc")) if((ZM_TARGET_DISTRO MATCHES "^el") OR (ZM_TARGET_DISTRO MATCHES "^fc"))
set(ZM_RUNDIR "/var/run/zoneminder") set(ZM_RUNDIR "/var/run/zoneminder")
set(ZM_SOCKDIR "/var/lib/zoneminder/sock") set(ZM_SOCKDIR "/var/lib/zoneminder/sock")

View File

@ -17,11 +17,6 @@
# This will tell zoneminder's cmake process we are building against a known distro # This will tell zoneminder's cmake process we are building against a known distro
%global zmtargetdistro %{?rhel:el%{rhel}}%{!?rhel:fc%{fedora}} %global zmtargetdistro %{?rhel:el%{rhel}}%{!?rhel:fc%{fedora}}
# Fedora needs apcu backwards compatibility module
%if 0%{?fedora}
%global with_apcu_bc 1
%endif
# Newer php's keep json functions in a subpackage # Newer php's keep json functions in a subpackage
%if 0%{?fedora} || 0%{?rhel} >= 8 %if 0%{?fedora} || 0%{?rhel} >= 8
%global with_php_json 1 %global with_php_json 1
@ -116,8 +111,8 @@ Requires: php-mysqli
Requires: php-common Requires: php-common
Requires: php-gd Requires: php-gd
%{?with_php_json:Requires: php-json} %{?with_php_json:Requires: php-json}
Requires: php-pecl-apcu %{?fedora:Requires: php-pecl-memcached}
%{?with_apcu_bc:Requires: php-pecl-apcu-bc} %{?rhel:Requires: php-pecl-apcu}
Requires: cambozola Requires: cambozola
Requires: net-tools Requires: net-tools
Requires: psmisc Requires: psmisc
@ -425,6 +420,9 @@ ln -sf %{_sysconfdir}/zm/www/zoneminder.nginx.conf %{_sysconfdir}/zm/www/zonemin
%dir %attr(755,nginx,nginx) %{_localstatedir}/log/zoneminder %dir %attr(755,nginx,nginx) %{_localstatedir}/log/zoneminder
%changelog %changelog
* Fri Jun 18 2021 Andrew Bauer <zonexpertconsulting@outlook.com> - 1.36.4-2
- apcu-bc deprecated on fedora, use memcached instead
* Tue Jun 08 2021 Andrew Bauer <zonexpertconsulting@outlook.com> - 1.36.4-1 * Tue Jun 08 2021 Andrew Bauer <zonexpertconsulting@outlook.com> - 1.36.4-1
- 1.36.4 release - 1.36.4 release

View File

@ -23,7 +23,7 @@
*/ */
// Setup a 'default' cache configuration for use in the application. // Setup a 'default' cache configuration for use in the application.
Cache::config('default', array('engine' => 'Apc')); Cache::config('default', array('engine' => '@ZM_CAKEPHP_CACHE@'));
/** /**
* The settings below can be used to set additional paths to models, views and controllers. * The settings below can be used to set additional paths to models, views and controllers.

@ -1 +1 @@
Subproject commit 14292374ccf1328f2d5db20897bd06f99ba4d938 Subproject commit 0bd63fb464957080ead342db58ca9e01532cf1ef