Merge pull request #704 from clipo1979/master
Make el6 and el7 build process a little more automated
This commit is contained in:
commit
568fea61fa
|
@ -73,17 +73,26 @@ 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")
|
||||
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")
|
||||
|
|
|
@ -1,10 +1,18 @@
|
|||
# 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)
|
||||
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(zoneminder.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder @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")
|
||||
|
||||
# Download jscalendar & move files into position
|
||||
|
@ -54,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 zoneminder 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
|
||||
|
|
|
@ -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"
|
||||
<Directory "/usr/share/zoneminder/www">
|
||||
Alias /zm "@ZM_WEBDIR@"
|
||||
<Directory "@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
|
||||
</Directory>
|
||||
|
||||
ScriptAlias /cgi-bin/zm "/usr/libexec/zoneminder/cgi-bin"
|
||||
<Directory "/usr/libexec/zoneminder/cgi-bin">
|
||||
ScriptAlias /cgi-bin/zm "@ZM_WEBDIR@"
|
||||
<Directory "@ZM_WEBDIR@">
|
||||
AllowOverride All
|
||||
Options ExecCGI
|
||||
Order allow,deny
|
|
@ -1,4 +1,4 @@
|
|||
/var/log/zoneminder/*log
|
||||
@ZM_LOGDIR@/*log
|
||||
{
|
||||
weekly
|
||||
notifempty
|
|
@ -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"
|
||||
<Directory "/usr/share/zoneminder/www">
|
||||
Alias /zm "@ZM_WEBDIR@"
|
||||
<Directory "@ZM_WEBDIR@">
|
||||
Options -Indexes +MultiViews +FollowSymLinks
|
||||
AllowOverride All
|
||||
<IfModule mod_authz_core.c>
|
||||
|
@ -26,8 +26,8 @@ Alias /zm "/usr/share/zoneminder/www"
|
|||
# php_value short_open_tag 1
|
||||
</Directory>
|
||||
|
||||
ScriptAlias /cgi-bin-zm "/usr/libexec/zoneminder/cgi-bin"
|
||||
<Directory "/usr/libexec/zoneminder/cgi-bin">
|
||||
ScriptAlias /cgi-bin-zm "@ZM_CGIDIR@"
|
||||
<Directory "@ZM_CGIDIR@">
|
||||
AllowOverride All
|
||||
Options ExecCGI
|
||||
<IfModule mod_authz_core.c>
|
|
@ -1,8 +0,0 @@
|
|||
/var/log/zoneminder/*.log {
|
||||
missingok
|
||||
notifempty
|
||||
sharedscripts
|
||||
postrotate
|
||||
/usr/bin/zmpkg.pl logrot 2> /dev/null > /dev/null || :
|
||||
endscript
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
@ZM_LOGDIR@/*.log {
|
||||
missingok
|
||||
notifempty
|
||||
sharedscripts
|
||||
postrotate
|
||||
@BINDIR@/zmpkg.pl logrot 2> /dev/null > /dev/null || :
|
||||
endscript
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
d /run/zoneminder 0755 apache apache
|
|
@ -0,0 +1 @@
|
|||
d @ZM_RUNDIR@ 0755 @WEB_USER@ @WEB_GROUP@
|
Loading…
Reference in New Issue