fix cmake error, rename init script to zoneminder, modify el6 target distro

This commit is contained in:
Andrew Bauer 2015-02-15 15:59:58 -06:00
parent 18abb3761d
commit e3351441c7
3 changed files with 10 additions and 3 deletions

View File

@ -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")

View File

@ -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