From 0991391f45a41817be9ff304207865303eec079f Mon Sep 17 00:00:00 2001 From: clipo1979 Date: Sun, 15 Feb 2015 11:34:27 +0000 Subject: [PATCH 01/18] Update CMakeLists.txt --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e5d5ae867..edcde51dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,6 +83,8 @@ elseif(ZM_TARGET_DISTRO STREQUAL "el7") set(ZM_TMPDIR "/var/lib/zoneminder/temp") set(ZM_LOGDIR "/var/log/zoneminder") set(ZM_CONFIG_DIR "/etc/zm") + set(ZM_WEBDIR "/usr/share/zoneminder/www") + set(ZM_CGIDIR "/usr/libexec/zoneminder/cgi-bin") elseif(ZM_TARGET_DISTRO STREQUAL "OS13") set(ZM_RUNDIR "/var/run/zoneminder") set(ZM_TMPDIR "/var/run/zoneminder") From b42b646e5e51cc285126da93ddb637429cad7915 Mon Sep 17 00:00:00 2001 From: clipo1979 Date: Sun, 15 Feb 2015 11:39:27 +0000 Subject: [PATCH 02/18] Update zoneminder.el7.conf --- distros/redhat/zoneminder.el7.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/distros/redhat/zoneminder.el7.conf b/distros/redhat/zoneminder.el7.conf index ab4abbbcb..0b1936a7a 100644 --- a/distros/redhat/zoneminder.el7.conf +++ b/distros/redhat/zoneminder.el7.conf @@ -9,8 +9,8 @@ # internal site which needs no authentication, you need to delete the line # marked below and restart Apache. -Alias /zm "/usr/share/zoneminder/www" - +Alias /zm "@ZM_WEBDIR@" + Options -Indexes +MultiViews +FollowSymLinks AllowOverride All @@ -26,8 +26,8 @@ Alias /zm "/usr/share/zoneminder/www" # php_value short_open_tag 1 -ScriptAlias /cgi-bin-zm "/usr/libexec/zoneminder/cgi-bin" - +ScriptAlias /cgi-bin-zm "@ZM_CGIDIR@" + AllowOverride All Options ExecCGI From 3e03745603ab56da5f22e3807255761139bd6abd Mon Sep 17 00:00:00 2001 From: clipo1979 Date: Sun, 15 Feb 2015 11:43:10 +0000 Subject: [PATCH 03/18] Rename zoneminder.el7.conf to zoneminder.el7.conf.in --- distros/redhat/{zoneminder.el7.conf => zoneminder.el7.conf.in} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename distros/redhat/{zoneminder.el7.conf => zoneminder.el7.conf.in} (100%) diff --git a/distros/redhat/zoneminder.el7.conf b/distros/redhat/zoneminder.el7.conf.in similarity index 100% rename from distros/redhat/zoneminder.el7.conf rename to distros/redhat/zoneminder.el7.conf.in From 12964f56351e7b5c5bd750b59835d8c77bfaed76 Mon Sep 17 00:00:00 2001 From: clipo1979 Date: Sun, 15 Feb 2015 11:44:46 +0000 Subject: [PATCH 04/18] Update CMakeLists.txt --- distros/redhat/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/distros/redhat/CMakeLists.txt b/distros/redhat/CMakeLists.txt index 84b5a6a74..23e3a2271 100644 --- a/distros/redhat/CMakeLists.txt +++ b/distros/redhat/CMakeLists.txt @@ -3,6 +3,7 @@ # Create the zoneminder service file if(ZM_TARGET_DISTRO STREQUAL "el7") configure_file(zoneminder.service.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.service @ONLY) + configure_file(zoneminder.el7.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.el7.conf @ONLY) else(ZM_TARGET_DISTRO STREQUAL "el7") configure_file(zoneminder.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder @ONLY) endif(ZM_TARGET_DISTRO STREQUAL "el7") From 308a8b9df33f10ecc11739fc28c9bf3ec71cd5b7 Mon Sep 17 00:00:00 2001 From: clipo1979 Date: Sun, 15 Feb 2015 13:34:17 +0000 Subject: [PATCH 05/18] Update CMakeLists.txt --- distros/redhat/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/distros/redhat/CMakeLists.txt b/distros/redhat/CMakeLists.txt index 23e3a2271..e687e5482 100644 --- a/distros/redhat/CMakeLists.txt +++ b/distros/redhat/CMakeLists.txt @@ -1,5 +1,8 @@ # CMakeLists.txt for the Redhat/CentOS Target Distro. +# Display a message to show the RHEL build options are being processed. +message([STATUS] "Starting RHEL Build Options" ...) + # Create the zoneminder service file if(ZM_TARGET_DISTRO STREQUAL "el7") configure_file(zoneminder.service.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.service @ONLY) From 39c5d3ad0600ab74726fce5a1adbb975341587b9 Mon Sep 17 00:00:00 2001 From: clipo1979 Date: Sun, 15 Feb 2015 13:48:46 +0000 Subject: [PATCH 06/18] Update zoneminder.tmpfiles --- distros/redhat/zoneminder.tmpfiles | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distros/redhat/zoneminder.tmpfiles b/distros/redhat/zoneminder.tmpfiles index a56fa54ba..8f55ce295 100644 --- a/distros/redhat/zoneminder.tmpfiles +++ b/distros/redhat/zoneminder.tmpfiles @@ -1 +1 @@ -d /run/zoneminder 0755 apache apache +d @ZM_RUNDIR@ 0755 @WEB_USER@ @WEB_GROUP@ From 5f96882ec7d20953908cb2483429da52aebd3a76 Mon Sep 17 00:00:00 2001 From: clipo1979 Date: Sun, 15 Feb 2015 14:00:34 +0000 Subject: [PATCH 07/18] Update CMakeLists.txt --- distros/redhat/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distros/redhat/CMakeLists.txt b/distros/redhat/CMakeLists.txt index e687e5482..b6955cc57 100644 --- a/distros/redhat/CMakeLists.txt +++ b/distros/redhat/CMakeLists.txt @@ -8,7 +8,7 @@ if(ZM_TARGET_DISTRO STREQUAL "el7") configure_file(zoneminder.service.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.service @ONLY) configure_file(zoneminder.el7.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.el7.conf @ONLY) else(ZM_TARGET_DISTRO STREQUAL "el7") - configure_file(zoneminder.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder @ONLY) + configure_file(zm.in ${CMAKE_CURRENT_SOURCE_DIR}/zm @ONLY) endif(ZM_TARGET_DISTRO STREQUAL "el7") # Download jscalendar & move files into position From e80702bb22874b8569575fc57b6bda1b1abfab59 Mon Sep 17 00:00:00 2001 From: clipo1979 Date: Sun, 15 Feb 2015 14:03:06 +0000 Subject: [PATCH 08/18] Update CMakeLists.txt --- distros/redhat/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distros/redhat/CMakeLists.txt b/distros/redhat/CMakeLists.txt index b6955cc57..00e08b510 100644 --- a/distros/redhat/CMakeLists.txt +++ b/distros/redhat/CMakeLists.txt @@ -58,7 +58,7 @@ if(ZM_TARGET_DISTRO STREQUAL "el7") else(ZM_TARGET_DISTRO STREQUAL "el7") install(FILES zoneminder.el6.conf DESTINATION /etc/httpd/conf.d RENAME zoneminder.conf PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) install(FILES zoneminder.el6.logrotate DESTINATION /etc/logrotate.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) - install(FILES zoneminder DESTINATION /etc/rc.d/init.d PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) + install(FILES zm DESTINATION /etc/rc.d/init.d PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) endif(ZM_TARGET_DISTRO STREQUAL "el7") # Install jscalendar From 6b8ce2e0d47e0eb22c17daef0204134345785d68 Mon Sep 17 00:00:00 2001 From: clipo1979 Date: Sun, 15 Feb 2015 14:06:54 +0000 Subject: [PATCH 09/18] Rename zoneminder.in to zm.in --- distros/redhat/{zoneminder.in => zm.in} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename distros/redhat/{zoneminder.in => zm.in} (100%) diff --git a/distros/redhat/zoneminder.in b/distros/redhat/zm.in similarity index 100% rename from distros/redhat/zoneminder.in rename to distros/redhat/zm.in From 160503df14454d01a8fafc0e430a44e050a30f52 Mon Sep 17 00:00:00 2001 From: clipo1979 Date: Sun, 15 Feb 2015 14:20:23 +0000 Subject: [PATCH 10/18] Update zoneminder.el7.logrotate --- distros/redhat/zoneminder.el7.logrotate | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distros/redhat/zoneminder.el7.logrotate b/distros/redhat/zoneminder.el7.logrotate index 7bd1d189b..b4919eb5e 100644 --- a/distros/redhat/zoneminder.el7.logrotate +++ b/distros/redhat/zoneminder.el7.logrotate @@ -1,8 +1,8 @@ -/var/log/zoneminder/*.log { +@ZM_LOGDIR@/*.log { missingok notifempty sharedscripts postrotate - /usr/bin/zmpkg.pl logrot 2> /dev/null > /dev/null || : + @BINDIR@/zmpkg.pl logrot 2> /dev/null > /dev/null || : endscript } From 813de8540fc67ba6d55a9f7c99715fd534a4ba85 Mon Sep 17 00:00:00 2001 From: clipo1979 Date: Sun, 15 Feb 2015 14:21:16 +0000 Subject: [PATCH 11/18] Update zoneminder.el6.logrotate --- distros/redhat/zoneminder.el6.logrotate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distros/redhat/zoneminder.el6.logrotate b/distros/redhat/zoneminder.el6.logrotate index 61cc9d0eb..5b852cba7 100644 --- a/distros/redhat/zoneminder.el6.logrotate +++ b/distros/redhat/zoneminder.el6.logrotate @@ -1,4 +1,4 @@ -/var/log/zoneminder/*log +@ZM_LOGDIR@/*log { weekly notifempty From 4fc4789b08a4d147fb9bbb65a79ad28d6a7acbb2 Mon Sep 17 00:00:00 2001 From: clipo1979 Date: Sun, 15 Feb 2015 14:23:28 +0000 Subject: [PATCH 12/18] Update zoneminder.el6.conf --- distros/redhat/zoneminder.el6.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/distros/redhat/zoneminder.el6.conf b/distros/redhat/zoneminder.el6.conf index 081eccfb3..108421e25 100644 --- a/distros/redhat/zoneminder.el6.conf +++ b/distros/redhat/zoneminder.el6.conf @@ -9,8 +9,8 @@ # internal site which needs no authentication, you need to delete the line # marked below and restart Apache. -Alias /zm "/usr/share/zoneminder/www" - +Alias /zm "@ZM_WEBDIR@" + Options -Indexes MultiViews FollowSymLinks AllowOverride All Order allow,deny @@ -19,8 +19,8 @@ Alias /zm "/usr/share/zoneminder/www" # php_value short_open_tag 1 -ScriptAlias /cgi-bin/zm "/usr/libexec/zoneminder/cgi-bin" - +ScriptAlias /cgi-bin/zm "@ZM_WEBDIR@" + AllowOverride All Options ExecCGI Order allow,deny From 200f48da34a99130138bea96f7ad6354e1361871 Mon Sep 17 00:00:00 2001 From: clipo1979 Date: Sun, 15 Feb 2015 15:46:00 +0000 Subject: [PATCH 13/18] Rename zoneminder.tmpfiles to zoneminder.tmpfiles.in --- distros/redhat/{zoneminder.tmpfiles => zoneminder.tmpfiles.in} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename distros/redhat/{zoneminder.tmpfiles => zoneminder.tmpfiles.in} (100%) diff --git a/distros/redhat/zoneminder.tmpfiles b/distros/redhat/zoneminder.tmpfiles.in similarity index 100% rename from distros/redhat/zoneminder.tmpfiles rename to distros/redhat/zoneminder.tmpfiles.in From aa00de486b9f390c64be8df99b500347c602b3bb Mon Sep 17 00:00:00 2001 From: clipo1979 Date: Sun, 15 Feb 2015 15:47:42 +0000 Subject: [PATCH 14/18] Rename zoneminder.el7.logrotate to zoneminder.el7.logrotate.in --- .../{zoneminder.el7.logrotate => zoneminder.el7.logrotate.in} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename distros/redhat/{zoneminder.el7.logrotate => zoneminder.el7.logrotate.in} (100%) diff --git a/distros/redhat/zoneminder.el7.logrotate b/distros/redhat/zoneminder.el7.logrotate.in similarity index 100% rename from distros/redhat/zoneminder.el7.logrotate rename to distros/redhat/zoneminder.el7.logrotate.in From c6f256fef47bcb2aea939acf1744fe29f007f102 Mon Sep 17 00:00:00 2001 From: clipo1979 Date: Sun, 15 Feb 2015 15:48:14 +0000 Subject: [PATCH 15/18] Rename zoneminder.el6.logrotate to zoneminder.el6.logrotate.in --- .../{zoneminder.el6.logrotate => zoneminder.el6.logrotate.in} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename distros/redhat/{zoneminder.el6.logrotate => zoneminder.el6.logrotate.in} (100%) diff --git a/distros/redhat/zoneminder.el6.logrotate b/distros/redhat/zoneminder.el6.logrotate.in similarity index 100% rename from distros/redhat/zoneminder.el6.logrotate rename to distros/redhat/zoneminder.el6.logrotate.in From e762a615d3d1bd986df1054573bbf6a24a402732 Mon Sep 17 00:00:00 2001 From: clipo1979 Date: Sun, 15 Feb 2015 15:48:40 +0000 Subject: [PATCH 16/18] Rename zoneminder.el6.conf to zoneminder.el6.conf.in --- distros/redhat/{zoneminder.el6.conf => zoneminder.el6.conf.in} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename distros/redhat/{zoneminder.el6.conf => zoneminder.el6.conf.in} (100%) diff --git a/distros/redhat/zoneminder.el6.conf b/distros/redhat/zoneminder.el6.conf.in similarity index 100% rename from distros/redhat/zoneminder.el6.conf rename to distros/redhat/zoneminder.el6.conf.in From 18abb3761dea897a5ce51251802d19be3468f2e2 Mon Sep 17 00:00:00 2001 From: clipo1979 Date: Sun, 15 Feb 2015 15:50:21 +0000 Subject: [PATCH 17/18] Update CMakeLists.txt --- distros/redhat/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/distros/redhat/CMakeLists.txt b/distros/redhat/CMakeLists.txt index 00e08b510..b154748ac 100644 --- a/distros/redhat/CMakeLists.txt +++ b/distros/redhat/CMakeLists.txt @@ -7,8 +7,12 @@ message([STATUS] "Starting RHEL Build Options" ...) if(ZM_TARGET_DISTRO STREQUAL "el7") configure_file(zoneminder.service.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.service @ONLY) configure_file(zoneminder.el7.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.el7.conf @ONLY) + configure_file(zoneminder.tmpfiles.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.tmpfiles @ONLY) + configure_file(zoneminder.el7.logrotate.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.el7.logrotate @ONLY) else(ZM_TARGET_DISTRO STREQUAL "el7") configure_file(zm.in ${CMAKE_CURRENT_SOURCE_DIR}/zm @ONLY) + configure_file(zoneminder.el6.logrotate.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.el6.logrotate @ONLY) + configure_file(zoneminder.el6.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.el6.conf @ONLY) endif(ZM_TARGET_DISTRO STREQUAL "el7") # Download jscalendar & move files into position From e3351441c7602dc8ed9e11523e785dcf8cd6ca33 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Sun, 15 Feb 2015 15:59:58 -0600 Subject: [PATCH 18/18] fix cmake error, rename init script to zoneminder, modify el6 target distro --- CMakeLists.txt | 9 ++++++++- distros/redhat/CMakeLists.txt | 4 ++-- distros/redhat/{zm.in => zoneminder.sysvinit.in} | 0 3 files changed, 10 insertions(+), 3 deletions(-) rename distros/redhat/{zm.in => zoneminder.sysvinit.in} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index edcde51dd..a4c830a8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,11 +72,18 @@ set(ZM_PERL_USE_PATH "${CMAKE_INSTALL_PREFIX}/${ZM_PERL_SUBPREFIX}" CACHE PATH " set(ZM_TARGET_DISTRO "" CACHE STRING "Build ZoneMinder for a specific distribution. Currently, valid names are: f19, f20, el6, OS13") # Reassign some variables if a target distro has been specified -if((ZM_TARGET_DISTRO STREQUAL "f19") OR (ZM_TARGET_DISTRO STREQUAL "f20") OR (ZM_TARGET_DISTRO STREQUAL "el6")) +if((ZM_TARGET_DISTRO STREQUAL "f19") OR (ZM_TARGET_DISTRO STREQUAL "f20")) set(ZM_RUNDIR "/var/run/zoneminder") set(ZM_SOCKDIR "/var/lib/zoneminder/sock") set(ZM_TMPDIR "/var/lib/zoneminder/temp") set(ZM_LOGDIR "/var/log/zoneminder") +elseif(ZM_TARGET_DISTRO STREQUAL "el6") + set(ZM_RUNDIR "/var/run/zoneminder") + set(ZM_SOCKDIR "/var/lib/zoneminder/sock") + set(ZM_TMPDIR "/var/lib/zoneminder/temp") + set(ZM_LOGDIR "/var/log/zoneminder") + set(ZM_WEBDIR "/usr/share/zoneminder/www") + set(ZM_CGIDIR "/usr/libexec/zoneminder/cgi-bin") elseif(ZM_TARGET_DISTRO STREQUAL "el7") set(ZM_RUNDIR "/var/run/zoneminder") set(ZM_SOCKDIR "/var/lib/zoneminder/sock") diff --git a/distros/redhat/CMakeLists.txt b/distros/redhat/CMakeLists.txt index b154748ac..7422be107 100644 --- a/distros/redhat/CMakeLists.txt +++ b/distros/redhat/CMakeLists.txt @@ -10,7 +10,7 @@ if(ZM_TARGET_DISTRO STREQUAL "el7") configure_file(zoneminder.tmpfiles.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.tmpfiles @ONLY) configure_file(zoneminder.el7.logrotate.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.el7.logrotate @ONLY) else(ZM_TARGET_DISTRO STREQUAL "el7") - configure_file(zm.in ${CMAKE_CURRENT_SOURCE_DIR}/zm @ONLY) + configure_file(zoneminder.sysvinit.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.sysvinit @ONLY) configure_file(zoneminder.el6.logrotate.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.el6.logrotate @ONLY) configure_file(zoneminder.el6.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.el6.conf @ONLY) endif(ZM_TARGET_DISTRO STREQUAL "el7") @@ -62,7 +62,7 @@ if(ZM_TARGET_DISTRO STREQUAL "el7") else(ZM_TARGET_DISTRO STREQUAL "el7") install(FILES zoneminder.el6.conf DESTINATION /etc/httpd/conf.d RENAME zoneminder.conf PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) install(FILES zoneminder.el6.logrotate DESTINATION /etc/logrotate.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) - install(FILES zm DESTINATION /etc/rc.d/init.d PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) + install(FILES zoneminder.sysvinit DESTINATION /etc/rc.d/init.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) endif(ZM_TARGET_DISTRO STREQUAL "el7") # Install jscalendar diff --git a/distros/redhat/zm.in b/distros/redhat/zoneminder.sysvinit.in similarity index 100% rename from distros/redhat/zm.in rename to distros/redhat/zoneminder.sysvinit.in