Merge pull request #532 from SteveGilvarry/feature-h264-videostorage
Merge master to feature-h264-videostorage and restore web GUI
This commit is contained in:
commit
94bb3d6fa1
|
@ -10,3 +10,5 @@ stamp-h1
|
|||
stamp-h.in
|
||||
scripts/ZoneMinder/blib
|
||||
Makefile.in
|
||||
Makefile
|
||||
docs/_build
|
||||
|
|
15
.travis.yml
15
.travis.yml
|
@ -18,11 +18,10 @@ compiler:
|
|||
- gcc
|
||||
before_install:
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get upgrade -y -qq
|
||||
- sudo apt-get install -y -qq apache2 mysql-server php5 php5-mysql build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libpcre3 libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm subversion automake autoconf cmake libjpeg-turbo8-dev libjpeg-turbo8 apache2-mpm-prefork libapache2-mod-php5 php5-cli libtheora-dev libvorbis-dev libvpx-dev libx264-dev 2>&1 > /dev/null
|
||||
- sudo apt-get install -y -qq libpolkit-gobject-1-dev zlib1g-dev apache2 mysql-server php5 php5-mysql build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm automake autoconf cmake libjpeg-turbo8-dev apache2-mpm-prefork libapache2-mod-php5 php5-cli libtheora-dev libvorbis-dev libvpx-dev libx264-dev 2>&1 > /dev/null
|
||||
install:
|
||||
- git clone --depth=10 --branch=master git://source.ffmpeg.org/ffmpeg.git
|
||||
- cd ffmpeg
|
||||
- git clone -b n2.4.1 --depth=1 git://source.ffmpeg.org/ffmpeg.git
|
||||
- cd ffmpeg
|
||||
- ./configure --enable-shared --enable-swscale --enable-gpl --enable-libx264 --enable-libvpx --enable-libvorbis --enable-libtheora
|
||||
- make -j `grep processor /proc/cpuinfo|wc -l`
|
||||
- sudo make install
|
||||
|
@ -34,16 +33,16 @@ before_script:
|
|||
- if [ "$ZM_BUILDMETHOD" = "autotools" ]; then autoheader; fi
|
||||
- if [ "$ZM_BUILDMETHOD" = "autotools" ]; then automake --force-missing --add-missing; fi
|
||||
- if [ "$ZM_BUILDMETHOD" = "autotools" ]; then autoconf; fi
|
||||
- mysql -uroot -e "CREATE DATABASE IF NOT EXISTS zm"
|
||||
- mysql -uroot -e "GRANT ALL ON zm.* TO 'zmuser'@'localhost' IDENTIFIED BY 'zmpass'";
|
||||
- mysql -uroot -e "FLUSH PRIVILEGES"
|
||||
script:
|
||||
- if [ "$ZM_BUILDMETHOD" = "autotools" ]; then ./configure --prefix=/usr --with-libarch=lib/$DEB_HOST_GNU_TYPE --host=$DEB_HOST_GNU_TYPE --build=$DEB_BUILD_GNU_TYPE --with-mysql=/usr --with-ffmpeg=/usr --with-webdir=/usr/share/zoneminder/www --with-cgidir=/usr/libexec/zoneminder/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-crashtrace=yes --disable-debug --enable-mmap=yes ZM_SSL_LIB=openssl; fi
|
||||
- if [ "$ZM_BUILDMETHOD" = "cmake" ]; then cmake -DCMAKE_INSTALL_PREFIX="/usr"; fi
|
||||
- make
|
||||
- sudo make install
|
||||
after_success:
|
||||
- if [ "$ZM_BUILDMETHOD" = "cmake" ]; then sudo ./zmlinkcontent.sh; fi
|
||||
- mysql -uroot -e "CREATE DATABASE IF NOT EXISTS zm"
|
||||
- mysql -uroot -e "GRANT ALL ON zm.* TO 'zmuser'@'localhost' IDENTIFIED BY 'zmpass'";
|
||||
- mysql -uroot -e "FLUSH PRIVILEGES"
|
||||
- mysql -uzmuser -pzmpass < db/zm_create.sql
|
||||
- mysql -uzmuser -pzmpass zm < db/test.monitor.sql
|
||||
- sudo zmpkg.pl start
|
||||
- sudo zmfilter.pl -f purgewhenfull
|
||||
|
|
424
CMakeLists.txt
424
CMakeLists.txt
|
@ -9,15 +9,20 @@
|
|||
# For more information and installation, see the INSTALL file
|
||||
#
|
||||
cmake_minimum_required (VERSION 2.6)
|
||||
project (ZoneMinder)
|
||||
# ZoneMinder version
|
||||
set(ZoneMinder_VERSION "1.26.3")
|
||||
project (zoneminder)
|
||||
set(zoneminder_VERSION "1.27.99.0")
|
||||
|
||||
# CMake does not allow out-of-source build if CMakeCache.exists in the source folder. Abort and notify the user to save him from headache why it doesn't work.
|
||||
if((NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)) AND (EXISTS "${CMAKE_SOURCE_DIR}/CMakeCache.txt"))
|
||||
message(FATAL_ERROR " You are attempting to do an out-of-source build, but a cmake cache file for an in-source build exists. Please delete the file CMakeCache.txt from the source folder to proceed.")
|
||||
endif((NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)) AND (EXISTS "${CMAKE_SOURCE_DIR}/CMakeCache.txt"))
|
||||
|
||||
# Default build type. To change the build type, use the CMAKE_BUILD_TYPE configuration option.
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type: Release or Debug" FORCE)
|
||||
endif(NOT CMAKE_BUILD_TYPE)
|
||||
|
||||
# Can make finding problems easier when troubleshooting.
|
||||
# Can assist in troubleshooting
|
||||
#set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||
#set(CMAKE_INSTALL_ALWAYS ON)
|
||||
|
||||
|
@ -28,25 +33,25 @@ set(CMAKE_C_FLAGS_DEBUG "-Wall -D__STDC_CONSTANT_MACROS -g")
|
|||
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -D__STDC_CONSTANT_MACROS -g")
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
||||
|
||||
# Modules that we need:
|
||||
include (GNUInstallDirs)
|
||||
include (CheckIncludeFile)
|
||||
include (CheckIncludeFiles)
|
||||
include (CheckFunctionExists)
|
||||
include (CheckPrototypeDefinition)
|
||||
include (CheckPrototypeDefinition_fixed)
|
||||
include (CheckTypeSize)
|
||||
include (CheckStructHasMember)
|
||||
|
||||
# Default variables for some configuration options
|
||||
mark_as_advanced(FORCE ZM_EXTRA_LIBS ZM_MYSQL_ENGINE ZM_NO_MMAP ZM_NO_CRASHTRACE CMAKE_INSTALL_FULL_BINDIR)
|
||||
# Configuration options
|
||||
mark_as_advanced(FORCE ZM_EXTRA_LIBS ZM_MYSQL_ENGINE ZM_NO_MMAP CMAKE_INSTALL_FULL_BINDIR ZM_PERL_SUBPREFIX ZM_PERL_USE_PATH ZM_TARGET_DISTRO)
|
||||
set(ZM_RUNDIR "/var/run/zm" CACHE PATH "Location of transient process files, default: /var/run/zm")
|
||||
set(ZM_TMPDIR "/tmp/zm" CACHE PATH "Location of temporary files, default: /tmp/zm")
|
||||
set(ZM_SOCKDIR "/var/run/zm" CACHE PATH "Location of Unix domain socket files, default /var/run/zm")
|
||||
set(ZM_TMPDIR "/var/tmp/zm" CACHE PATH "Location of temporary files, default: /tmp/zm")
|
||||
set(ZM_LOGDIR "/var/log/zm" CACHE PATH "Location of generated log files, default: /var/log/zm")
|
||||
set(ZM_WEBDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/zoneminder/www" CACHE PATH "Location of the web files, default: <prefix>/${CMAKE_INSTALL_DATADIR}/zoneminder/www")
|
||||
set(ZM_CGIDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBEXECDIR}/zoneminder/cgi-bin" CACHE PATH "Location of the cgi-bin files, default: <prefix>/${CMAKE_INSTALL_LIBEXECDIR}/zoneminder/cgi-bin")
|
||||
set(ZM_CONTENTDIR "/var/lib/zoneminder" CACHE PATH "Location of dynamic content (events and images), default: /var/lib/zoneminder")
|
||||
# This one is not needed anymore. we do automatic detection of whats available, let ZM know and have ZM decide
|
||||
#set(ZM_SSL_LIB "openssl" CACHE STRING "Library to use for ssl functions, default: openssl")
|
||||
set(ZM_DB_HOST "localhost" CACHE STRING "Hostname where ZoneMinder database located, default: localhost")
|
||||
set(ZM_DB_NAME "zm" CACHE STRING "Name of ZoneMinder database, default: zm")
|
||||
set(ZM_DB_USER "zmuser" CACHE STRING "Name of ZoneMinder database user, default: zmuser")
|
||||
|
@ -57,34 +62,52 @@ set(ZM_WEB_GROUP "" CACHE STRING "The group apache or the local web server runs
|
|||
set(ZM_EXTRA_LIBS "" CACHE STRING "A list of optional libraries, separated by semicolons, e.g. ssl;theora")
|
||||
set(ZM_MYSQL_ENGINE "InnoDB" CACHE STRING "MySQL engine to use with database, default: InnoDB")
|
||||
set(ZM_NO_MMAP "OFF" CACHE BOOL "Set to ON to not use mmap shared memory. Shouldn't be enabled unless you experience problems with the shared memory. default: OFF")
|
||||
set(ZM_NO_CRASHTRACE "OFF" CACHE BOOL "Set to ON to skip crash trace code. Useful if zm_signal.cpp fails to compile. default: OFF")
|
||||
# Only required for cmakecacheimport:
|
||||
set(CMAKE_INSTALL_FULL_BINDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}" CACHE PATH "Override default binary directory")
|
||||
set(ZM_NO_FFMPEG "OFF" CACHE BOOL "Set to ON to skip ffmpeg checks and force building ZM without ffmpeg. default: OFF")
|
||||
set(ZM_NO_LIBVLC "OFF" CACHE BOOL "Set to ON to skip libvlc checks and force building ZM without libvlc. default: OFF")
|
||||
set(ZM_NO_CURL "OFF" CACHE BOOL "Set to ON to skip cURL checks and force building ZM without cURL. default: OFF")
|
||||
set(ZM_NO_X10 "OFF" CACHE BOOL "Set to ON to build ZoneMinder without X10 support. default: OFF")
|
||||
set(ZM_PERL_SUBPREFIX "${CMAKE_INSTALL_LIBDIR}/perl5" CACHE PATH "Use a different directory for the zm perl modules. NOTE: This is a subprefix, e.g. lib will be turned into <prefix>/lib, default: <libdir>/perl5")
|
||||
set(ZM_PERL_USE_PATH "${CMAKE_INSTALL_PREFIX}/${ZM_PERL_SUBPREFIX}" CACHE PATH "Override the include path for zm perl modules. Useful if you are moving the perl modules without using the ZM_PERL_SUBPREFIX option. default: <prefix>/<zmperlsubprefix>")
|
||||
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"))
|
||||
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 "OS13")
|
||||
set(ZM_RUNDIR "/var/run/zoneminder")
|
||||
set(ZM_TMPDIR "/var/run/zoneminder")
|
||||
set(ZM_CONTENTDIR "/var/run/zoneminder")
|
||||
set(ZM_LOGDIR "/var/log/zoneminder")
|
||||
set(ZM_WEB_USER "wwwrun")
|
||||
set(ZM_WEB_GROUP "www")
|
||||
set(ZM_WEBDIR "/srv/www/htdocs/zoneminder")
|
||||
set(ZM_CGIDIR "/srv/www/cgi-bin")
|
||||
endif((ZM_TARGET_DISTRO STREQUAL "f19") OR (ZM_TARGET_DISTRO STREQUAL "f20") OR (ZM_TARGET_DISTRO STREQUAL "el6"))
|
||||
|
||||
# Required for certain checks to work
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} stdio.h stdlib.h math.h signal.h)
|
||||
# Required for including headers from the this folder
|
||||
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
|
||||
include_directories("${CMAKE_BINARY_DIR}")
|
||||
# This is required to enable searching in lib64 (if exists), do not change
|
||||
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)
|
||||
|
||||
# Check for misc required stuff
|
||||
# System checks
|
||||
check_include_file("linux/videodev.h" HAVE_LINUX_VIDEODEV_H)
|
||||
check_include_file("linux/videodev2.h" HAVE_LINUX_VIDEODEV2_H)
|
||||
check_include_file("execinfo.h" HAVE_EXECINFO_H)
|
||||
check_include_file("ucontext.h" HAVE_UCONTEXT_H)
|
||||
check_include_file("sys/sendfile.h" HAVE_SYS_SENDFILE_H)
|
||||
check_include_file("sys/syscall.h" HAVE_SYS_SYSCALL_H)
|
||||
check_function_exists("syscall" HAVE_SYSCALL)
|
||||
check_function_exists("sendfile" HAVE_SENDFILE)
|
||||
check_function_exists("backtrace" HAVE_DECL_BACKTRACE)
|
||||
check_function_exists("backtrace_symbols" HAVE_DECL_BACKTRACE_SYMBOLS)
|
||||
check_function_exists("posix_memalign" HAVE_POSIX_MEMALIGN)
|
||||
check_function_exists("strsignal" HAVE_STRSIGNAL)
|
||||
check_prototype_definition("round" "double round (double x)" "0.0" "math.h" HAVE_DECL_ROUND)
|
||||
check_type_size("siginfo_t" SIGINFO_T)
|
||||
check_type_size("ucontext_t" UCONTEXT_T)
|
||||
check_type_size("struct sigcontext" STRUCT_SIGCONTEXT)
|
||||
check_struct_has_member("struct sigcontext" eip signal.h HAVE_STRUCT_SIGCONTEXT_EIP)
|
||||
check_struct_has_member("struct sigcontext" rip signal.h HAVE_STRUCT_SIGCONTEXT_RIP)
|
||||
check_type_size("siginfo_t" HAVE_SIGINFO_T)
|
||||
check_type_size("ucontext_t" HAVE_UCONTEXT_T)
|
||||
|
||||
# *** LIBRARY CHECKS ***
|
||||
|
||||
|
@ -92,19 +115,43 @@ check_struct_has_member("struct sigcontext" rip signal.h HAVE_STRUCT_SIGCONTEXT_
|
|||
find_package(ZLIB)
|
||||
if(ZLIB_FOUND)
|
||||
set(HAVE_LIBZLIB 1)
|
||||
list(APPEND ZM_BIN_LIBS ${ZLIB_LIBRARIES})
|
||||
include_directories(${ZLIB_INCLUDE_DIR})
|
||||
list(APPEND ZM_BIN_LIBS "${ZLIB_LIBRARIES}")
|
||||
include_directories("${ZLIB_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${ZLIB_INCLUDE_DIR}")
|
||||
check_include_file("zlib.h" HAVE_ZLIB_H)
|
||||
set(optlibsfound "${optlibsfound} zlib")
|
||||
else(ZLIB_FOUND)
|
||||
set(optlibsnotfound "${optlibsnotfound} zlib")
|
||||
endif(ZLIB_FOUND)
|
||||
|
||||
# Do not check for cURL if ZM_NO_CURL is on
|
||||
if(NOT ZM_NO_CURL)
|
||||
# cURL
|
||||
find_package(CURL)
|
||||
if(CURL_FOUND)
|
||||
set(HAVE_LIBCURL 1)
|
||||
list(APPEND ZM_BIN_LIBS ${CURL_LIBRARIES})
|
||||
include_directories(${CURL_INCLUDE_DIRS})
|
||||
set(CMAKE_REQUIRED_INCLUDES ${CURL_INCLUDE_DIRS})
|
||||
check_include_file("curl/curl.h" HAVE_CURL_CURL_H)
|
||||
set(optlibsfound "${optlibsfound} cURL")
|
||||
else(CURL_FOUND)
|
||||
set(optlibsnotfound "${optlibsnotfound} cURL")
|
||||
endif(CURL_FOUND)
|
||||
endif(NOT ZM_NO_CURL)
|
||||
|
||||
# jpeg
|
||||
find_package(JPEG)
|
||||
if(JPEG_FOUND)
|
||||
set(HAVE_LIBJPEG 1)
|
||||
list(APPEND ZM_BIN_LIBS ${JPEG_LIBRARIES})
|
||||
include_directories(${JPEG_INCLUDE_DIR})
|
||||
check_include_files("stdio.h;jpeglib.h" HAVE_JPEGLIB_H)
|
||||
list(APPEND ZM_BIN_LIBS "${JPEG_LIBRARIES}")
|
||||
#link_directories(${JPEG_LIBRARY})
|
||||
include_directories("${JPEG_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${JPEG_INCLUDE_DIR}")
|
||||
check_include_files("stdio.h;jpeglib.h" HAVE_JPEGLIB_H)
|
||||
if(NOT HAVE_JPEGLIB_H)
|
||||
message(FATAL_ERROR " zm requires libjpeg headers - check that libjpeg development packages are installed")
|
||||
endif(NOT HAVE_JPEGLIB_H)
|
||||
else(JPEG_FOUND)
|
||||
message(FATAL_ERROR "zm requires jpeg but it was not found on your system")
|
||||
endif(JPEG_FOUND)
|
||||
|
@ -113,104 +160,225 @@ endif(JPEG_FOUND)
|
|||
find_package(OpenSSL)
|
||||
if(OPENSSL_FOUND)
|
||||
set(HAVE_LIBOPENSSL 1)
|
||||
list(APPEND ZM_BIN_LIBS ${OPENSSL_LIBRARIES})
|
||||
include_directories(${OPENSSL_INCLUDE_DIR})
|
||||
check_include_file("openssl/md5.h" HAVE_OPENSSL_MD5_H)
|
||||
endif(OPENSSL_FOUND)
|
||||
# crypto using find_library.
|
||||
# This library should be a part of the OpenSSL package but just need to be sure
|
||||
# In any case, we still need to define HAVE_LIBCRYPTO for zm if its available
|
||||
find_library(CRYPTO_LIBRARIES crypto)
|
||||
if(CRYPTO_LIBRARIES)
|
||||
set(HAVE_LIBCRYPTO 1)
|
||||
list(APPEND ZM_BIN_LIBS ${CRYPTO_LIBRARIES})
|
||||
endif(CRYPTO_LIBRARIES)
|
||||
list(APPEND ZM_BIN_LIBS "${OPENSSL_LIBRARIES}")
|
||||
include_directories("${OPENSSL_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}")
|
||||
check_include_file("openssl/md5.h" HAVE_OPENSSL_MD5_H)
|
||||
set(optlibsfound "${optlibsfound} OpenSSL")
|
||||
else(OPENSSL_FOUND)
|
||||
set(optlibsnotfound "${optlibsnotfound} OpenSSL")
|
||||
endif(OPENSSL_FOUND)
|
||||
|
||||
# pthread using find_library
|
||||
# pthread (using find_library and find_path)
|
||||
find_library(PTHREAD_LIBRARIES pthread)
|
||||
if(PTHREAD_LIBRARIES)
|
||||
set(HAVE_LIBPTHREAD 1)
|
||||
list(APPEND ZM_BIN_LIBS ${PTHREAD_LIBRARIES})
|
||||
list(APPEND ZM_BIN_LIBS "${PTHREAD_LIBRARIES}")
|
||||
find_path(PTHREAD_INCLUDE_DIR pthread.h)
|
||||
if(PTHREAD_INCLUDE_DIR)
|
||||
include_directories("${PTHREAD_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${PTHREAD_INCLUDE_DIR}")
|
||||
endif(PTHREAD_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE PTHREAD_LIBRARIES PTHREAD_INCLUDE_DIR)
|
||||
check_include_file("pthread.h" HAVE_PTHREAD_H)
|
||||
if(NOT HAVE_PTHREAD_H)
|
||||
message(FATAL_ERROR " zm requires pthread headers - check that pthread development packages are installed")
|
||||
endif(NOT HAVE_PTHREAD_H)
|
||||
else(PTHREAD_LIBRARIES)
|
||||
message(FATAL_ERROR "zm requires pthread but it was not found on your system")
|
||||
endif(PTHREAD_LIBRARIES)
|
||||
|
||||
# pcre using find_library
|
||||
# pcre (using find_library and find_path)
|
||||
find_library(PCRE_LIBRARIES pcre)
|
||||
if(PCRE_LIBRARIES)
|
||||
set(HAVE_LIBPCRE 1)
|
||||
list(APPEND ZM_BIN_LIBS ${PCRE_LIBRARIES})
|
||||
list(APPEND ZM_BIN_LIBS "${PCRE_LIBRARIES}")
|
||||
find_path(PCRE_INCLUDE_DIR pcre.h)
|
||||
if(PCRE_INCLUDE_DIR)
|
||||
include_directories("${PCRE_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${PCRE_INCLUDE_DIR}")
|
||||
endif(PCRE_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE PCRE_LIBRARIES PCRE_INCLUDE_DIR)
|
||||
check_include_file("pcre.h" HAVE_PCRE_H)
|
||||
set(optlibsfound "${optlibsfound} PCRE")
|
||||
else(PCRE_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} PCRE")
|
||||
endif(PCRE_LIBRARIES)
|
||||
|
||||
# gcrypt using find_library
|
||||
# gcrypt (using find_library and find_path)
|
||||
find_library(GCRYPT_LIBRARIES gcrypt)
|
||||
if(GCRYPT_LIBRARIES)
|
||||
set(HAVE_LIBGCRYPT 1)
|
||||
list(APPEND ZM_BIN_LIBS ${GCRYPT_LIBRARIES})
|
||||
list(APPEND ZM_BIN_LIBS "${GCRYPT_LIBRARIES}")
|
||||
find_path(GCRYPT_INCLUDE_DIR gcrypt.h)
|
||||
if(GCRYPT_INCLUDE_DIR)
|
||||
include_directories("${GCRYPT_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${GCRYPT_INCLUDE_DIR}")
|
||||
endif(GCRYPT_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE GCRYPT_LIBRARIES GCRYPT_INCLUDE_DIR)
|
||||
check_include_file("gcrypt.h" HAVE_GCRYPT_H)
|
||||
set(optlibsfound "${optlibsfound} GCrypt")
|
||||
else(GCRYPT_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} GCrypt")
|
||||
endif(GCRYPT_LIBRARIES)
|
||||
|
||||
# gnutls using find_library
|
||||
# gnutls (using find_library and find_path)
|
||||
find_library(GNUTLS_LIBRARIES gnutls)
|
||||
if(GNUTLS_LIBRARIES)
|
||||
set(HAVE_LIBGNUTLS 1)
|
||||
list(APPEND ZM_BIN_LIBS ${GNUTLS_LIBRARIES})
|
||||
list(APPEND ZM_BIN_LIBS "${GNUTLS_LIBRARIES}")
|
||||
find_path(GNUTLS_INCLUDE_DIR gnutls/gnutls.h)
|
||||
if(GNUTLS_INCLUDE_DIR)
|
||||
include_directories("${GNUTLS_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${GNUTLS_INCLUDE_DIR}")
|
||||
endif(GNUTLS_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE GNUTLS_LIBRARIES GNUTLS_INCLUDE_DIR)
|
||||
check_include_file("gnutls/openssl.h" HAVE_GNUTLS_OPENSSL_H)
|
||||
check_include_file("gnutls/gnutls.h" HAVE_GNUTLS_GNUTLS_H)
|
||||
set(optlibsfound "${optlibsfound} GnuTLS")
|
||||
else(GNUTLS_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} GnuTLS")
|
||||
endif(GNUTLS_LIBRARIES)
|
||||
|
||||
# mysqlclient using find_library
|
||||
# mysqlclient (using find_library and find_path)
|
||||
find_library(MYSQLCLIENT_LIBRARIES mysqlclient PATH_SUFFIXES mysql)
|
||||
if(MYSQLCLIENT_LIBRARIES)
|
||||
set(HAVE_LIBMYSQLCLIENT 1)
|
||||
list(APPEND ZM_BIN_LIBS ${MYSQLCLIENT_LIBRARIES})
|
||||
list(APPEND ZM_BIN_LIBS "${MYSQLCLIENT_LIBRARIES}")
|
||||
find_path(MYSQLCLIENT_INCLUDE_DIR mysql/mysql.h)
|
||||
if(MYSQLCLIENT_INCLUDE_DIR)
|
||||
include_directories("${MYSQLCLIENT_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${MYSQLCLIENT_INCLUDE_DIR}")
|
||||
endif(MYSQLCLIENT_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE MYSQLCLIENT_LIBRARIES MYSQLCLIENT_INCLUDE_DIR)
|
||||
check_include_file("mysql/mysql.h" HAVE_MYSQL_H)
|
||||
if(NOT HAVE_MYSQL_H)
|
||||
message(FATAL_ERROR "zm requires MySQL headers - check that MySQL development packages are installed")
|
||||
endif(NOT HAVE_MYSQL_H)
|
||||
else(MYSQLCLIENT_LIBRARIES)
|
||||
message(FATAL_ERROR "zm requires mysqlclient but it was not found on your system")
|
||||
endif(MYSQLCLIENT_LIBRARIES)
|
||||
|
||||
# avformat using find_library
|
||||
find_library(AVFORMAT_LIBRARIES avformat)
|
||||
if(AVFORMAT_LIBRARIES)
|
||||
set(HAVE_LIBAVFORMAT 1)
|
||||
list(APPEND ZM_BIN_LIBS ${AVFORMAT_LIBRARIES})
|
||||
check_include_file("libavformat/avformat.h" HAVE_LIBAVFORMAT_AVFORMAT_H)
|
||||
endif(AVFORMAT_LIBRARIES)
|
||||
set(PATH_FFMPEG "")
|
||||
set(OPT_FFMPEG "no")
|
||||
# Do not check for ffmpeg if ZM_NO_FFMPEG is on
|
||||
if(NOT ZM_NO_FFMPEG)
|
||||
# avformat (using find_library and find_path)
|
||||
find_library(AVFORMAT_LIBRARIES avformat)
|
||||
if(AVFORMAT_LIBRARIES)
|
||||
set(HAVE_LIBAVFORMAT 1)
|
||||
list(APPEND ZM_BIN_LIBS "${AVFORMAT_LIBRARIES}")
|
||||
find_path(AVFORMAT_INCLUDE_DIR "libavformat/avformat.h")
|
||||
if(AVFORMAT_INCLUDE_DIR)
|
||||
include_directories("${AVFORMAT_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${AVFORMAT_INCLUDE_DIR}")
|
||||
endif(AVFORMAT_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE AVFORMAT_LIBRARIES AVFORMAT_INCLUDE_DIR)
|
||||
check_include_file("libavformat/avformat.h" HAVE_LIBAVFORMAT_AVFORMAT_H)
|
||||
set(optlibsfound "${optlibsfound} AVFormat")
|
||||
else(AVFORMAT_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} AVFormat")
|
||||
endif(AVFORMAT_LIBRARIES)
|
||||
|
||||
# avcodec using find_library
|
||||
find_library(AVCODEC_LIBRARIES avcodec)
|
||||
if(AVCODEC_LIBRARIES)
|
||||
set(HAVE_LIBAVCODEC 1)
|
||||
list(APPEND ZM_BIN_LIBS ${AVCODEC_LIBRARIES})
|
||||
check_include_file("libavcodec/avcodec.h" HAVE_LIBAVCODEC_AVCODEC_H)
|
||||
endif(AVCODEC_LIBRARIES)
|
||||
# avcodec (using find_library and find_path)
|
||||
find_library(AVCODEC_LIBRARIES avcodec)
|
||||
if(AVCODEC_LIBRARIES)
|
||||
set(HAVE_LIBAVCODEC 1)
|
||||
list(APPEND ZM_BIN_LIBS "${AVCODEC_LIBRARIES}")
|
||||
find_path(AVCODEC_INCLUDE_DIR "libavcodec/avcodec.h")
|
||||
if(AVCODEC_INCLUDE_DIR)
|
||||
include_directories("${AVCODEC_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${AVCODEC_INCLUDE_DIR}")
|
||||
endif(AVCODEC_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE AVCODEC_LIBRARIES AVCODEC_INCLUDE_DIR)
|
||||
check_include_file("libavcodec/avcodec.h" HAVE_LIBAVCODEC_AVCODEC_H)
|
||||
set(optlibsfound "${optlibsfound} AVCodec")
|
||||
else(AVCODEC_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} AVCodec")
|
||||
endif(AVCODEC_LIBRARIES)
|
||||
|
||||
# avdevice using find_library
|
||||
find_library(AVDEVICE_LIBRARIES avdevice)
|
||||
if(AVDEVICE_LIBRARIES)
|
||||
set(HAVE_LIBAVDEVICE 1)
|
||||
list(APPEND ZM_BIN_LIBS ${AVDEVICE_LIBRARIES})
|
||||
check_include_file("libavdevice/avdevice.h" HAVE_LIBAVDEVICE_AVDEVICE_H)
|
||||
endif(AVDEVICE_LIBRARIES)
|
||||
# avdevice (using find_library and find_path)
|
||||
find_library(AVDEVICE_LIBRARIES avdevice)
|
||||
if(AVDEVICE_LIBRARIES)
|
||||
set(HAVE_LIBAVDEVICE 1)
|
||||
list(APPEND ZM_BIN_LIBS "${AVDEVICE_LIBRARIES}")
|
||||
find_path(AVDEVICE_INCLUDE_DIR "libavdevice/avdevice.h")
|
||||
if(AVDEVICE_INCLUDE_DIR)
|
||||
include_directories("${AVDEVICE_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${AVDEVICE_INCLUDE_DIR}")
|
||||
endif(AVDEVICE_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE AVDEVICE_LIBRARIES AVDEVICE_INCLUDE_DIR)
|
||||
check_include_file("libavdevice/avdevice.h" HAVE_LIBAVDEVICE_AVDEVICE_H)
|
||||
set(optlibsfound "${optlibsfound} AVDevice")
|
||||
else(AVDEVICE_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} AVDevice")
|
||||
endif(AVDEVICE_LIBRARIES)
|
||||
|
||||
# avutil using find_library
|
||||
find_library(AVUTIL_LIBRARIES avutil)
|
||||
if(AVUTIL_LIBRARIES)
|
||||
set(HAVE_LIBAVUTIL 1)
|
||||
list(APPEND ZM_BIN_LIBS ${AVUTIL_LIBRARIES})
|
||||
check_include_file("libavutil/avutil.h" HAVE_LIBAVUTIL_AVUTIL_H)
|
||||
check_include_file("libavutil/mathematics.h" HAVE_LIBAVUTIL_MATHEMATICS_H)
|
||||
endif(AVUTIL_LIBRARIES)
|
||||
# avutil (using find_library and find_path)
|
||||
find_library(AVUTIL_LIBRARIES avutil)
|
||||
if(AVUTIL_LIBRARIES)
|
||||
set(HAVE_LIBAVUTIL 1)
|
||||
list(APPEND ZM_BIN_LIBS "${AVUTIL_LIBRARIES}")
|
||||
find_path(AVUTIL_INCLUDE_DIR "libavutil/avutil.h")
|
||||
if(AVUTIL_INCLUDE_DIR)
|
||||
include_directories("${AVUTIL_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${AVUTIL_INCLUDE_DIR}")
|
||||
endif(AVUTIL_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE AVUTIL_LIBRARIES AVUTIL_INCLUDE_DIR)
|
||||
check_include_file("libavutil/avutil.h" HAVE_LIBAVUTIL_AVUTIL_H)
|
||||
check_include_file("libavutil/mathematics.h" HAVE_LIBAVUTIL_MATHEMATICS_H)
|
||||
set(optlibsfound "${optlibsfound} AVUtil")
|
||||
else(AVUTIL_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} AVUtil")
|
||||
endif(AVUTIL_LIBRARIES)
|
||||
|
||||
# swscale using find_library
|
||||
find_library(SWSCALE_LIBRARIES swscale)
|
||||
if(SWSCALE_LIBRARIES)
|
||||
set(HAVE_LIBSWSCALE 1)
|
||||
list(APPEND ZM_BIN_LIBS ${SWSCALE_LIBRARIES})
|
||||
check_include_file("libswscale/swscale.h" HAVE_LIBSWSCALE_SWSCALE_H)
|
||||
endif(SWSCALE_LIBRARIES)
|
||||
# swscale (using find_library and find_path)
|
||||
find_library(SWSCALE_LIBRARIES swscale)
|
||||
if(SWSCALE_LIBRARIES)
|
||||
set(HAVE_LIBSWSCALE 1)
|
||||
list(APPEND ZM_BIN_LIBS "${SWSCALE_LIBRARIES}")
|
||||
find_path(SWSCALE_INCLUDE_DIR "libswscale/swscale.h")
|
||||
if(SWSCALE_INCLUDE_DIR)
|
||||
include_directories("${SWSCALE_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${SWSCALE_INCLUDE_DIR}")
|
||||
endif(SWSCALE_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE SWSCALE_LIBRARIES SWSCALE_INCLUDE_DIR)
|
||||
check_include_file("libswscale/swscale.h" HAVE_LIBSWSCALE_SWSCALE_H)
|
||||
set(optlibsfound "${optlibsfound} SWScale")
|
||||
else(SWSCALE_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} SWScale")
|
||||
endif(SWSCALE_LIBRARIES)
|
||||
|
||||
# Find the path to the ffmpeg executable
|
||||
find_program(FFMPEG_EXECUTABLE ffmpeg PATH_SUFFIXES ffmpeg)
|
||||
if(FFMPEG_EXECUTABLE)
|
||||
set(PATH_FFMPEG "${FFMPEG_EXECUTABLE}")
|
||||
set(OPT_FFMPEG "yes")
|
||||
mark_as_advanced(FFMPEG_EXECUTABLE)
|
||||
endif(FFMPEG_EXECUTABLE)
|
||||
|
||||
endif(NOT ZM_NO_FFMPEG)
|
||||
|
||||
# Do not check for libvlc if ZM_NO_LIBVLC is on
|
||||
if(NOT ZM_NO_LIBVLC)
|
||||
# libvlc (using find_library and find_path)
|
||||
find_library(LIBVLC_LIBRARIES vlc)
|
||||
if(LIBVLC_LIBRARIES)
|
||||
set(HAVE_LIBVLC 1)
|
||||
list(APPEND ZM_BIN_LIBS "${LIBVLC_LIBRARIES}")
|
||||
find_path(LIBVLC_INCLUDE_DIR "vlc/vlc.h")
|
||||
if(LIBVLC_INCLUDE_DIR)
|
||||
include_directories("${LIBVLC_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${LIBVLC_INCLUDE_DIR}")
|
||||
endif(LIBVLC_INCLUDE_DIR)
|
||||
mark_as_advanced(FORCE LIBVLC_LIBRARIES LIBVLC_INCLUDE_DIR)
|
||||
check_include_file("vlc/vlc.h" HAVE_VLC_VLC_H)
|
||||
set(optlibsfound "${optlibsfound} libVLC")
|
||||
else(LIBVLC_LIBRARIES)
|
||||
set(optlibsnotfound "${optlibsnotfound} libVLC")
|
||||
endif(LIBVLC_LIBRARIES)
|
||||
endif(NOT ZM_NO_LIBVLC)
|
||||
|
||||
# *** END OF LIBRARY CHECKS ***
|
||||
|
||||
|
@ -219,17 +387,6 @@ if((NOT HAVE_LIBCRYPTO) AND (NOT HAVE_LIBGNUTLS))
|
|||
message(FATAL_ERROR " zm requires crypto or gnutls but none were found on your system")
|
||||
endif((NOT HAVE_LIBCRYPTO) AND (NOT HAVE_LIBGNUTLS))
|
||||
|
||||
# Check for absolutely required headers:
|
||||
if(NOT HAVE_MYSQL_H)
|
||||
message(FATAL_ERROR "zm requires MySQL headers - check that MySQL development packages are installed")
|
||||
endif(NOT HAVE_MYSQL_H)
|
||||
if(NOT HAVE_JPEGLIB_H)
|
||||
message(FATAL_ERROR " zm requires libjpeg headers - check that libjpeg development packages are installed")
|
||||
endif(NOT HAVE_JPEGLIB_H)
|
||||
if(NOT HAVE_PTHREAD_H)
|
||||
message(FATAL_ERROR " zm requires pthread headers - check that pthread development packages are installed")
|
||||
endif(NOT HAVE_PTHREAD_H)
|
||||
|
||||
# Check for V4L header files and enable ZM_HAS_V4L, ZM_HAS_V4L1, ZM_HAS_V4L2 accordingly
|
||||
# Setting to zeros first is required because ZM uses #define for these
|
||||
set(ZM_HAS_V4L 0)
|
||||
|
@ -251,16 +408,29 @@ set(ZM_PCRE 0)
|
|||
if(HAVE_LIBPCRE AND HAVE_PCRE_H)
|
||||
set(ZM_PCRE 1)
|
||||
endif(HAVE_LIBPCRE AND HAVE_PCRE_H)
|
||||
|
||||
# Check for mmap and enable in all components
|
||||
set(ZM_MEM_MAPPED 0)
|
||||
set(ENABLE_MMAP no)
|
||||
if(NOT ZM_NO_MMAP)
|
||||
set(ZM_MEM_MAPPED 1)
|
||||
set(ENABLE_MMAP yes)
|
||||
set(ZM_MMAP_PERLPACKAGE "Sys::Mmap")
|
||||
endif(NOT ZM_NO_MMAP)
|
||||
|
||||
# Check for authenication functions
|
||||
if(HAVE_OPENSSL_MD5_H)
|
||||
set(CMAKE_REQUIRED_LIBRARIES "${OPENSSL_LIBRARIES}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}")
|
||||
check_prototype_definition(MD5 "unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md)" "NULL" "openssl/md5.h" HAVE_MD5_OPENSSL)
|
||||
endif(HAVE_OPENSSL_MD5_H)
|
||||
if(HAVE_GNUTLS_OPENSSL_H)
|
||||
set(CMAKE_REQUIRED_LIBRARIES "${GNUTLS_LIBRARIES}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${GNUTLS_INCLUDE_DIR}")
|
||||
check_prototype_definition(MD5 "unsigned char *MD5 (const unsigned char *buf, unsigned long len, unsigned char *md)" "NULL" "gnutls/openssl.h" HAVE_MD5_GNUTLS)
|
||||
endif(HAVE_GNUTLS_OPENSSL_H)
|
||||
if(HAVE_GNUTLS_GNUTLS_H)
|
||||
set(CMAKE_REQUIRED_LIBRARIES "${GNUTLS_LIBRARIES}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${GNUTLS_INCLUDE_DIR}")
|
||||
check_prototype_definition(gnutls_fingerprint "int gnutls_fingerprint (gnutls_digest_algorithm_t algo, const gnutls_datum_t * data, void *result, size_t * result_size)" "0" "stdlib.h;gnutls/gnutls.h" HAVE_DECL_GNUTLS_FINGERPRINT)
|
||||
endif(HAVE_GNUTLS_GNUTLS_H)
|
||||
if(HAVE_MD5_OPENSSL OR HAVE_MD5_GNUTLS)
|
||||
|
@ -275,23 +445,12 @@ if(HAVE_LIBCRYPTO AND HAVE_OPENSSL_MD5_H AND HAVE_MD5_OPENSSL)
|
|||
set(HAVE_GNUTLS_OPENSSL_H 0)
|
||||
endif(HAVE_LIBCRYPTO AND HAVE_OPENSSL_MD5_H AND HAVE_MD5_OPENSSL)
|
||||
|
||||
# Disable backtrace if not available
|
||||
if((NOT ZM_NO_CRASHTRACE) AND ((NOT HAVE_DECL_BACKTRACE) OR (NOT HAVE_EXECINFO_H)))
|
||||
message(AUTHOR_WARNING " Backtrace is not available. disabling")
|
||||
set(ZM_NO_CRASHTRACE ON)
|
||||
set(HAVE_EXECINFO_H 0)
|
||||
set(HAVE_DECL_BACKTRACE 0)
|
||||
endif((NOT ZM_NO_CRASHTRACE) AND ((NOT HAVE_DECL_BACKTRACE) OR (NOT HAVE_EXECINFO_H)))
|
||||
|
||||
|
||||
if(NOT ZM_NO_MMAP)
|
||||
set(ZM_MMAP_PERLPACKAGE "Sys::Mmap")
|
||||
endif(NOT ZM_NO_MMAP)
|
||||
# Check for Perl. Version checking is removed because its ignored before CMake 2.8.8 and it seems that Perl is being detected as 5.16. instead of 5.6.0 ??
|
||||
# Check for Perl
|
||||
find_package(Perl)
|
||||
if(NOT PERL_FOUND)
|
||||
message(FATAL_ERROR "zm requires Perl 5.6.0 or newer but it was not found on your system")
|
||||
endif(NOT PERL_FOUND)
|
||||
|
||||
# Checking for perl modules requires FindPerlModules.cmake
|
||||
# Check all required modules at once
|
||||
# TODO: Add checking for the optional modules
|
||||
|
@ -319,12 +478,17 @@ endif(NOT ZM_WEB_GROUP)
|
|||
message(STATUS "Using web user: ${ZM_WEB_USER}")
|
||||
message(STATUS "Using web group: ${ZM_WEB_GROUP}")
|
||||
|
||||
# Check for polkit
|
||||
find_package(Polkit)
|
||||
if(NOT POLKIT_FOUND)
|
||||
message(FATAL_ERROR "Running ZoneMinder requires polkit. Building ZoneMinder requires the polkit development package.")
|
||||
endif(NOT POLKIT_FOUND)
|
||||
|
||||
# Some variables that zm expects
|
||||
set(ZM_PID "${ZM_RUNDIR}/zm.pid")
|
||||
set(ZM_CONFIG "/${CMAKE_INSTALL_SYSCONFDIR}/zm.conf")
|
||||
set(VERSION "${ZoneMinder_VERSION}")
|
||||
set(PATH_BUILD "${PROJECT_SOURCE_DIR}")
|
||||
set(TIME_BUILD "1000000") # Don't have a solution for this one yet
|
||||
set(VERSION "${zoneminder_VERSION}")
|
||||
set(PKGDATADIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/zoneminder")
|
||||
set(BINDIR "${CMAKE_INSTALL_FULL_BINDIR}")
|
||||
set(LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
|
||||
set(SYSCONFDIR "/${CMAKE_INSTALL_SYSCONFDIR}")
|
||||
|
@ -332,20 +496,34 @@ set(WEB_PREFIX "${ZM_WEBDIR}")
|
|||
set(CGI_PREFIX "${ZM_CGIDIR}")
|
||||
set(WEB_USER "${ZM_WEB_USER}")
|
||||
set(WEB_GROUP "${ZM_WEB_GROUP}")
|
||||
set(EXTRA_PERL_LIB "use lib '${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/perl5';")
|
||||
set(ZM_DB_TYPE "mysql")
|
||||
set(EXTRA_PERL_LIB "use lib '${ZM_PERL_USE_PATH}';")
|
||||
|
||||
# Generate files from the .in files
|
||||
configure_file(zoneminder-config.cmake config.h @ONLY)
|
||||
configure_file(zm.conf.in zm.conf @ONLY)
|
||||
configure_file(zmconfgen.pl.in zmconfgen.pl @ONLY)
|
||||
configure_file(zmlinkcontent.sh.in zmlinkcontent.sh @ONLY)
|
||||
configure_file(zm.conf.in "${CMAKE_CURRENT_BINARY_DIR}/zm.conf" @ONLY)
|
||||
configure_file(zoneminder-config.cmake "${CMAKE_CURRENT_BINARY_DIR}/config.h" @ONLY)
|
||||
configure_file(zmconfgen.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmconfgen.pl" @ONLY)
|
||||
configure_file(zmlinkcontent.sh.in "${CMAKE_CURRENT_BINARY_DIR}/zmlinkcontent.sh" @ONLY)
|
||||
|
||||
# Process subdirectories
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(scripts)
|
||||
add_subdirectory(db)
|
||||
add_subdirectory(misc)
|
||||
add_subdirectory(web)
|
||||
add_subdirectory(misc)
|
||||
|
||||
# Process distro subdirectories
|
||||
if((ZM_TARGET_DISTRO STREQUAL "f19") OR (ZM_TARGET_DISTRO STREQUAL "f20"))
|
||||
add_subdirectory(distros/fedora)
|
||||
elseif(ZM_TARGET_DISTRO STREQUAL "el6")
|
||||
add_subdirectory(distros/redhat)
|
||||
elseif(ZM_TARGET_DISTRO STREQUAL "OS13")
|
||||
add_subdirectory(distros/opensuse)
|
||||
endif((ZM_TARGET_DISTRO STREQUAL "f19") OR (ZM_TARGET_DISTRO STREQUAL "f20"))
|
||||
|
||||
# Print optional libraries detection status
|
||||
message(STATUS "Optional libraries found:${optlibsfound}")
|
||||
message(STATUS "Optional libraries not found:${optlibsnotfound}")
|
||||
|
||||
# Run ZM configuration generator
|
||||
message(STATUS "Running ZoneMinder configuration generator")
|
||||
|
@ -357,5 +535,13 @@ else(zmconfgen_result EQUAL 0)
|
|||
endif(zmconfgen_result EQUAL 0)
|
||||
|
||||
# Install zm.conf
|
||||
install(FILES zm.conf DESTINATION "/${CMAKE_INSTALL_SYSCONFDIR}")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zm.conf" DESTINATION "/${CMAKE_INSTALL_SYSCONFDIR}")
|
||||
|
||||
# Uninstall target
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake"
|
||||
IMMEDIATE @ONLY)
|
||||
add_custom_target(uninstall
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake)
|
||||
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
# ZoneMinder
|
||||
|
||||
FROM ubuntu:precise
|
||||
MAINTAINER Kyle Johnson <kjohnson@gnulnx.net>
|
||||
|
||||
# Let the container know that there is no tty
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# Resynchronize the package index files
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libpolkit-gobject-1-dev build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev \
|
||||
libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libpcre3 \
|
||||
libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm automake autoconf libjpeg-turbo8-dev \
|
||||
libjpeg-turbo8 libtheora-dev libvorbis-dev libvpx-dev libx264-dev libmp4v2-dev ffmpeg mysql-client \
|
||||
apache2 php5 php5-mysql apache2-mpm-prefork libapache2-mod-php5 php5-cli openssh-server \
|
||||
mysql-server libvlc-dev libvlc5 libvlccore-dev libvlccore5 vlc-data vlc libcurl4-openssl-dev
|
||||
|
||||
# Copy local code into our container
|
||||
ADD . /ZoneMinder
|
||||
|
||||
# Change into the ZoneMinder directory
|
||||
WORKDIR /ZoneMinder
|
||||
|
||||
# Setup the ZoneMinder build environment
|
||||
RUN aclocal && autoheader && automake --force-missing --add-missing && autoconf
|
||||
|
||||
# Configure ZoneMinder
|
||||
RUN ./configure --with-libarch=lib/$DEB_HOST_GNU_TYPE --disable-debug --host=$DEB_HOST_GNU_TYPE --build=$DEB_BUILD_GNU_TYPE --with-mysql=/usr --with-webdir=/var/www/zm --with-ffmpeg=/usr --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-mmap=yes ZM_SSL_LIB=openssl ZM_DB_USER=zm ZM_DB_PASS=zm
|
||||
|
||||
# Build ZoneMinder
|
||||
RUN make
|
||||
|
||||
# Install ZoneMinder
|
||||
RUN make install
|
||||
|
||||
# Adding the start script
|
||||
ADD utils/docker/start.sh /tmp/start.sh
|
||||
|
||||
# Ensure we can run this
|
||||
# TODO - Files ADD'ed have 755 already...why do we need this?
|
||||
RUN chmod 755 /tmp/start.sh
|
||||
|
||||
# Creating SSH privledge escalation dir
|
||||
RUN mkdir /var/run/sshd
|
||||
|
||||
# Adding apache virtual hosts file
|
||||
ADD utils/docker/apache-vhost /etc/apache2/sites-enabled/000-default
|
||||
|
||||
# Set the root passwd
|
||||
RUN echo 'root:root' | chpasswd
|
||||
|
||||
# Expose ssh and http ports
|
||||
EXPOSE 80
|
||||
EXPOSE 22
|
||||
|
||||
CMD "/tmp/start.sh"
|
21
INSTALL
21
INSTALL
|
@ -19,7 +19,6 @@ Important differences
|
|||
* Unlike the autotools way, the cmake way does not require any options. It attempts to detect some things by its own (system directories, libarch, web user and group) and uses defaults for others (installation paths and such).
|
||||
* Unlike the autotools way, which links the binaries to a fixed list of libraries, the cmake way only links to libraries that it found on the system. If a library is not found, but required, a fatal error will be shown during the configuration step.
|
||||
* Unlike the autotools way, the cmake way does not modify the system in any way it shouldnt. It only does what its supposed to do: Install files to your system. Nothing else and nothing leaks out of the DESTDIR environment variable (if used). This means that depending on your configuration, there might be an extra required step after installation: to link WEB_PATH/events and WEB_PATH/images folders to the correct places.
|
||||
* Currently there is no "make uninstall" target for cmake. However, its possible to do this manually. The file install_manifest.txt contains the list of files installed to the system. This can be used in many ways to delete all files installed by cmake, such as: xargs rm < install_manifest.txt
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
@ -48,16 +47,21 @@ Advanced:
|
|||
ZM_EXTRA_LIBS A list of optional libraries, separated by semicolons, e.g. ssl;theora
|
||||
ZM_MYSQL_ENGINE MySQL engine to use with database, default: InnoDB
|
||||
ZM_NO_MMAP Set to ON to not use mmap shared memory. Shouldn't be enabled unless you experience problems with the shared memory. default: OFF
|
||||
ZM_NO_CRASHTRACE Set to ON to skip crash trace code. Useful if zm_signal.cpp fails to compile. default: OFF
|
||||
ZM_NO_FFMPEG Set to ON to skip ffmpeg checks and force building ZM without ffmpeg. default: OFF
|
||||
ZM_NO_X10 Set to ON to build ZoneMinder without X10 support. default: OFF
|
||||
ZM_PERL_SUBPREFIX Use a different directory for the zm perl modules. NOTE: This is a subprefix, e.g. lib will be turned into <prefix>/lib, default: <libarch>/perl5
|
||||
ZM_PERL_USE_PATH Override the include path for zm perl modules. Useful if you are moving the perl modules without using the ZM_PERL_SUBPREFIX option. default: <prefix>/<zmperlsubprefix>
|
||||
|
||||
|
||||
Useful configuration options provided by cmake:
|
||||
CMAKE_VERBOSE_MAKEFILE - Set this to ON (default OFF) to see what cmake is doing. Very useful for troubleshooting.
|
||||
CMAKE_BUILD_TYPE - Set this to Debug (default Release) to build ZoneMinder with debugging enabled.
|
||||
CMAKE_INSTALL_PREFIX - Use this to change the prefix (default /usr/local). This option behaves like --prefix from autoconf. Package maintainers will probably want to set this to "/usr".
|
||||
CMAKE_INCLUDE_PATH - Use this to change the include search path.
|
||||
CMAKE_LIBRARY_PATH - Use this to change the library search path.
|
||||
Also see CMAKE_PREFIX_PATH for overriding both and some others.
|
||||
|
||||
Useful environment variables provided by cmake:
|
||||
CMAKE_INCLUDE_PATH - Use this to add to the include search path.
|
||||
CMAKE_LIBRARY_PATH - Use this to add to the library search path.
|
||||
CMAKE_PREFIX_PATH - Use this to add to both include and library search paths. <path>/include will be added to the include search path and <path>/lib to the library search path. Multiple paths can be specified, separated by a : character. For example: export CMAKE_PREFIX_PATH="/opt/libjpeg-turbo:/opt/ffmpeg-from-git"
|
||||
|
||||
CFLAGS, CPPFLAGS and other environment variables:
|
||||
To append to the CFLAGS and CXXFLAGS, please use the CFLAGS and CXXFLAGS environment variables.
|
||||
|
@ -67,7 +71,7 @@ To replace the CFLAGS and CXXFLAGS entirely:
|
|||
* For the Debug build type: use CMAKE_C_FLAGS_DEBUG for the CFLAGS and CMAKE_CXX_FLAGS_DEBUG for the CXXFLAGS
|
||||
Other important environment variables (such as LDFLAGS) are also supported.
|
||||
|
||||
The DESTDIR environment variable is also supported.
|
||||
The DESTDIR environment variable is also supported, however it needs to be set before invoking make install. For example: DESTDIR=mydestdir make install
|
||||
For more information about DESTDIR, see:
|
||||
* http://www.gnu.org/prep/standards/html_node/DESTDIR.html
|
||||
|
||||
|
@ -105,6 +109,11 @@ By default, the content directory for new installations is /var/lib/zoneminder.
|
|||
|
||||
5) Run zmupdate.pl to update the database layout to the new version.
|
||||
|
||||
Uninstallation:
|
||||
---------------
|
||||
By default, cmake does not have an uninstall target, however we have added a one. Simply run make uninstall (or DESTDIR=mydestdir make uninstall if a DESTDIR was used) and it will remove all the files that cmake installed.
|
||||
It's also possible to do this manually. The file install_manifest.txt contains the list of files installed to the system. This can be used in many ways to delete all files installed by cmake, such as: xargs rm < install_manifest.txt
|
||||
|
||||
Contributions:
|
||||
--------------
|
||||
Please visit our GitHub at http://github.com/ZoneMinder/ZoneMinder
|
||||
|
|
|
@ -9,6 +9,7 @@ sysconf_DATA = \
|
|||
|
||||
SUBDIRS = \
|
||||
src \
|
||||
web \
|
||||
scripts \
|
||||
db \
|
||||
misc
|
||||
|
@ -21,10 +22,12 @@ EXTRA_DIST = \
|
|||
install-data-hook:
|
||||
( cd $(DESTDIR)$(sysconfdir); chown $(webuser):$(webgroup) $(sysconf_DATA); chmod 600 $(sysconf_DATA) )
|
||||
( if ! test -e $(DESTDIR)$(ZM_RUNDIR); then mkdir -p $(DESTDIR)$(ZM_RUNDIR); fi; if test "$(DESTDIR)$(ZM_RUNDIR)" != "/var/run"; then chown $(webuser):$(webgroup) $(DESTDIR)$(ZM_RUNDIR); chmod u+w $(DESTDIR)$(ZM_RUNDIR); fi )
|
||||
( if ! test -e $(DESTDIR)$(ZM_TMPDIR); then mkdir -m 700 -p $(DESTDIR)$(ZM_TMPDIR); fi; if test "$(DESTDIR)$(ZM_TMPDIR)" != "/tmp"; then chown $(webuser):$(webgroup) $(DESTDIR)$(ZM_TMPDIR); chmod u+w $(DESTDIR)$(ZM_TMPDIR); fi )
|
||||
( if ! test -e $(DESTDIR)$(ZM_SOCKDIR); then mkdir -p $(DESTDIR)$(ZM_SOCKDIR); fi; if test "$(DESTDIR)$(ZM_SOCKDIR)" != "/var/run"; then chown $(webuser):$(webgroup) $(DESTDIR)$(ZM_SOCKDIR); chmod u+w $(DESTDIR)$(ZM_SOCKDIR); fi )
|
||||
( if ! test -e $(DESTDIR)$(ZM_TMPDIR); then mkdir -m 700 -p $(DESTDIR)$(ZM_TMPDIR); fi; if test "$(DESTDIR)$(ZM_TMPDIR)" != "/tmp" && test "$(DESTDIR)$(ZM_TMPDIR)" != "/var/tmp"; then chown $(webuser):$(webgroup) $(DESTDIR)$(ZM_TMPDIR); chmod u+w $(DESTDIR)$(ZM_TMPDIR); fi )
|
||||
|
||||
uninstall-hook:
|
||||
@-( cd $(DESTDIR)$(webdir); rm -rf events graphics images sounds temp )
|
||||
@-( if test "$(DESTDIR)$(ZM_RUNDIR)" != "/var/run"; then rm -rf $(DESTDIR)$(ZM_RUNDIR); fi )
|
||||
@-( if test "$(DESTDIR)$(ZM_TMPDIR)" != "/tmp"; then rm -rf $(DESTDIR)$(ZM_TMPDIR); fi )
|
||||
@-( if test "$(DESTDIR)$(ZM_SOCKDIR)" != "/var/run"; then rm -rf $(DESTDIR)$(ZM_SOCKDIR); fi )
|
||||
@-( if test "$(DESTDIR)$(ZM_TMPDIR)" != "/tmp" && test "$(DESTDIR)$(ZM_TMPDIR)" != "/var/tmp"; then rm -rf $(DESTDIR)$(ZM_TMPDIR); fi )
|
||||
@-( if test "$(DESTDIR)$(ZM_LOGDIR)" != "/var/log"; then rm -rf $(DESTDIR)$(ZM_LOGDIR); fi )
|
||||
|
|
134
README.md
134
README.md
|
@ -1,6 +1,6 @@
|
|||
ZoneMinder H264 Patch
|
||||
|
||||
[![Build Status](https://travis-ci.org/ZoneMinder/ZoneMinder.png?branch=feature-h264-videostorage)](https://travis-ci.org/ZoneMinder/ZoneMinder)
|
||||
[![Build Status](https://travis-ci.org/ZoneMinder/ZoneMinder.png?branch=feature-h264-videostorage)](https://travis-ci.org/ZoneMinder/ZoneMinder) [![Bountysource](https://api.bountysource.com/badge/team?team_id=204&style=bounties_received)](https://www.bountysource.com/teams/zoneminder/issues?utm_source=ZoneMinder&utm_medium=shield&utm_campaign=bounties_received)
|
||||
|
||||
##Information about this branch
|
||||
This branch aims to support direct recording of H264 cameras into MP4 format as well as allowing analogue or remote cameras to be transcoded into H264 video on the fly. This branch tracks the modern branch as the new WebUI is where all the viewing functionality will sit. If you encounter any issues, please open an issue on GitHub and attach it to the H264 Milestone. @chriswiggins is leading this project and welcomes all help!
|
||||
|
@ -14,36 +14,152 @@ ZoneMinder is an integrated set of applications which provide a complete surveil
|
|||
|
||||
## Requirements
|
||||
|
||||
If you are installing from a package, that package should provide all of the needed core components.
|
||||
If you are installing ZoneMinder from a package, that package should provide all of the needed core components.
|
||||
|
||||
### Packages
|
||||
|
||||
If you are compiling from source, the below list contains the packages needed to get ZoneMinder built:
|
||||
If you are compiling ZoneMinder from source, the below list contains the packages needed to get ZoneMinder built:
|
||||
|
||||
#### Debian / Ubuntu
|
||||
#### Ubuntu
|
||||
|
||||
A fresh build based on master branch running Ubuntu 1204 LTS. Will likely work for other versions as well.
|
||||
|
||||
```bash
|
||||
root@host:~# aptitude install -y apache2 mysql-server php5 php5-mysql build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libpcre3 libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm automake autoconf libjpeg8-dev libjpeg8 apache2-mpm-prefork libapache2-mod-php5 php5-cli libphp-serialization-perl libgnutls-dev libjpeg8-dev libavcodec-dev libavformat-dev libswscale-dev libavutil-dev libv4l-dev libtool ffmpeg libnetpbm10-dev libavdevice-dev libmime-lite-perl dh-autoreconf dpatch;
|
||||
|
||||
root@host:~# git clone https://github.com/ZoneMinder/ZoneMinder.git zoneminder;
|
||||
root@host:~# cd zoneminder;
|
||||
root@host:~# ln -s distros/ubuntu1204 debian;
|
||||
root@host:~# dpkg-checkbuilddeps;
|
||||
root@host:~# dpkg-buildpackage;
|
||||
```
|
||||
|
||||
One level above you'll now find a deb package matching the architecture of the build host:
|
||||
|
||||
```bash
|
||||
root@host:~# ls -1 ~/zoneminder*;
|
||||
/root/zoneminder_1.26.4-1_amd64.changes
|
||||
/root/zoneminder_1.26.4-1_amd64.deb
|
||||
/root/zoneminder_1.26.4-1.dsc
|
||||
/root/zoneminder_1.26.4-1.tar.gz
|
||||
```
|
||||
|
||||
The dpkg command itself does not resolve dependencies. That's what high-level interfaces like aptitude and apt-get are normally for. Unfortunately, unlike RPM, there's no easy way to install a separate deb package not contained with any repository.
|
||||
|
||||
To overcome this "limitation" we'll use dpkg only to install the zoneminder package and apt-get to fetch all needed dependencies afterwards. Running dpkg-reconfigure in the end will ensure that the setup scripts e.g. for database provisioning were executed.
|
||||
|
||||
```bash
|
||||
root@host:~# dpkg -i /root/zoneminder_1.26.4-1_amd64.deb; apt-get install -f;
|
||||
root@host:~# dpkg-reconfigure zoneminder;
|
||||
```
|
||||
Alternatively you may also use gdebi to automatically resolve dependencies during installation:
|
||||
|
||||
```bash
|
||||
root@host:~# aptitude install -y gdebi;
|
||||
root@host:~# gdebi /root/zoneminder_1.26.4-1_amd64.deb;
|
||||
```
|
||||
```bash
|
||||
sudo apt-get install apache2 mysql-server php5 php5-mysql build-essential libmysqlclient-dev libssl-dev libbz2-dev \
|
||||
libpcre3-dev libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libpcre3 \
|
||||
libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm subversion automake autoconf libjpeg-turbo8-dev libjpeg-turbo8 \
|
||||
libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm automake autoconf libjpeg-turbo8-dev libjpeg-turbo8 \
|
||||
apache2-mpm-prefork libapache2-mod-php5 php5-cli
|
||||
```
|
||||
|
||||
#### CentOS / Redhat
|
||||
#### Debian
|
||||
|
||||
Two additional repositories must be added before one can build zoneminder on CentOS or RHEL:
|
||||
A fresh build based on master branch running Debian 7 (wheezy):
|
||||
|
||||
```bash
|
||||
root@host:~# aptitude install -y apache2 mysql-server php5 php5-mysql build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libpcre3 libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm automake autoconf libjpeg8-dev libjpeg8 apache2-mpm-prefork libapache2-mod-php5 php5-cli libphp-serialization-perl libgnutls-dev libjpeg8-dev libavcodec-dev libavformat-dev libswscale-dev libavutil-dev libv4l-dev libtool ffmpeg libnetpbm10-dev libavdevice-dev libmime-lite-perl dh-autoreconf dpatch;
|
||||
|
||||
root@host:~# git clone https://github.com/ZoneMinder/ZoneMinder.git zoneminder;
|
||||
root@host:~# cd zoneminder;
|
||||
root@host:~# ln -s distros/debian;
|
||||
root@host:~# dpkg-checkbuilddeps;
|
||||
root@host:~# dpkg-buildpackage;
|
||||
```
|
||||
|
||||
One level above you'll now find a deb package matching the architecture of the build host:
|
||||
|
||||
```bash
|
||||
root@host:~# ls -1 ~/zoneminder*;
|
||||
/root/zoneminder_1.26.4-1_amd64.changes
|
||||
/root/zoneminder_1.26.4-1_amd64.deb
|
||||
/root/zoneminder_1.26.4-1.dsc
|
||||
/root/zoneminder_1.26.4-1.tar.gz
|
||||
```
|
||||
|
||||
The dpkg command itself does not resolve dependencies. That's what high-level interfaces like aptitude and apt-get are normally for. Unfortunately, unlike RPM, there's no easy way to install a separate deb package not contained with any repository.
|
||||
|
||||
To overcome this "limitation" we'll use dpkg only to install the zoneminder package and apt-get to fetch all needed dependencies afterwards. Running dpkg-reconfigure in the end will ensure that the setup scripts e.g. for database provisioning were executed.
|
||||
|
||||
```bash
|
||||
root@host:~# dpkg -i /root/zoneminder_1.26.4-1_amd64.deb; apt-get install -f;
|
||||
root@host:~# dpkg-reconfigure zoneminder;
|
||||
```
|
||||
Alternatively you may also use gdebi to automatically resolve dependencies during installation:
|
||||
|
||||
```bash
|
||||
root@host:~# aptitude install -y gdebi;
|
||||
root@host:~# gdebi /root/zoneminder_1.26.4-1_amd64.deb;
|
||||
```
|
||||
|
||||
#### CentOS / RHEL
|
||||
|
||||
Additional repositories must be added before one can build zoneminder on CentOS or RHEL:
|
||||
|
||||
1. RepoForge (formerly RPMForge) http://repoforge.org/use/
|
||||
2. EPEL https://fedoraproject.org/wiki/EPEL
|
||||
3. Optional RPMFusion: http://rpmfusion.org/ [SEE NOTE]
|
||||
|
||||
[NOTE]<br>
|
||||
The RPMFusion repo contains significantly newer versions of ffmpeg and vlc. This leads to significantly better camera support. However, the RPMFusion repo contains packages that conflict with the other two repos. In order to resolve this, one must also install the yum priorities pacakge and use that to prioritize your repos in the following order:
|
||||
|
||||
Once those are added, install the following:
|
||||
1. Base
|
||||
2. RPMFusion
|
||||
3. EPEL
|
||||
4. RPMForge
|
||||
|
||||
For instructions on yum priorities, visit this page:
|
||||
http://wiki.centos.org/PackageManagement/Yum/Priorities
|
||||
|
||||
Once your repos are in order, install the following:
|
||||
```bash
|
||||
sudo yum install automake bzip2-devel ffmpeg ffmpeg-devel gnutls-devel httpd libjpeg-turbo libjpeg-turbo-devel mysql-devel mysql-server pcre-devel \
|
||||
perl-Archive-Tar perl-Archive-Zip perl-Convert-BinHex perl-Date-Manip perl-DBD-MySQL perl-DBI perl-Device-SerialPort perl-Email-Date-Format perl-IO-stringy \
|
||||
perl-IO-Zlib perl-MailTools perl-MIME-Lite perl-MIME-tools perl-MIME-Types perl-Module-Load perl-Package-Constants perl-Sys-Mmap perl-Time-HiRes \
|
||||
perl-TimeDate perl-YAML-Syck php php-cli php-mysql subversion x264
|
||||
perl-TimeDate perl-YAML-Syck php php-cli php-mysql x264 vlc-devel vlc-core libcurl libcurl-devel
|
||||
```
|
||||
|
||||
#### Docker
|
||||
|
||||
Docker is a system to run applications inside isolated containers. ZoneMinder, and the ZM webserver, will run using the
|
||||
Dockerfile contained in this repository. However, there is still work needed to ensure that the main ZM features work
|
||||
properly and are documented.
|
||||
|
||||
### ffmpeg
|
||||
|
||||
This release of ZoneMinder has been tested on and works with ffmpeg version N-55540-g93f4277.
|
||||
|
||||
|
||||
## Contribution Model and Development
|
||||
|
||||
* Source hosted at [GitHub](https://github.com/ZoneMinder/ZoneMinder/)
|
||||
* Report issues/questions/feature requests on [GitHub Issues](https://github.com/ZoneMinder/ZoneMinder/issues)
|
||||
|
||||
Pull requests are very welcome! If you would like to contribute, please follow
|
||||
the following steps.
|
||||
|
||||
1. Fork the repo
|
||||
2. Open an issue at our [GitHub Issues Tracker](https://github.com/ZoneMinder/ZoneMinder/issues).
|
||||
Describe the bug that you've found, or the feature which you're asking for.
|
||||
Jot down the issue number (e.g. 456)
|
||||
3. Create your feature branch (`git checkout -b 456-my-new-feature`)
|
||||
4. Commit your changes (`git commit -am 'Added some feature'`)
|
||||
It is preferred that you 'commit early and often' instead of bunching all
|
||||
changes into a single commit.
|
||||
5. Push your branch to your fork on github (`git push origin 456-my-new-feature`)
|
||||
6. Create new Pull Request
|
||||
7. The team will then review, discuss and hopefully merge your changes.
|
||||
|
||||
[![Analytics](https://ga-beacon.appspot.com/UA-15147273-6/ZoneMinder/README.md)](https://github.com/igrigorik/ga-beacon)
|
||||
|
|
|
@ -0,0 +1,98 @@
|
|||
# - Check if the protoype we expect is correct.
|
||||
# check_prototype_definition(FUNCTION PROTOTYPE RETURN HEADER VARIABLE)
|
||||
# FUNCTION - The name of the function (used to check if prototype exists)
|
||||
# PROTOTYPE- The prototype to check.
|
||||
# RETURN - The return value of the function.
|
||||
# HEADER - The header files required.
|
||||
# VARIABLE - The variable to store the result.
|
||||
# Example:
|
||||
# check_prototype_definition(getpwent_r
|
||||
# "struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)"
|
||||
# "NULL"
|
||||
# "unistd.h;pwd.h"
|
||||
# SOLARIS_GETPWENT_R)
|
||||
# The following variables may be set before calling this macro to
|
||||
# modify the way the check is run:
|
||||
#
|
||||
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
|
||||
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
|
||||
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
||||
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2005-2009 Kitware, Inc.
|
||||
# Copyright 2010-2011 Andreas Schneider <asn@cryptomilk.org>
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
#
|
||||
|
||||
|
||||
get_filename_component(__check_proto_def_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
|
||||
|
||||
function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIABLE)
|
||||
|
||||
if ("${_VARIABLE}" MATCHES "^${_VARIABLE}$")
|
||||
set(CHECK_PROTOTYPE_DEFINITION_CONTENT "/* */\n")
|
||||
|
||||
set(CHECK_PROTOTYPE_DEFINITION_FLAGS ${CMAKE_REQUIRED_FLAGS})
|
||||
if (CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CHECK_PROTOTYPE_DEFINITION_LIBS
|
||||
${LINK_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES})
|
||||
else()
|
||||
set(CHECK_PROTOTYPE_DEFINITION_LIBS)
|
||||
endif()
|
||||
if (CMAKE_REQUIRED_INCLUDES)
|
||||
set(CMAKE_SYMBOL_EXISTS_INCLUDES
|
||||
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
|
||||
else()
|
||||
set(CMAKE_SYMBOL_EXISTS_INCLUDES)
|
||||
endif()
|
||||
|
||||
foreach(_FILE ${_HEADER})
|
||||
set(CHECK_PROTOTYPE_DEFINITION_HEADER
|
||||
"${CHECK_PROTOTYPE_DEFINITION_HEADER}#include <${_FILE}>\n")
|
||||
endforeach()
|
||||
|
||||
set(CHECK_PROTOTYPE_DEFINITION_SYMBOL ${_FUNCTION})
|
||||
set(CHECK_PROTOTYPE_DEFINITION_PROTO ${_PROTOTYPE})
|
||||
set(CHECK_PROTOTYPE_DEFINITION_RETURN ${_RETURN})
|
||||
|
||||
configure_file("${__check_proto_def_dir}/CheckPrototypeDefinition.c.in"
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c" @ONLY)
|
||||
|
||||
file(READ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c _SOURCE)
|
||||
|
||||
try_compile(${_VARIABLE}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c
|
||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||
${CHECK_PROTOTYPE_DEFINITION_LIBS}
|
||||
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CHECK_PROTOTYPE_DEFINITION_FLAGS}
|
||||
"${CMAKE_SYMBOL_EXISTS_INCLUDES}"
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
|
||||
if (${_VARIABLE})
|
||||
set(${_VARIABLE} 1 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
|
||||
message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - True")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} passed with the following output:\n"
|
||||
"${OUTPUT}\n\n")
|
||||
else ()
|
||||
message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - False")
|
||||
set(${_VARIABLE} 0 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} failed with the following output:\n"
|
||||
"${OUTPUT}\n\n${_SOURCE}\n\n")
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
endfunction()
|
|
@ -0,0 +1,55 @@
|
|||
# - Try to find the GLIB2 libraries
|
||||
# Once done this will define
|
||||
#
|
||||
# GLIB2_FOUND - system has glib2
|
||||
# GLIB2_INCLUDE_DIR - the glib2 include directory
|
||||
# GLIB2_LIBRARIES - glib2 library
|
||||
|
||||
# Copyright (c) 2008 Laurent Montel, <montel@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
|
||||
if(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES)
|
||||
# Already in cache, be silent
|
||||
set(GLIB2_FIND_QUIETLY TRUE)
|
||||
endif(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES)
|
||||
|
||||
if (NOT WIN32)
|
||||
find_package(PkgConfig)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PC_LibGLIB2 glib-2.0)
|
||||
endif (PKG_CONFIG_FOUND)
|
||||
endif(NOT WIN32)
|
||||
|
||||
if (PC_LibGLIB2_INCLUDEDIR)
|
||||
set(GLIB2_MAIN_INCLUDE_DIR ${PC_LibGLIB2_INCLUDEDIR})
|
||||
else (PC_LibGLIB2_INCLUDEDIR)
|
||||
find_path(GLIB2_MAIN_INCLUDE_DIR NAMES glib.h PATH_SUFFIXES glib-2.0)
|
||||
endif (PC_LibGLIB2_INCLUDEDIR)
|
||||
|
||||
# search the glibconfig.h include dir under the same root where the library is found
|
||||
find_library(GLIB2_LIBRARIES
|
||||
NAMES glib-2.0
|
||||
HINTS ${PC_LibGLIB2_LIBDIR}
|
||||
)
|
||||
|
||||
get_filename_component(glib2LibDir "${GLIB2_LIBRARIES}" PATH)
|
||||
|
||||
find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h
|
||||
PATH_SUFFIXES glib-2.0/include
|
||||
HINTS ${PC_LibGLIB2_INCLUDEDIR} "${glib2LibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH})
|
||||
|
||||
set(GLIB2_INCLUDE_DIR "${GLIB2_MAIN_INCLUDE_DIR}")
|
||||
|
||||
# not sure if this include dir is optional or required
|
||||
# for now it is optional
|
||||
if(GLIB2_INTERNAL_INCLUDE_DIR)
|
||||
set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR} "${GLIB2_INTERNAL_INCLUDE_DIR}")
|
||||
endif(GLIB2_INTERNAL_INCLUDE_DIR)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GLIB2 DEFAULT_MSG GLIB2_LIBRARIES GLIB2_MAIN_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(GLIB2_INCLUDE_DIR GLIB2_LIBRARIES)
|
|
@ -0,0 +1,63 @@
|
|||
# - Try to find Polkit
|
||||
# Once done this will define
|
||||
#
|
||||
# POLKIT_FOUND - system has Polkit
|
||||
# POLKIT_INCLUDE_DIRS - Polkit's include directories
|
||||
# POLKIT_AGENT_INCLUDE_DIRS - Polkit-agent's include directories
|
||||
# POLKIT_LIBRARIES - Link this to use polkit's gobject library
|
||||
# POLKIT_AGENT_LIBRARY - Link this to use the agent wrapper in polkit
|
||||
# POLKIT_DEFINITIONS - Compiler switches required for using Polkit
|
||||
# Copyright (c) 2009, Dario Freddi, <drf@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
#NOTE: Polkit agent library is disabled!
|
||||
if (POLKIT_INCLUDE_DIR AND POLKIT_LIB)
|
||||
set(POLKIT_FIND_QUIETLY TRUE)
|
||||
endif (POLKIT_INCLUDE_DIR AND POLKIT_LIB)
|
||||
if (NOT WIN32)
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
find_package(PkgConfig)
|
||||
pkg_check_modules(PC_POLKIT polkit-gobject-1)
|
||||
#pkg_check_modules(PC_POLKIT_AGENT polkit-agent-1)
|
||||
set(POLKIT_DEFINITIONS ${PC_POLKIT_CFLAGS_OTHER})
|
||||
endif (NOT WIN32)
|
||||
# We must include glib paths too... which sucks balls
|
||||
find_package(GLIB2)
|
||||
find_path( GLIB_CONFIG_INCLUDE_DIR
|
||||
NAMES glibconfig.h
|
||||
PATH_SUFFIXES glib-2.0/include
|
||||
HINTS ${PC_POLKIT_INCLUDE_DIRS}
|
||||
)
|
||||
find_path( POLKIT_INCLUDE_DIR
|
||||
NAMES polkit/polkit.h
|
||||
PATH_SUFFIXES polkit-1
|
||||
HINTS ${PC_POLKIT_INCLUDE_DIRS}
|
||||
)
|
||||
#find_path( POLKIT_AGENT_INCLUDE_DIR
|
||||
# NAMES polkitagent/polkitagent.h
|
||||
# PATH_SUFFIXES polkit-1
|
||||
# HINTS ${PC_POLKIT_AGENT_INCLUDE_DIRS}
|
||||
#)
|
||||
#set(POLKIT_INCLUDE_DIRS ${GLIB2_INCLUDE_DIR} ${_POLKIT_INCLUDE_DIR})
|
||||
#set(POLKIT_AGENT_INCLUDE_DIRS ${GLIB2_INCLUDE_DIR} ${_POLKIT_AGENT_INCLUDE_DIR})
|
||||
find_library( POLKIT_LIBRARIES
|
||||
NAMES polkit-gobject-1
|
||||
HINTS ${PC_POLKIT_LIBDIR}
|
||||
)
|
||||
#find_library( POLKIT_AGENT_LIBRARY
|
||||
# NAMES polkit-agent-1
|
||||
# HINTS ${PC_POLKIT_AGENT_LIBDIR}
|
||||
#)
|
||||
#set(POLKIT_LIBRARIES ${_POLKIT_LIBRARIES} ${GLIB2_LIBRARIES})
|
||||
#set(POLKIT_AGENT_LIBRARY ${_POLKIT_AGENT_LIBRARY} ${GLIB2_LIBRARIES})
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set POLKIT_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
#find_package_handle_standard_args(Polkit DEFAULT_MSG POLKIT_LIBRARIES POLKIT_AGENT_LIBRARY
|
||||
# POLKIT_INCLUDE_DIR POLKIT_AGENT_INCLUDE_DIR GLIB2_FOUND)
|
||||
find_package_handle_standard_args(Polkit DEFAULT_MSG POLKIT_LIBRARIES
|
||||
POLKIT_INCLUDE_DIR GLIB2_FOUND)
|
||||
mark_as_advanced(POLKIT_INCLUDE_DIRS POLKIT_AGENT_INCLUDE_DIRS POLKIT_LIBRARIES POLKIT_AGENT_LIBRARY GLIB_INCLUDE_DIR)
|
||||
set(POLKIT_POLICY_FILES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/polkit-1/actions)
|
|
@ -0,0 +1,26 @@
|
|||
if(POLICY CMP0007)
|
||||
cmake_policy(SET CMP0007 OLD)
|
||||
endif(POLICY CMP0007)
|
||||
|
||||
if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
|
||||
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
|
||||
|
||||
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
|
||||
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||
list(REVERSE files)
|
||||
foreach (file ${files})
|
||||
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
|
||||
if (EXISTS "$ENV{DESTDIR}${file}")
|
||||
execute_process(
|
||||
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RESULT_VARIABLE rm_retval
|
||||
)
|
||||
if(NOT ${rm_retval} EQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
|
||||
endif (NOT ${rm_retval} EQUAL 0)
|
||||
else (EXISTS "$ENV{DESTDIR}${file}")
|
||||
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
|
||||
endif (EXISTS "$ENV{DESTDIR}${file}")
|
||||
endforeach(file)
|
|
@ -44,7 +44,7 @@ if [ "$?" != "0" ]; then
|
|||
fi
|
||||
|
||||
# Print some information
|
||||
echo "Executables directory : $ZM_PATH_BIN"
|
||||
#echo "Executables directory : $ZM_PATH_BIN"
|
||||
#echo "Libraries directory : $ZM_PATH_LIB"
|
||||
#echo "System config directory : $ZM_PATH_CONF"
|
||||
echo "Web directory : $ZM_PATH_WEB"
|
||||
|
@ -60,8 +60,8 @@ echo "Database password : Not shown"
|
|||
CMPATH="CACHE PATH \"Imported by cmakecacheimport.sh\" FORCE"
|
||||
CMSTRING="CACHE STRING \"Imported by cmakecacheimport.sh\" FORCE"
|
||||
# Write
|
||||
echo "# Generated by cmakecacheimport.sh">zm_conf.cmake
|
||||
echo "set(CMAKE_INSTALL_FULL_BINDIR \"$ZM_PATH_BIN\" $CMPATH)">>zm_conf.cmake
|
||||
echo "# This file was generated by cmakecacheimport.sh">zm_conf.cmake
|
||||
#echo "set(CMAKE_INSTALL_FULL_BINDIR \"$ZM_PATH_BIN\" $CMPATH)">>zm_conf.cmake
|
||||
#echo "set(CMAKE_INSTALL_FULL_LIBDIR \"$ZM_PATH_LIB\" $CMPATH)">>zm_conf.cmake
|
||||
#echo "set(CMAKE_INSTALL_FULL_SYSCONFDIR \"$ZM_PATH_CONF\" $CMPATH)">>zm_conf.cmake
|
||||
echo "set(ZM_WEBDIR \"$ZM_PATH_WEB\" $CMPATH)">>zm_conf.cmake
|
||||
|
|
108
configure.ac
108
configure.ac
|
@ -1,16 +1,41 @@
|
|||
AC_PREREQ(2.59)
|
||||
AC_INIT(zm,1.26.4,[http://www.zoneminder.com/forums/ - Please check FAQ first],ZoneMinder,http://www.zoneminder.com/downloads.html)
|
||||
AC_INIT(zm,1.27.99.0,[http://www.zoneminder.com/forums/ - Please check FAQ first],zoneminder,http://www.zoneminder.com/downloads.html)
|
||||
AM_INIT_AUTOMAKE
|
||||
AC_CONFIG_SRCDIR(src/zm.h)
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
|
||||
AC_SUBST([AM_CXXFLAGS], [-D__STDC_CONSTANT_MACROS])
|
||||
|
||||
PATH_BUILD=`pwd`
|
||||
AC_SUBST(PATH_BUILD)
|
||||
TIME_BUILD=`date +'%s'`
|
||||
AC_SUBST(TIME_BUILD)
|
||||
AC_SUBST(VERSION)
|
||||
#
|
||||
# Platform specific setup
|
||||
#
|
||||
#############################
|
||||
AC_CANONICAL_HOST
|
||||
# Check for which host we are on and setup a few things
|
||||
# specifically based on the host
|
||||
case $host_os in
|
||||
darwin* )
|
||||
# Do something specific for mac
|
||||
HOST_OS='darwin'
|
||||
;;
|
||||
linux*)
|
||||
# Do something specific for linux
|
||||
HOST_OS='linux'
|
||||
;;
|
||||
*BSD*)
|
||||
# Do something specific for BSD
|
||||
HOST_OS='BSD'
|
||||
;;
|
||||
*)
|
||||
#Default Case
|
||||
AC_MSG_ERROR([Your platform is not currently supported])
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(HOST_OS)
|
||||
|
||||
AC_ARG_VAR(ZM_DB_TYPE,[Type of the ZoneMinder database, default mysql])
|
||||
AC_ARG_VAR(ZM_DB_HOST,[Hostname where ZoneMinder database located, default localhost])
|
||||
AC_ARG_VAR(ZM_DB_NAME,[Name of ZoneMinder database, default zm])
|
||||
AC_ARG_VAR(ZM_DB_USER,[Name of ZoneMinder database user, default zmuser])
|
||||
|
@ -18,9 +43,13 @@ AC_ARG_VAR(ZM_DB_PASS,[Password of ZoneMinder database user, default zmpass])
|
|||
AC_ARG_VAR(ZM_SSL_LIB,[Library to use for ssl functions, default gnutls])
|
||||
AC_ARG_VAR(ZM_MYSQL_ENGINE,[MySQL engine to use with database, default InnoDB])
|
||||
AC_ARG_VAR(ZM_RUNDIR,[Location of transient process files, default /var/run/zm])
|
||||
AC_ARG_VAR(ZM_TMPDIR,[Location of temporary files, default /tmp/zm])
|
||||
AC_ARG_VAR(ZM_SOCKDIR,[Location of Unix domain socket files, default /var/run/zm])
|
||||
AC_ARG_VAR(ZM_TMPDIR,[Location of temporary files, default /var/tmp/zm])
|
||||
AC_ARG_VAR(ZM_LOGDIR,[Location of generated log files, default /var/log/zm])
|
||||
|
||||
if test "$ZM_DB_TYPE" == ""; then
|
||||
AC_SUBST(ZM_DB_TYPE,[mysql])
|
||||
fi
|
||||
if test "$ZM_DB_HOST" == ""; then
|
||||
AC_SUBST(ZM_DB_HOST,[localhost])
|
||||
fi
|
||||
|
@ -42,6 +71,9 @@ fi
|
|||
if test "$ZM_RUNDIR" == ""; then
|
||||
AC_SUBST(ZM_RUNDIR,[/var/run/zm])
|
||||
fi
|
||||
if test "$ZM_SOCKDIR" == ""; then
|
||||
AC_SUBST(ZM_SOCKDIR,[/var/run/zm])
|
||||
fi
|
||||
if test "$ZM_TMPDIR" == ""; then
|
||||
AC_SUBST(ZM_TMPDIR,[/tmp/zm])
|
||||
fi
|
||||
|
@ -60,6 +92,8 @@ AC_ARG_WITH(libarch,
|
|||
)
|
||||
AC_SUBST(LIB_ARCH)
|
||||
|
||||
LDFLAGS="-L/usr/lib/${build_alias} ${LDFLAGS}"
|
||||
|
||||
MYSQL_PREFIX=/usr
|
||||
AC_ARG_WITH(mysql,
|
||||
[ --with-mysql=<path> prefix of MySQL installation, default /usr],
|
||||
|
@ -74,8 +108,34 @@ MYSQL_LIBS="-L${MYSQL_PREFIX}/${LIB_ARCH}/mysql"
|
|||
MYSQL_CFLAGS="-I${MYSQL_PREFIX}/include"
|
||||
AC_SUBST(MYSQL_LIBS)
|
||||
AC_SUBST(MYSQL_CFLAGS)
|
||||
LDFLAGS="$LDFLAGS ${MYSQL_LIBS}"
|
||||
|
||||
LDFLAGS="${MYSQL_LIBS} $LDFLAGS"
|
||||
|
||||
MARIADB_PREFIX=/usr
|
||||
AC_ARG_WITH(mariadb,
|
||||
[ --with-mariadb=<path> prefix of MariaDB installation, default /usr],
|
||||
[MYSQL_PREFIX=$with_mariadb],
|
||||
AC_MSG_WARN([You can call configure with the --with-mariadb option.
|
||||
This tells configure where to find the mariaDB C library and headers if configure cannot
|
||||
locate them automatically.
|
||||
e.g. --with-mariadb=/usr/local or --with-mariadb=/usr])
|
||||
)
|
||||
AC_SUBST(MARIADB_PREFIX)
|
||||
MARIADB_LIBS="-L${MARIADB_PREFIX}/${LIB_ARCH}/mariadb"
|
||||
MARIADB_CFLAGS="-I${MARIADB_PREFIX}/include"
|
||||
AC_SUBST(MARIADB_LIBS)
|
||||
AC_SUBST(MARIADB_CFLAGS)
|
||||
LDFLAGS="$LDFLAGS ${MARIADB_LIBS}"
|
||||
|
||||
POLKIT_PREFIX=/usr
|
||||
AC_ARG_WITH(polkit,
|
||||
[ --with-polkit=<path> prefix of polkit root directory, default /usr],
|
||||
[POLKIT_PREFIX=$with_polkit],
|
||||
AC_MSG_WARN([You can call configure with the --with-polkit option.
|
||||
This tells configure where to place the polkit policy files.])
|
||||
)
|
||||
AC_SUBST(POLKIT_PREFIX)
|
||||
PKG_CHECK_MODULES(POLKIT, polkit-gobject-1)
|
||||
|
||||
FFMPEG_PREFIX=/usr
|
||||
AC_ARG_WITH(ffmpeg,
|
||||
|
@ -177,22 +237,6 @@ if test "$ENABLE_DEBUG" != "yes"; then
|
|||
AC_DEFINE(ZM_DBG_OFF,1,"Whether debug is switched off and compiled out")
|
||||
fi
|
||||
|
||||
ENABLE_CRASHTRACE=yes
|
||||
AC_ARG_ENABLE(crashtrace,
|
||||
[ --enable-crashtrace=<yes|no> enable or disabled crash tracing, default enabled],
|
||||
[ENABLE_CRASHTRACE=$enable_crashtrace],
|
||||
AC_MSG_WARN([You can call configure with the --enable-crashtrace=<yes|no> or --disable-crashtrace option.
|
||||
This tells configure whether to compile ZoneMinder with crash tracing included. This allows a
|
||||
dump of the stack trace when a ZoneMinder binary crashes or is killed by an unexpected signal.
|
||||
Although this should work on most systems it does rely on un(or loosely) documented features and
|
||||
so should be regarded as experimental. If you experience problems compiling zm_signal.cpp or
|
||||
ZoneMinder binaries fail to shut down correctly then you should probably disable this feature.
|
||||
e.g. --enable-crashtrace=yes or --disable-crashtrace])
|
||||
)
|
||||
if test "$ENABLE_CRASHTRACE" != "yes"; then
|
||||
AC_DEFINE(ZM_NO_CRASHTRACE,1,"Whether crash tracing is switched off and compiled out")
|
||||
fi
|
||||
|
||||
ENABLE_MMAP=yes
|
||||
AC_ARG_ENABLE(mmap,
|
||||
[ --enable-mmap=<yes|no> enable or disabled mapped memory versus shared memory, default mapped],
|
||||
|
@ -235,8 +279,6 @@ AC_STRUCT_TM
|
|||
AC_TYPE_SIGNAL
|
||||
|
||||
AC_CHECK_TYPES(siginfo_t,,,[#include <signal.h>])
|
||||
AC_CHECK_TYPES(struct sigcontext,,,[#include <signal.h>])
|
||||
AC_CHECK_MEMBERS([struct sigcontext.eip],,,[#include <signal.h>])
|
||||
AC_CHECK_TYPES(ucontext_t,,,[#include <signal.h>])
|
||||
|
||||
# Checks for library functions.
|
||||
|
@ -248,7 +290,7 @@ AC_FUNC_STAT
|
|||
AC_FUNC_STRFTIME
|
||||
AC_FUNC_STRTOD
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS([gethostbyname gethostname gettimeofday memmove memset mkdir munmap posix_memalign putenv select sendfile socket sqrt strcasecmp strchr strcspn strerror strncasecmp strrchr strsignal strspn strstr strtol strtoull])
|
||||
AC_CHECK_FUNCS([gethostbyname gethostname gettimeofday memmove memset mkdir munmap posix_memalign putenv select sendfile socket sqrt strcasecmp strchr strcspn strerror strncasecmp strrchr strspn strstr strtol strtoull])
|
||||
AC_CHECK_FUNCS([syscall sleep usleep ioctl ioctlsocket sigaction])
|
||||
|
||||
# Other programs
|
||||
|
@ -261,7 +303,7 @@ PATH_NETPBM=`dirname $PATH_NETPBM`
|
|||
fi
|
||||
|
||||
# Checks for libraries.
|
||||
AC_CHECK_LIB(mysqlclient,mysql_init,,AC_MSG_ERROR(zm requires libmysqlclient.a))
|
||||
AC_SEARCH_LIBS(mysql_init,[mysqlclient mariadbclient],,AC_MSG_ERROR(zm requires libmysqlclient.a or libmariadbclient.a))
|
||||
AC_CHECK_LIB(jpeg,jpeg_start_compress,,AC_MSG_ERROR(zm requires libjpeg.a))
|
||||
AC_CHECK_LIB(pthread,pthread_create,,AC_MSG_ERROR(zm requires libpthread.a))
|
||||
AC_CHECK_LIB(dl,dlsym,,AC_MSG_ERROR(zm requires libdl.a))
|
||||
|
@ -293,8 +335,10 @@ AC_CHECK_LIB(avformat,avformat_version,,AC_MSG_WARN(libavformat.a is required fo
|
|||
#AC_CHECK_LIB(avformat,av_new_stream,,AC_MSG_WARN(libavformat.a is required for MPEG streaming))
|
||||
AC_CHECK_LIB(avdevice,avdevice_register_all,,AC_MSG_WARN(libavdevice.a may be required for MPEG streaming))
|
||||
AC_CHECK_LIB(swscale,sws_scale,,,-lswscale)
|
||||
AC_CHECK_LIB(vlc,libvlc_new,,AC_MSG_WARN(libvlc.a may be required for streaming))
|
||||
AC_CHECK_LIB(bz2,BZ2_bzCompress,,AC_MSG_WARN(zm requires libbz2.a for recent versions of ffmpeg))
|
||||
AC_CHECK_LIB(z,compress,,)
|
||||
AC_CHECK_LIB(curl,curl_global_init,,)
|
||||
|
||||
# Checks for header files.
|
||||
AC_FUNC_ALLOCA
|
||||
|
@ -302,6 +346,7 @@ AC_HEADER_STDC
|
|||
AC_CHECK_HEADERS([fcntl.h limits.h memory.h stddef.h stdlib.h string.h strings.h sys/param.h sys/time.h syslog.h unistd.h values.h])
|
||||
AC_CHECK_HEADERS([netdb.h netinet/in.h arpa/inet.h sys/ioctl.h sys/socket.h sys/un.h glob.h sys/sendfile.h])
|
||||
AC_CHECK_HEADERS(execinfo.h,,,)
|
||||
AC_CHECK_HEADERS(ucontext.h,,,)
|
||||
AC_CHECK_HEADERS(sys/syscall.h,,,)
|
||||
AC_CHECK_HEADERS(pthread.h,,,)
|
||||
AC_CHECK_HEADERS(linux/videodev.h,AC_SUBST(ZM_HAS_V4L1,1),AC_SUBST(ZM_HAS_V4L1,0),)
|
||||
|
@ -330,8 +375,9 @@ AC_CHECK_HEADERS(sys/ipc.h,,,)
|
|||
AC_CHECK_HEADERS(sys/shm.h,,,)
|
||||
fi
|
||||
AC_CHECK_HEADERS(zlib.h,,,)
|
||||
AC_CHECK_HEADERS(vlc/vlc.h,,,)
|
||||
AC_CHECK_HEADERS(curl/curl.h,,,)
|
||||
|
||||
AC_CHECK_DECLS(round,,,[#include <math.h>])
|
||||
if test "$ZM_SSL_LIB" == "openssl"; then
|
||||
AC_CHECK_DECLS(MD5,,AC_MSG_ERROR([zm requires openssl/md5.h - use ZM_SSL_LIB option to select gnutls instead]),[#include <stdlib.h>
|
||||
#include <openssl/md5.h>])
|
||||
|
@ -345,6 +391,7 @@ AC_CHECK_DECLS(gnutls_fingerprint,,AC_MSG_ERROR([zm requires gnutls/gnutls.h - u
|
|||
fi
|
||||
fi
|
||||
AC_CHECK_DECLS(backtrace,,,[#include <execinfo.h>])
|
||||
AC_CHECK_DECLS(backtrace_symbols,,,[#include <execinfo.h>])
|
||||
|
||||
AC_SUBST(LDFLAGS)
|
||||
|
||||
|
@ -378,6 +425,8 @@ AC_PROG_PERL_MODULES(X10::ActiveHome,,AC_MSG_WARN(X10::ActiveHome is required fo
|
|||
|
||||
AC_DEFINE_DIR([BINDIR],[bindir],[Expanded binary directory])
|
||||
AC_DEFINE_DIR([LIBDIR],[libdir],[Expanded library directory])
|
||||
AC_DEFINE_DIR([DATADIR],[datadir],[Expanded data directory])
|
||||
AC_SUBST(PKGDATADIR,"$DATADIR/$PACKAGE")
|
||||
AC_SUBST(ZM_PID,"$ZM_RUNDIR/zm.pid")
|
||||
AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Expanded configuration directory])
|
||||
AC_SUBST(ZM_CONFIG,"$SYSCONFDIR/zm.conf")
|
||||
|
@ -396,7 +445,8 @@ fi
|
|||
AC_SUBST(PERL_MM_PARMS)
|
||||
AC_SUBST(EXTRA_PERL_LIB)
|
||||
|
||||
AC_CONFIG_FILES([Makefile zm.conf zmconfgen.pl db/Makefile db/zm_create.sql misc/Makefile misc/apache.conf misc/logrotate.conf misc/syslog.conf scripts/Makefile scripts/zm scripts/zmaudit.pl scripts/zmcontrol.pl scripts/zmdc.pl scripts/zmfilter.pl scripts/zmpkg.pl scripts/zmtrack.pl scripts/zmtrigger.pl scripts/zmupdate.pl scripts/zmvideo.pl scripts/zmwatch.pl scripts/zmx10.pl scripts/zmdbbackup scripts/zmdbrestore scripts/zmeventdump scripts/zmlogrotate.conf scripts/ZoneMinder/lib/ZoneMinder/Base.pm scripts/ZoneMinder/lib/ZoneMinder/Config.pm scripts/ZoneMinder/lib/ZoneMinder/Memory.pm scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm src/Makefile src/zm_config.h])
|
||||
|
||||
AC_CONFIG_FILES([Makefile zm.conf zmconfgen.pl db/Makefile db/zm_create.sql misc/Makefile misc/apache.conf misc/logrotate.conf misc/syslog.conf misc/com.zoneminder.systemctl.policy misc/com.zoneminder.systemctl.rules scripts/Makefile scripts/zm scripts/zmaudit.pl scripts/zmcontrol.pl scripts/zmdc.pl scripts/zmfilter.pl scripts/zmpkg.pl scripts/zmtrack.pl scripts/zmcamtool.pl scripts/zmsystemctl.pl scripts/zmtrigger.pl scripts/zmupdate.pl scripts/zmvideo.pl scripts/zmwatch.pl scripts/zmx10.pl scripts/zmdbbackup scripts/zmdbrestore scripts/zmeventdump scripts/zmlogrotate.conf scripts/ZoneMinder/lib/ZoneMinder/Base.pm scripts/ZoneMinder/lib/ZoneMinder/Config.pm scripts/ZoneMinder/lib/ZoneMinder/Memory.pm scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm src/Makefile src/zm_config.h web/Makefile web/ajax/Makefile web/css/Makefile web/graphics/Makefile web/includes/Makefile web/includes/config.php web/js/Makefile web/lang/Makefile web/skins/Makefile web/skins/classic/Makefile web/skins/classic/ajax/Makefile web/skins/classic/css/Makefile web/skins/classic/graphics/Makefile web/skins/classic/includes/Makefile web/skins/classic/js/Makefile web/skins/classic/lang/Makefile web/skins/classic/views/Makefile web/skins/classic/views/css/Makefile web/skins/classic/views/js/Makefile web/skins/mobile/Makefile web/skins/mobile/ajax/Makefile web/skins/mobile/css/Makefile web/skins/mobile/graphics/Makefile web/skins/mobile/includes/Makefile web/skins/mobile/lang/Makefile web/skins/mobile/views/Makefile web/skins/mobile/views/css/Makefile web/tools/Makefile web/tools/mootools/Makefile web/views/Makefile web/skins/xml/Makefile web/skins/xml/views/Makefile web/skins/xml/includes/Makefile web/skins/flat/Makefile web/skins/flat/ajax/Makefile web/skins/flat/css/Makefile web/skins/flat/graphics/Makefile web/skins/flat/includes/Makefile web/skins/flat/js/Makefile web/skins/flat/lang/Makefile web/skins/flat/views/Makefile web/skins/flat/views/css/Makefile web/skins/flat/views/js/Makefile])
|
||||
|
||||
# Create the definitions for compilation and defaults for the database
|
||||
AC_CONFIG_COMMANDS([src/zm_config_defines.h],[perl ./zmconfgen.pl])
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
# CMakeLists.txt for the ZoneMinder database scripts
|
||||
|
||||
# Create files from the .in files
|
||||
configure_file(zm_create.sql.in ${CMAKE_CURRENT_SOURCE_DIR}/zm_create.sql @ONLY)
|
||||
configure_file(zm_create.sql.in "${CMAKE_CURRENT_BINARY_DIR}/zm_create.sql" @ONLY)
|
||||
|
||||
# Glob all files matching zm*.sql (to exclude *.in files and autotools's files)
|
||||
file(GLOB dbfileslist RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "zm*.sql")
|
||||
# Glob all database upgrade scripts
|
||||
file(GLOB dbfileslist RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "zm_update-*.sql")
|
||||
|
||||
# Install the database scripts, exclude makefiles and cmake stuff
|
||||
# Install the database upgrade scripts
|
||||
install(FILES ${dbfileslist} DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/db")
|
||||
|
||||
# install zm_create.sql
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zm_create.sql" DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/db")
|
||||
|
|
|
@ -1,48 +1,14 @@
|
|||
AUTOMAKE_OPTIONS = gnu
|
||||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
zmdbdatadir = $(pkgdatadir)/db
|
||||
|
||||
EXTRA_DIST = \
|
||||
zm_create.sql.in \
|
||||
zm_update-0.0.1.sql \
|
||||
zm_update-0.9.7.sql \
|
||||
zm_update-0.9.8.sql \
|
||||
zm_update-0.9.9.sql \
|
||||
zm_update-0.9.10.sql \
|
||||
zm_update-0.9.11.sql \
|
||||
zm_update-0.9.12.sql \
|
||||
zm_update-0.9.13.sql \
|
||||
zm_update-0.9.15.sql \
|
||||
zm_update-0.9.16.sql \
|
||||
zm_update-1.17.1.sql \
|
||||
zm_update-1.17.2.sql \
|
||||
zm_update-1.18.0.sql \
|
||||
zm_update-1.18.1.sql \
|
||||
zm_update-1.19.0.sql \
|
||||
zm_update-1.19.1.sql \
|
||||
zm_update-1.19.2.sql \
|
||||
zm_update-1.19.3.sql \
|
||||
zm_update-1.19.4.sql \
|
||||
zm_update-1.19.5.sql \
|
||||
zm_update-1.20.0.sql \
|
||||
zm_update-1.20.1.sql \
|
||||
zm_update-1.21.0.sql \
|
||||
zm_update-1.21.1.sql \
|
||||
zm_update-1.21.2.sql \
|
||||
zm_update-1.21.3.sql \
|
||||
zm_update-1.21.4.sql \
|
||||
zm_update-1.22.0.sql \
|
||||
zm_update-1.22.1.sql \
|
||||
zm_update-1.22.2.sql \
|
||||
zm_update-1.22.3.sql \
|
||||
zm_update-1.23.0.sql \
|
||||
zm_update-1.23.1.sql \
|
||||
zm_update-1.23.2.sql \
|
||||
zm_update-1.23.3.sql \
|
||||
zm_update-1.24.0.sql \
|
||||
zm_update-1.24.1.sql \
|
||||
zm_update-1.24.2.sql \
|
||||
zm_update-1.24.3.sql \
|
||||
zm_update-1.24.4.sql \
|
||||
zm_update-1.26.0.sql \
|
||||
zm_update-1.26.1.sql \
|
||||
zm_update-1.26.2.sql \
|
||||
zm_update-1.26.3.sql
|
||||
$(dbupgrade_scripts)
|
||||
|
||||
dist_zmdbdata_DATA = \
|
||||
zm_create.sql \
|
||||
$(dbupgrade_scripts)
|
||||
|
||||
dbupgrade_scripts = $(wildcard zm_update-*.sql)
|
||||
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
INSERT INTO Monitors (Name, Type, Function, Enabled, Format, Protocol, Method, Host, Port, Path, Width, Height, Colours, Palette, Orientation, Deinterlacing, Brightness, Contrast, Hue, Colour, RefBlendPerc) VALUES ('travis_test','Remote','Modect',1,255,'http','simple','50.79.143.149','21146','/mjpg/video.mjpg',1280,800,3,0,'0',0,-1,-1,-1,-1,12);
|
||||
INSERT INTO Monitors (Name, Type, Function, Enabled, Format, Protocol, Method, Host, Port, Path, Width, Height, Colours, Palette, Orientation, Deinterlacing, Brightness, Contrast, Hue, Colour, RefBlendPerc) VALUES ('travis_test1','Remote','Modect',1,255,'http','simple','50.79.143.149','21146','/mjpg/video.mjpg',1280,800,3,0,'0',0,-1,-1,-1,-1,12);
|
||||
INSERT INTO Monitors (Name, Type, Function, Enabled, Format, Protocol, Method, Host, Port, Path, Width, Height, Colours, Palette, Orientation, Deinterlacing, Brightness, Contrast, Hue, Colour, RefBlendPerc) VALUES ('travis_test2','Remote','Modect',1,255,'http','simple','50.79.143.149','21146','/mjpg/video.mjpg',1280,800,3,0,'0',0,-1,-1,-1,-1,12);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
-- MySQL dump 10.13 Distrib 5.6.13, for Linux (i686)
|
||||
-- MySQL dump 10.13 Distrib 5.6.13, for Linux (i686)
|
||||
--
|
||||
-- Host: localhost Database: @ZM_DB_NAME@
|
||||
-- Host: localhost Database: @ZM_DB_NAME@
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 5.6.13
|
||||
-- Server version 5.6.13
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
|
@ -40,7 +40,7 @@ CREATE TABLE `Config` (
|
|||
`Category` varchar(32) NOT NULL default '',
|
||||
`Readonly` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Requires` text,
|
||||
PRIMARY KEY (`Name`)
|
||||
PRIMARY KEY (`Name`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
--
|
||||
|
@ -52,7 +52,7 @@ CREATE TABLE `ControlPresets` (
|
|||
`MonitorId` int(10) unsigned NOT NULL default '0',
|
||||
`Preset` int(10) unsigned NOT NULL default '0',
|
||||
`Label` varchar(64) NOT NULL default '',
|
||||
PRIMARY KEY (`MonitorId`,`Preset`)
|
||||
PRIMARY KEY (`MonitorId`,`Preset`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
--
|
||||
|
@ -63,7 +63,7 @@ DROP TABLE IF EXISTS `Controls`;
|
|||
CREATE TABLE `Controls` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`Type` enum('Local','Remote','Ffmpeg') NOT NULL default 'Local',
|
||||
`Type` enum('Local','Remote','Ffmpeg','Libvlc','cURL') NOT NULL default 'Local',
|
||||
`Protocol` varchar(64) default NULL,
|
||||
`CanWake` tinyint(3) unsigned NOT NULL default '0',
|
||||
`CanSleep` tinyint(3) unsigned NOT NULL default '0',
|
||||
|
@ -160,7 +160,7 @@ CREATE TABLE `Controls` (
|
|||
`TurboTiltSpeed` int(10) default NULL,
|
||||
`CanAutoScan` tinyint(3) unsigned NOT NULL default '0',
|
||||
`NumScanPaths` tinyint(3) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`Id`)
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
--
|
||||
|
@ -173,7 +173,7 @@ CREATE TABLE `Devices` (
|
|||
`Name` tinytext NOT NULL,
|
||||
`Type` enum('X10') NOT NULL default 'X10',
|
||||
`KeyString` varchar(32) NOT NULL default '',
|
||||
PRIMARY KEY (`Id`)
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
--
|
||||
|
@ -203,7 +203,7 @@ CREATE TABLE `Events` (
|
|||
`Messaged` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Executed` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Notes` text,
|
||||
PRIMARY KEY (`Id`,`MonitorId`),
|
||||
PRIMARY KEY (`Id`,`MonitorId`),
|
||||
KEY `MonitorId` (`MonitorId`),
|
||||
KEY `StartTime` (`StartTime`),
|
||||
KEY `Frames` (`Frames`),
|
||||
|
@ -227,7 +227,7 @@ CREATE TABLE `Filters` (
|
|||
`AutoExecuteCmd` tinytext,
|
||||
`AutoDelete` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Background` tinyint(1) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`Name`)
|
||||
PRIMARY KEY (`Name`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
--
|
||||
|
@ -256,12 +256,14 @@ CREATE TABLE `Groups` (
|
|||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`MonitorIds` tinytext NOT NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
--
|
||||
-- Table structure for table `Logs`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `Logs`;
|
||||
CREATE TABLE `Logs` (
|
||||
`TimeKey` decimal(16,6) NOT NULL,
|
||||
`Component` varchar(32) NOT NULL,
|
||||
|
@ -282,7 +284,7 @@ DROP TABLE IF EXISTS `MonitorPresets`;
|
|||
CREATE TABLE `MonitorPresets` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`Type` enum('Local','Remote','File','Ffmpeg') NOT NULL default 'Local',
|
||||
`Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL') NOT NULL default 'Local',
|
||||
`Device` tinytext,
|
||||
`Channel` tinytext,
|
||||
`Format` int(10) unsigned default NULL,
|
||||
|
@ -302,7 +304,7 @@ CREATE TABLE `MonitorPresets` (
|
|||
`ControlAddress` varchar(255) default NULL,
|
||||
`DefaultRate` smallint(5) unsigned NOT NULL default '100',
|
||||
`DefaultScale` smallint(5) unsigned NOT NULL default '100',
|
||||
PRIMARY KEY (`Id`)
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
--
|
||||
|
@ -313,7 +315,7 @@ DROP TABLE IF EXISTS `Monitors`;
|
|||
CREATE TABLE `Monitors` (
|
||||
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`Type` enum('Local','Remote','File','Ffmpeg') NOT NULL default 'Local',
|
||||
`Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL') NOT NULL default 'Local',
|
||||
`Function` enum('None','Monitor','Modect','Record','Mocord','Nodect') NOT NULL default 'Monitor',
|
||||
`Enabled` tinyint(3) unsigned NOT NULL default '1',
|
||||
`LinkedMonitors` varchar(255) NOT NULL default '',
|
||||
|
@ -321,12 +323,17 @@ CREATE TABLE `Monitors` (
|
|||
`Device` varchar(64) NOT NULL default '',
|
||||
`Channel` tinyint(3) unsigned NOT NULL default '0',
|
||||
`Format` int(10) unsigned NOT NULL default '0',
|
||||
`V4LMultiBuffer` tinyint(1) unsigned,
|
||||
`V4LCapturesPerFrame` tinyint(3) unsigned,
|
||||
`Protocol` varchar(16) NOT NULL default '',
|
||||
`Method` varchar(16) NOT NULL default '',
|
||||
`Host` varchar(64) NOT NULL default '',
|
||||
`Port` varchar(8) NOT NULL default '',
|
||||
`SubPath` varchar(64) NOT NULL default '',
|
||||
`Path` varchar(255) NOT NULL default '',
|
||||
`Options` varchar(255) not null default '',
|
||||
`User` varchar(64) NOT NULL default '',
|
||||
`Pass` varchar(64) NOT NULL default '',
|
||||
`Width` smallint(5) unsigned NOT NULL default '0',
|
||||
`Height` smallint(5) unsigned NOT NULL default '0',
|
||||
`Colours` tinyint(3) unsigned NOT NULL default '1',
|
||||
|
@ -349,10 +356,12 @@ CREATE TABLE `Monitors` (
|
|||
`AlarmFrameCount` smallint(5) unsigned NOT NULL default '1',
|
||||
`SectionLength` int(10) unsigned NOT NULL default '600',
|
||||
`FrameSkip` smallint(5) unsigned NOT NULL default '0',
|
||||
`MotionFrameSkip` smallint(5) unsigned NOT NULL default '0',
|
||||
`MaxFPS` decimal(5,2) default NULL,
|
||||
`AlarmMaxFPS` decimal(5,2) default NULL,
|
||||
`FPSReportInterval` smallint(5) unsigned NOT NULL default '250',
|
||||
`RefBlendPerc` tinyint(3) unsigned NOT NULL default '10',
|
||||
`RefBlendPerc` tinyint(3) unsigned NOT NULL default '6',
|
||||
`AlarmRefBlendPerc` tinyint(3) unsigned NOT NULL default '6',
|
||||
`Controllable` tinyint(3) unsigned NOT NULL default '0',
|
||||
`ControlId` int(10) unsigned NOT NULL default '0',
|
||||
`ControlDevice` varchar(255) default NULL,
|
||||
|
@ -368,7 +377,7 @@ CREATE TABLE `Monitors` (
|
|||
`SignalCheckColour` varchar(32) NOT NULL default '#0000BE',
|
||||
`WebColour` varchar(32) NOT NULL default 'red',
|
||||
`Sequence` smallint(5) unsigned default NULL,
|
||||
PRIMARY KEY (`Id`)
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
--
|
||||
|
@ -379,7 +388,7 @@ DROP TABLE IF EXISTS `States`;
|
|||
CREATE TABLE `States` (
|
||||
`Name` varchar(64) NOT NULL default '',
|
||||
`Definition` text NOT NULL,
|
||||
PRIMARY KEY (`Name`)
|
||||
PRIMARY KEY (`Name`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
--
|
||||
|
@ -419,7 +428,7 @@ CREATE TABLE `TriggersX10` (
|
|||
`Activation` varchar(32) default NULL,
|
||||
`AlarmInput` varchar(32) default NULL,
|
||||
`AlarmOutput` varchar(32) default NULL,
|
||||
PRIMARY KEY (`MonitorId`)
|
||||
PRIMARY KEY (`MonitorId`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
--
|
||||
|
@ -441,7 +450,7 @@ CREATE TABLE `Users` (
|
|||
`System` enum('None','View','Edit') NOT NULL default 'None',
|
||||
`MaxBandwidth` varchar(16) NOT NULL default '',
|
||||
`MonitorIds` tinytext NOT NULL,
|
||||
PRIMARY KEY (`Id`),
|
||||
PRIMARY KEY (`Id`),
|
||||
UNIQUE KEY `UC_Username` (`Username`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
|
@ -469,7 +478,8 @@ CREATE TABLE `ZonePresets` (
|
|||
`MinBlobs` smallint(5) unsigned default NULL,
|
||||
`MaxBlobs` smallint(5) unsigned default NULL,
|
||||
`OverloadFrames` smallint(5) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`Id`)
|
||||
`ExtendAlarmFrames` smallint(5) unsigned not null default 0,
|
||||
PRIMARY KEY (`Id`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
--
|
||||
|
@ -501,7 +511,8 @@ CREATE TABLE `Zones` (
|
|||
`MinBlobs` smallint(5) unsigned default NULL,
|
||||
`MaxBlobs` smallint(5) unsigned default NULL,
|
||||
`OverloadFrames` smallint(5) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`Id`),
|
||||
`ExtendAlarmFrames` smallint(5) unsigned not null default 0,
|
||||
PRIMARY KEY (`Id`),
|
||||
KEY `MonitorId` (`MonitorId`)
|
||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||
|
||||
|
@ -523,26 +534,29 @@ CREATE TABLE `Zones` (
|
|||
insert into Users VALUES (NULL,'admin',password('admin'),'',1,'View','Edit','Edit','Edit','Edit','Edit','','');
|
||||
|
||||
--
|
||||
-- Add a sample filter to purge the oldest 5 events when the disk is 95% full, delete is disabled though
|
||||
-- Add a sample filter to purge the oldest 100 events when the disk is 95% full
|
||||
--
|
||||
insert into Filters values ('PurgeWhenFull','{"sort_field":"Id","terms":[{"val":0,"attr":"Archived","op":"="},{"cnj":"and","val":95,"attr":"DiskPercent","op":">="}],"limit":5,"sort_asc":1}',0,0,0,0,0,0,'',1,0);
|
||||
insert into Filters values ('PurgeWhenFull','{"sort_field":"Id","terms":[{"val":0,"attr":"Archived","op":"="},{"cnj":"and","val":95,"attr":"DiskPercent","op":">="}],"limit":100,"sort_asc":1}',0,0,0,0,0,0,'',1,1);
|
||||
|
||||
--
|
||||
-- Add in some sample control protocol definitions
|
||||
--
|
||||
insert into Controls values (1,'Pelco-D','Local','PelcoD',1,1,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0);
|
||||
insert into Controls values (2,'Pelco-P','Local','PelcoP',1,1,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0);
|
||||
insert into Controls values (3,'Sony VISCA','Local','Visca',1,1,0,1,0,0,0,1,0,16384,10,4000,1,1,6,1,1,1,0,1,0,1536,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,3,1,1,1,1,0,1,1,0,1,-15578,15578,100,10000,1,1,50,1,254,1,-7789,7789,100,5000,1,1,50,1,254,0,0);
|
||||
INSERT INTO Controls VALUES (4,'Axis API v2','Remote','AxisV2',0,0,0,1,0,0,1,0,0,9999,10,2500,0,NULL,NULL,1,1,0,1,0,0,9999,10,2500,0,NULL,NULL,1,1,0,1,0,0,9999,10,2500,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,12,1,1,1,1,1,0,1,0,1,-360,360,1,90,0,NULL,NULL,0,NULL,1,-360,360,1,90,0,NULL,NULL,0,NULL,0,0);
|
||||
insert into Controls values (5,'Panasonic IP','Remote','PanasonicIP',0,0,0,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,8,1,1,1,0,1,0,0,1,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,0,0);
|
||||
insert into Controls values (6,'Neu-Fusion NCS370','Remote','Ncs370',0,0,0,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,24,1,0,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,0,0);
|
||||
insert into Controls values (7,'AirLink SkyIPCam 7xx','Remote','SkyIPCam7xx',0,0,1,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,8,1,1,1,0,1,0,1,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,0,0);
|
||||
insert into Controls values (8,'Pelco-D','Ffmpeg','PelcoD',1,1,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0);
|
||||
insert into Controls values (9,'Pelco-P','Ffmpeg','PelcoP',1,1,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0);
|
||||
INSERT INTO Controls VALUES (10,'Foscam FI8620','Ffmpeg','FI8620_Y2k',0,0,0,1,0,0,0,1,1,10,1,10,1,1,63,1,1,0,0,1,1,63,1,63,1,1,63,1,1,0,0,1,0,0,0,0,1,0,255,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,1,0,255,1,8,0,1,1,1,0,0,0,1,1,1,360,1,360,1,1,63,0,0,1,1,90,1,90,1,1,63,0,0,0,0);
|
||||
INSERT INTO Controls VALUES (11,'Foscam FI8608W','Ffmpeg','FI8608W_Y2k',1,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,1,0,255,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,1,0,255,1,8,0,1,1,1,0,0,0,1,1,0,0,0,0,1,1,128,0,0,1,0,0,0,0,1,1,128,0,0,0,0);
|
||||
INSERT INTO Controls VALUES (12,'Foscam FI9821W','Ffmpeg','FI9821W_Y2k',1,0,1,1,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,1,0,100,1,1,0,0,1,0,100,0,100,1,0,100,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,100,0,100,1,0,100,1,16,0,1,1,1,0,0,0,1,1,0,360,0,360,1,0,4,0,0,1,0,90,0,90,1,0,4,0,0,0,0);
|
||||
INSERT INTO Controls VALUES (13,'Loftek Sentinel','Remote','LoftekSentinel',0,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,255,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,6,1,1,0,0,0,1,10,0,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO Controls VALUES (NULL,'Pelco-D','Local','PelcoD',1,1,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0);
|
||||
INSERT INTO Controls VALUES (NULL,'Pelco-P','Local','PelcoP',1,1,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0);
|
||||
INSERT INTO Controls VALUES (NULL,'Sony VISCA','Local','Visca',1,1,0,1,0,0,0,1,0,16384,10,4000,1,1,6,1,1,1,0,1,0,1536,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,3,1,1,1,1,0,1,1,0,1,-15578,15578,100,10000,1,1,50,1,254,1,-7789,7789,100,5000,1,1,50,1,254,0,0);
|
||||
INSERT INTO Controls VALUES (NULL,'Axis API v2','Remote','AxisV2',0,0,0,1,0,0,1,0,0,9999,10,2500,0,NULL,NULL,1,1,0,1,0,0,9999,10,2500,0,NULL,NULL,1,1,0,1,0,0,9999,10,2500,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,12,1,1,1,1,1,0,1,0,1,-360,360,1,90,0,NULL,NULL,0,NULL,1,-360,360,1,90,0,NULL,NULL,0,NULL,0,0);
|
||||
INSERT INTO Controls VALUES (NULL,'Panasonic IP','Remote','PanasonicIP',0,0,0,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,8,1,1,1,0,1,0,0,1,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,0,0);
|
||||
INSERT INTO Controls VALUES (NULL,'Neu-Fusion NCS370','Remote','Ncs370',0,0,0,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,24,1,0,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,0,0);
|
||||
INSERT INTO Controls VALUES (NULL,'AirLink SkyIPCam 7xx','Remote','SkyIPCam7xx',0,0,1,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,8,1,1,1,0,1,0,1,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,0,0);
|
||||
INSERT INTO Controls VALUES (NULL,'Pelco-D','Ffmpeg','PelcoD',1,1,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0);
|
||||
INSERT INTO Controls VALUES (NULL,'Pelco-P','Ffmpeg','PelcoP',1,1,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0);
|
||||
INSERT INTO Controls VALUES (NULL,'Foscam FI8620','Ffmpeg','FI8620_Y2k',0,0,0,1,0,0,0,1,1,10,1,10,1,1,63,1,1,0,0,1,1,63,1,63,1,1,63,1,1,0,0,1,0,0,0,0,1,0,255,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,1,0,255,1,8,0,1,1,1,0,0,0,1,1,1,360,1,360,1,1,63,0,0,1,1,90,1,90,1,1,63,0,0,0,0);
|
||||
INSERT INTO Controls VALUES (NULL,'Foscam FI8608W','Ffmpeg','FI8608W_Y2k',1,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,1,0,255,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,1,0,255,1,8,0,1,1,1,0,0,0,1,1,0,0,0,0,1,1,128,0,0,1,0,0,0,0,1,1,128,0,0,0,0);
|
||||
INSERT INTO Controls VALUES (NULL,'Foscam FI8908W','Remote','FI8908W',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO Controls VALUES (NULL,'Foscam FI9821W','Ffmpeg','FI9821W_Y2k',1,0,1,1,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,1,0,100,1,1,0,0,1,0,100,0,100,1,0,100,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,100,0,100,1,0,100,1,16,0,1,1,1,0,0,0,1,1,0,360,0,360,1,0,4,0,0,1,0,90,0,90,1,0,4,0,0,0,0);
|
||||
INSERT INTO Controls VALUES (NULL,'Loftek Sentinel','Remote','LoftekSentinel',0,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,255,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,6,1,1,0,0,0,1,10,0,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO Controls VALUES (NULL,'Toshiba IK-WB11A','Remote','Toshiba_IK_WB11A',0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,10,0,1,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0);
|
||||
INSERT INTO Controls VALUES (NULL,'WanscamPT','Remote','Wanscam',1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,16,0,0,0,0,0,1,16,1,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0);
|
||||
|
||||
--
|
||||
-- Add some monitor preset values
|
||||
|
@ -618,12 +632,13 @@ INSERT INTO MonitorPresets VALUES (NULL,'Airlink 777W PTZ, 640x480, mjpeg','Remo
|
|||
--
|
||||
-- Add some zone preset values
|
||||
--
|
||||
INSERT INTO ZonePresets VALUES (1,'Fast, low sensitivity','Active','Percent','AlarmedPixels',60,NULL,20,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);
|
||||
INSERT INTO ZonePresets VALUES (2,'Fast, medium sensitivity','Active','Percent','AlarmedPixels',40,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);
|
||||
INSERT INTO ZonePresets VALUES (3,'Fast, high sensitivity','Active','Percent','AlarmedPixels',20,NULL,5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);
|
||||
INSERT INTO ZonePresets VALUES (4,'Best, low sensitivity','Active','Percent','Blobs',60,NULL,36,NULL,7,7,24,NULL,20,NULL,1,NULL,0);
|
||||
INSERT INTO ZonePresets VALUES (5,'Best, medium sensitivity','Active','Percent','Blobs',40,NULL,16,NULL,5,5,12,NULL,10,NULL,1,NULL,0);
|
||||
INSERT INTO ZonePresets VALUES (6,'Best, high sensitivity','Active','Percent','Blobs',20,NULL,8,NULL,3,3,6,NULL,5,NULL,1,NULL,0);
|
||||
INSERT INTO ZonePresets VALUES (1,'Default','Active','Percent','Blobs',25,NULL,3,75,3,3,3,75,2,NULL,1,NULL,0,0);
|
||||
INSERT INTO ZonePresets VALUES (2,'Fast, low sensitivity','Active','Percent','AlarmedPixels',60,NULL,20,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0);
|
||||
INSERT INTO ZonePresets VALUES (3,'Fast, medium sensitivity','Active','Percent','AlarmedPixels',40,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0);
|
||||
INSERT INTO ZonePresets VALUES (4,'Fast, high sensitivity','Active','Percent','AlarmedPixels',20,NULL,5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0);
|
||||
INSERT INTO ZonePresets VALUES (5,'Best, low sensitivity','Active','Percent','Blobs',60,NULL,36,NULL,7,7,24,NULL,20,NULL,1,NULL,0,0);
|
||||
INSERT INTO ZonePresets VALUES (6,'Best, medium sensitivity','Active','Percent','Blobs',40,NULL,16,NULL,5,5,12,NULL,10,NULL,1,NULL,0,0);
|
||||
INSERT INTO ZonePresets VALUES (7,'Best, high sensitivity','Active','Percent','Blobs',20,NULL,8,NULL,3,3,6,NULL,5,NULL,1,NULL,0,0);
|
||||
|
||||
--
|
||||
-- Apply the initial configuration
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
--
|
||||
-- This updates a 1.26.4 database to 1.26.5
|
||||
--
|
||||
|
||||
--
|
||||
-- Add AlarmRefBlendPerc field for controlling the reference image blend percent during alarm (see pull request #241)
|
||||
--
|
||||
|
||||
SET @s = (SELECT IF(
|
||||
(SELECT COUNT(*)
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = 'Monitors'
|
||||
AND table_schema = DATABASE()
|
||||
AND column_name = 'AlarmRefBlendPerc'
|
||||
) > 0,
|
||||
"SELECT 1",
|
||||
"ALTER TABLE `Monitors` ADD `AlarmRefBlendPerc` TINYINT(3) UNSIGNED NOT NULL DEFAULT '6' AFTER `RefBlendPerc`"
|
||||
));
|
||||
|
||||
PREPARE stmt FROM @s;
|
||||
EXECUTE stmt;
|
||||
|
||||
UPDATE `Monitors` SET `AlarmRefBlendPerc` = `RefBlendPerc`;
|
||||
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
--
|
||||
-- This updates a 1.26.5 database to 1.27
|
||||
--
|
||||
|
||||
--
|
||||
-- Add Libvlc and cURL monitor types
|
||||
--
|
||||
|
||||
ALTER TABLE Controls modify column Type enum('Local','Remote','Ffmpeg','Libvlc','cURL') NOT NULL default 'Local';
|
||||
ALTER TABLE MonitorPresets modify column Type enum('Local','Remote','File','Ffmpeg','Libvlc','cURL') NOT NULL default 'Local';
|
||||
ALTER TABLE Monitors modify column Type enum('Local','Remote','File','Ffmpeg','Libvlc','cURL') NOT NULL default 'Local';
|
||||
|
||||
--
|
||||
-- Add required fields for cURL authenication
|
||||
--
|
||||
|
||||
SET @s = (SELECT IF(
|
||||
(SELECT COUNT(*)
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = 'Monitors'
|
||||
AND table_schema = DATABASE()
|
||||
AND column_name = 'User'
|
||||
) > 0,
|
||||
"SELECT 'Column User exists in Monitors'",
|
||||
"ALTER TABLE `Monitors` ADD `User` VARCHAR(32) NOT NULL AFTER `SubPath`"
|
||||
));
|
||||
|
||||
PREPARE stmt FROM @s;
|
||||
EXECUTE stmt;
|
||||
|
||||
SET @s = (SELECT IF(
|
||||
(SELECT COUNT(*)
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = 'Monitors'
|
||||
AND table_schema = DATABASE()
|
||||
AND column_name = 'Pass'
|
||||
) > 0,
|
||||
"SELECT 'Column Pass exists in Monitors'",
|
||||
"ALTER TABLE `Monitors` ADD `Pass` VARCHAR(32) NOT NULL AFTER `User`"
|
||||
));
|
||||
|
||||
PREPARE stmt FROM @s;
|
||||
EXECUTE stmt;
|
||||
|
||||
--
|
||||
-- Add default zone preset
|
||||
--
|
||||
|
||||
INSERT INTO ZonePresets (Name,Type,Units,CheckMethod, MinPixelThreshold, MaxPixelThreshold, MinAlarmPixels, MaxAlarmPixels, FilterX, FilterY, MinFilterPixels, MaxFilterPixels, MinBlobPixels, MaxBlobPixels, MinBlobs, MaxBlobs, OverloadFrames ) VALUES ('Default','Active','Percent','Blobs',25,NULL,3,75,3,3,3,75,2,NULL,1,NULL,0);
|
|
@ -0,0 +1,206 @@
|
|||
--
|
||||
-- This updates a 1.27.0 database to 1.27.1
|
||||
--
|
||||
|
||||
--
|
||||
-- Add Controls definition for Wanscam
|
||||
--
|
||||
INSERT INTO Controls
|
||||
SELECT * FROM (SELECT NULL as Id,
|
||||
'WanscamPT' as Name,
|
||||
'Remote' as Type,
|
||||
'Wanscam' as Protocol,
|
||||
1 as CanWake,
|
||||
1 as CanSleep,
|
||||
1 as CanReset,
|
||||
0 as CanZoom,
|
||||
0 as CanAutoZoom,
|
||||
0 as CanZoomAbs,
|
||||
0 as CanZoomRel,
|
||||
0 as CanZoomCon,
|
||||
0 as MinZoomRange,
|
||||
0 as MaxZoomRange,
|
||||
0 as MinZoomStep,
|
||||
0 as MaxZoomStep,
|
||||
0 as HasZoomSpeed,
|
||||
0 as MinZoomSpeed,
|
||||
0 as MaxZoomSpeed,
|
||||
0 as CanFocus,
|
||||
0 as CanAutoFocus,
|
||||
0 as CanFocusAbs,
|
||||
0 as CanFocusRel,
|
||||
0 as CanFocusCon,
|
||||
0 as MinFocusRange,
|
||||
0 as MaxFocusRange,
|
||||
0 as MinFocusStep,
|
||||
0 as MaxFocusStep,
|
||||
0 as HasFocusSpeed,
|
||||
0 as MinFocusSpeed,
|
||||
0 as MaxFocusSpeed,
|
||||
1 as CanIris,
|
||||
0 as CanAutoIris,
|
||||
1 as CanIrisAbs,
|
||||
0 as CanIrisRel,
|
||||
0 as CanIrisCon,
|
||||
0 as MinIrisRange,
|
||||
16 as MaxIrisRange,
|
||||
0 as MinIrisStep,
|
||||
0 as MaxIrisStep,
|
||||
0 as HasIrisSpeed,
|
||||
0 as MinIrisSpeed,
|
||||
0 as MaxIrisSpeed,
|
||||
0 as CanGain,
|
||||
0 as CanAutoGain,
|
||||
0 as CanGainAbs,
|
||||
0 as CanGainRel,
|
||||
0 as CanGainCon,
|
||||
0 as MinGainRange,
|
||||
0 as MaxGainRange,
|
||||
0 as MinGainStep,
|
||||
0 as MaxGainStep,
|
||||
0 as HasGainSpeed,
|
||||
0 as MinGainSpeed,
|
||||
0 as MaxGainSpeed,
|
||||
1 as CanWhite,
|
||||
0 as CanAutoWhite,
|
||||
1 as CanWhiteAbs,
|
||||
0 as CanWhiteRel,
|
||||
0 as CanWhiteCon,
|
||||
0 as MinWhiteRange,
|
||||
16 as MaxWhiteRange,
|
||||
0 as MinWhiteStep,
|
||||
0 as MaxWhiteStep,
|
||||
0 as HasWhiteSpeed,
|
||||
0 as MinWhiteSpeed,
|
||||
0 as MaxWhiteSpeed,
|
||||
1 as HasPresets,
|
||||
16 as NumPresets,
|
||||
1 as HasHomePreset,
|
||||
1 as CanSetPresets,
|
||||
1 as CanMove,
|
||||
1 as CanMoveDiag,
|
||||
0 as CanMoveMap,
|
||||
0 as CanMoveAbs,
|
||||
0 as CanMoveRel,
|
||||
1 as CanMoveCon,
|
||||
1 as CanPan,
|
||||
0 as MinPanRange,
|
||||
0 as MaxPanRange,
|
||||
0 as MinPanStep,
|
||||
0 as MaxPanStep,
|
||||
0 as HasPanSpeed,
|
||||
0 as MinPanSpeed,
|
||||
0 as MaxPanSpeed,
|
||||
0 as HasTurboPan,
|
||||
0 as TurboPanSpeed,
|
||||
1 as CanTilt,
|
||||
0 as MinTiltRange,
|
||||
0 as MaxTiltRange,
|
||||
0 as MinTiltStep,
|
||||
0 as MaxTiltStep,
|
||||
0 as HasTiltSpeed,
|
||||
0 as MinTiltSpeed,
|
||||
0 as MaxTiltSpeed,
|
||||
0 as HasTurboTilt,
|
||||
0 as TurboTiltSpeed,
|
||||
0 as CanAutoScan,
|
||||
0 as NumScanPaths) AS tmp
|
||||
WHERE NOT EXISTS (
|
||||
SELECT Name FROM Controls WHERE name = 'WanscamPT'
|
||||
) LIMIT 1;
|
||||
|
||||
-- Add extend alarm frame count to zone definition and Presets
|
||||
SET @s = (SELECT IF(
|
||||
(SELECT COUNT(*)
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = 'Zones'
|
||||
AND table_schema = DATABASE()
|
||||
AND column_name = 'ExtendAlarmFrames'
|
||||
) > 0,
|
||||
"SELECT 'Column ExtendAlarmFrames exists in Zones'",
|
||||
"ALTER TABLE `Zones` ADD `ExtendAlarmFrames` smallint(5) unsigned not null default 0 AFTER `OverloadFrames`"
|
||||
));
|
||||
|
||||
PREPARE stmt FROM @s;
|
||||
EXECUTE stmt;
|
||||
|
||||
SET @s = (SELECT IF(
|
||||
(SELECT COUNT(*)
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = 'ZonePresets'
|
||||
AND table_schema = DATABASE()
|
||||
AND column_name = 'ExtendAlarmFrames'
|
||||
) > 0,
|
||||
"SELECT 'Column ExtendAlarmFrames exists in ZonePresets'",
|
||||
"ALTER TABLE `ZonePresets` ADD `ExtendAlarmFrames` smallint(5) unsigned not null default 0 AFTER `OverloadFrames`"
|
||||
));
|
||||
|
||||
PREPARE stmt FROM @s;
|
||||
EXECUTE stmt;
|
||||
|
||||
--
|
||||
-- Add MotionSkipFrame field for controlling how many frames motion detection should skip.
|
||||
--
|
||||
|
||||
SET @s = (SELECT IF(
|
||||
(SELECT COUNT(*)
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = 'Monitors'
|
||||
AND table_schema = DATABASE()
|
||||
AND column_name = 'MotionFrameSkip'
|
||||
) > 0,
|
||||
"SELECT 1",
|
||||
"ALTER TABLE `Monitors` ADD `MotionFrameSkip` smallint(5) unsigned NOT NULL default '0' AFTER `FrameSkip`"
|
||||
));
|
||||
|
||||
PREPARE stmt FROM @s;
|
||||
EXECUTE stmt;
|
||||
|
||||
--
|
||||
-- Add Monitor Options field; used for specifying Ffmpeg AVoptions like rtsp_transport http or libVLC options
|
||||
--
|
||||
SET @s = (SELECT IF(
|
||||
(SELECT COUNT(*)
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = 'Monitors'
|
||||
AND table_schema = DATABASE()
|
||||
AND column_name = 'Options'
|
||||
) > 0,
|
||||
"SELECT 'Column Options already exists in Monitors'",
|
||||
"ALTER TABLE `Monitors` ADD `Options` varchar(255) not null default '' AFTER `Path`"
|
||||
));
|
||||
|
||||
PREPARE stmt FROM @s;
|
||||
EXECUTE stmt;
|
||||
|
||||
--
|
||||
-- Add V4LMultiBuffer and V4LCapturesPerFrame to Monitor
|
||||
--
|
||||
|
||||
SET @s = (SELECT IF(
|
||||
(SELECT COUNT(*)
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = 'Monitors'
|
||||
AND table_schema = DATABASE()
|
||||
AND column_name = 'V4LMultiBuffer'
|
||||
) > 0,
|
||||
"SELECT 'Column V4LMultiBuffer exists in Monitors'",
|
||||
"ALTER TABLE `Monitors` ADD `V4LMultiBuffer` tinyint(1) unsigned AFTER `Format`"
|
||||
));
|
||||
|
||||
PREPARE stmt FROM @s;
|
||||
EXECUTE stmt;
|
||||
|
||||
SET @s = (SELECT IF(
|
||||
(SELECT COUNT(*)
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE table_name = 'Monitors'
|
||||
AND table_schema = DATABASE()
|
||||
AND column_name = 'V4LCapturesPerFrame'
|
||||
) > 0,
|
||||
"SELECT 'Column V4LCapturesPerFrame exists in Monitors'",
|
||||
"ALTER TABLE `Monitors` ADD `V4LCapturesPerFrame` tinyint(3) unsigned AFTER `V4LMultiBuffer`"
|
||||
));
|
||||
|
||||
PREPARE stmt FROM @s;
|
||||
EXECUTE stmt;
|
|
@ -20,18 +20,18 @@ would silently revert the changes and cause event loss - refer
|
|||
bug #608793).
|
||||
|
||||
If you do want to change the location, here are a couple of suggestions.
|
||||
(thanks to vagrant@freegeek.org):
|
||||
|
||||
These lines in fstab could allow you to bind-mount an alternate location
|
||||
These lines would mount /dev/sdX1 to /video_storage, and then 'link' /video_storage
|
||||
to the locations that ZoneMinder expects them to be at.
|
||||
|
||||
/dev/sdX1 /otherdrive ext3 defaults 0 2
|
||||
/otherdrive/zoneminder/images /var/cache/zoneminder/images bind defaults 0 2
|
||||
/otherdrive/zoneminder/events /var/cache/zoneminder/events bind defaults 0 2
|
||||
/dev/sdX1 /video_storage ext4 defaults 0 2
|
||||
/video_storage/zoneminder/images /var/cache/zoneminder/images none bind 0 2
|
||||
/video_storage/zoneminder/events /var/cache/zoneminder/events none bind 0 2
|
||||
|
||||
or if you have a separate partition for each:
|
||||
|
||||
/dev/sdX1 /var/cache/zoneminder/images ext3 defaults 0 2
|
||||
/dev/sdX2 /var/cache/zoneminder/events ext3 defaults 0 2
|
||||
/dev/sdX1 /var/cache/zoneminder/images ext4 defaults 0 2
|
||||
/dev/sdX2 /var/cache/zoneminder/events ext4 defaults 0 2
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,18 +1,12 @@
|
|||
zoneminder (1.26.4-1) unstable; urgency=low
|
||||
zoneminder (1.27.99+1-testing-SNAPSHOT2014072901) testing; urgency=medium
|
||||
|
||||
* improvements to zmupdate.pl, cleanups
|
||||
* improve error messages
|
||||
* Make zmupdate re-run the most recent patch so that people running the daily builds get their db updates
|
||||
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Thu, 03 Oct 2013 11:40:32 -0400
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Tue, 29 Jul 2014 14:50:20 -0400
|
||||
|
||||
zoneminder (1.26.3-1) unstable; urgency=low
|
||||
zoneminder (1.27.0+1-testing-v4ltomonitor-1) testing; urgency=high
|
||||
|
||||
* A 'minor' release focusing on performance improvement and bug fixes.
|
||||
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Sun, 22 Sep 2013 09:36:42 +0800
|
||||
|
||||
zoneminder (1.25.1-1) unstable; urgency=low
|
||||
|
||||
* Initial Version.
|
||||
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Mon, 29 Apr 2013 12:38:00 -0400
|
||||
* Snapshot release -
|
||||
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Wed, 09 Jul 2014 21:35:29 -0400
|
||||
|
|
|
@ -2,13 +2,32 @@ Source: zoneminder
|
|||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: Isaac Connor <iconnor@connortechnology.com>
|
||||
Build-Depends: debhelper (>= 5), autoconf, automake, dpatch, libphp-serialization-perl, libgnutls-dev, libmysqlclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, ffmpeg, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libpcre3, libarchive-zip-perl, libmime-lite-perl, libjpeg8, dh-autoreconf
|
||||
Build-Depends: debhelper (>= 7.0.50), autoconf, automake, dpatch, libphp-serialization-perl, libgnutls-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, ffmpeg | libav-tools, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libpcre3, libarchive-zip-perl, libmime-lite-perl, libjpeg8, dh-autoreconf, libvlccore-dev, libvlc-dev, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libgcrypt11-dev, libpolkit-gobject-1-dev
|
||||
Standards-Version: 3.9.2
|
||||
|
||||
Package: zoneminder
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2, libapache2-mod-php5, php5, php5-mysql, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-lite-perl, mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, ffmpeg, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53, libjpeg8, zip, libnet-sftp-foreign-perl
|
||||
Description: Linux video camera security and surveillance solution
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2 | httpd, libapache2-mod-php5 | libapache2-mod-fcgid | php5-fpm, php5, php5-mysql|php5-mysqlnd, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl, mariadb-client|mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, ffmpeg | libav-tools, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53, libjpeg8, zip, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl, libvlccore5 | libvlccore7, libvlc5, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libpolkit-gobject-1-0
|
||||
Recommends: mysql-server|mariadb-server
|
||||
Description: A video camera security and surveillance solution
|
||||
ZoneMinder is intended for use in single or multi-camera video security
|
||||
applications, including commercial or home CCTV, theft prevention and child
|
||||
or family member or home monitoring and other care scenarios. It
|
||||
supports capture, analysis, recording, and monitoring of video data coming
|
||||
from one or more video or network cameras attached to a Linux system.
|
||||
ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom
|
||||
cameras using a variety of protocols. It is suitable for use as a home
|
||||
video security system and for commercial or professional video security
|
||||
and surveillance. It can also be integrated into a home automation system
|
||||
via X.10 or other protocols.
|
||||
|
||||
Package: zoneminder-dbg
|
||||
Architecture: any
|
||||
Depends:
|
||||
zoneminder (= ${binary:Version}),
|
||||
${misc:Depends}
|
||||
Description: debugging syumbols for zoneminder.
|
||||
ZoneMinder is a video camera security and surveillance solution.
|
||||
ZoneMinder is intended for use in single or multi-camera video security
|
||||
applications, including commercial or home CCTV, theft prevention and child
|
||||
or family member or home monitoring and other care scenarios. It
|
||||
|
|
|
@ -25,7 +25,6 @@ start() {
|
|||
echo -n "Starting $prog: "
|
||||
mkdir -p $RUNDIR && chown www-data:www-data $RUNDIR
|
||||
mkdir -p $TMPDIR && chown www-data:www-data $TMPDIR
|
||||
zmfix -a
|
||||
$command start
|
||||
RETVAL=$?
|
||||
[ $RETVAL = 0 ] && echo success
|
||||
|
|
|
@ -2,44 +2,36 @@
|
|||
|
||||
set -e
|
||||
|
||||
VERSION=1.26.4
|
||||
|
||||
if [ "$1" = "configure" ]; then
|
||||
#
|
||||
# Get mysql started if it isn't
|
||||
#
|
||||
if ! $(/etc/init.d/mysql status >/dev/null 2>&1); then
|
||||
invoke-rc.d mysql start
|
||||
fi
|
||||
if $(/etc/init.d/mysql status >/dev/null 2>&1); then
|
||||
mysqladmin --defaults-file=/etc/mysql/debian.cnf -f reload
|
||||
# test if database if already present...
|
||||
if ! $(echo quit | mysql --defaults-file=/etc/mysql/debian.cnf zm > /dev/null 2> /dev/null) ; then
|
||||
cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf
|
||||
echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
|
||||
fi
|
||||
if [ -e "/etc/init.d/mysql" ]; then
|
||||
#
|
||||
# Get mysql started if it isn't
|
||||
#
|
||||
if ! $(/etc/init.d/mysql status >/dev/null 2>&1); then
|
||||
invoke-rc.d mysql start
|
||||
fi
|
||||
if $(/etc/init.d/mysql status >/dev/null 2>&1); then
|
||||
mysqladmin --defaults-file=/etc/mysql/debian.cnf -f reload
|
||||
# test if database if already present...
|
||||
if ! $(echo quit | mysql --defaults-file=/etc/mysql/debian.cnf zm > /dev/null 2> /dev/null) ; then
|
||||
cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf
|
||||
echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
|
||||
fi
|
||||
|
||||
# get old version from upgrade...
|
||||
OLD_ZM_VERSION=${2%-*}
|
||||
if [ -z "$OLD_ZM_VERSION" ]; then
|
||||
# fall back to getting version from database itself, which may not necessarily be accurate?
|
||||
OLD_ZM_VERSION=$(echo 'select Value from Config where Name = "ZM_DYN_CURR_VERSION";' | mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names zm )
|
||||
fi
|
||||
if [ -n "$OLD_ZM_VERSION" ] && [ "$OLD_ZM_VERSION" != "$VERSION" ] ; then
|
||||
echo 'grant lock tables, create, alter on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
|
||||
# stop zoneminder before performing database upgrade.
|
||||
invoke-rc.d zoneminder stop || true
|
||||
zmupdate.pl --nointeractive --version $OLD_ZM_VERSION
|
||||
fi
|
||||
invoke-rc.d zoneminder stop || true
|
||||
zmupdate.pl --nointeractive
|
||||
|
||||
else
|
||||
echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.'
|
||||
fi
|
||||
chown www-data:www-data /var/log/zm
|
||||
chown www-data:www-data /var/lib/zm/
|
||||
if [ -z "$2" ]; then
|
||||
chown www-data:www-data -R /var/cache/zoneminder
|
||||
fi
|
||||
else
|
||||
echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.'
|
||||
fi
|
||||
else
|
||||
echo 'mysql not found, assuming remote server.'
|
||||
fi
|
||||
chown www-data:www-data /var/log/zm
|
||||
chown www-data:www-data /var/lib/zm/
|
||||
if [ -z "$2" ]; then
|
||||
chown www-data:www-data -R /var/cache/zoneminder
|
||||
fi
|
||||
fi
|
||||
# Ensure zoneminder is stopped...
|
||||
if [ -x "/etc/init.d/zoneminder" ]; then
|
||||
|
@ -55,10 +47,7 @@ if [ "$1" = "configure" ]; then
|
|||
chown www-data:www-data -R /var/cache/zoneminder
|
||||
else
|
||||
chown www-data:www-data /var/log/zm
|
||||
OLD_ZM_VERSION=${2%-*}
|
||||
if [ "$OLD_ZM_VERSION" != "$VERSION" ] ; then
|
||||
zmupdate.pl --version $OLD_ZM_VERSION
|
||||
fi
|
||||
zmupdate.pl
|
||||
fi
|
||||
fi
|
||||
#DEBHELPER#
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
UPSTREAM_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ' | cut -d - -f 1)
|
||||
POSTINST_VERSION := $(shell egrep ^VERSION= debian/postinst | cut -d = -f 2)
|
||||
|
||||
# These are used for cross-compiling and for saving the configure script
|
||||
# from having to guess our platform (since we know it already)
|
||||
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
|
@ -31,12 +28,9 @@ endif
|
|||
dh $@ --with autoreconf
|
||||
|
||||
override_dh_auto_configure:
|
||||
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --sysconfdir=/etc/zm --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-mysql=/usr --with-webdir=/usr/share/zoneminder --with-ffmpeg=/usr --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-crashtrace=no --enable-mmap=yes
|
||||
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --sysconfdir=/etc/zm --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-mysql=/usr --with-mariadb=/usr --with-webdir=/usr/share/zoneminder --with-ffmpeg=/usr --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-crashtrace=no --enable-mmap=yes
|
||||
|
||||
override_dh_clean:
|
||||
# check to make sure that postinst contains the correct upstream version
|
||||
[ $(UPSTREAM_VERSION) = $(POSTINST_VERSION) ]
|
||||
|
||||
# Add here commands to clean up after the build process.
|
||||
[ ! -f Makefile ] || $(MAKE) distclean
|
||||
dh_clean
|
||||
|
@ -71,3 +65,7 @@ override_dh_fixperms:
|
|||
|
||||
override_dh_auto_test:
|
||||
# do not run tests...
|
||||
|
||||
.PHONY: override_dh_strip
|
||||
override_dh_strip:
|
||||
dh_strip --dbg-package=zoneminder-dbg
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
# CMakeLists.txt for the Fedora Target Distro.
|
||||
|
||||
# Download jscalendar & move files into position
|
||||
file(DOWNLOAD http://downloads.sourceforge.net/jscalendar/jscalendar-1.0.zip ${CMAKE_CURRENT_SOURCE_DIR}/jscalendar-1.0.zip STATUS download_jsc)
|
||||
if(download_jsc EQUAL 0)
|
||||
message(STATUS "Jscalander successfully downloaded. Installing...")
|
||||
execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/jscalendar.sh WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ERROR_VARIABLE unzip_jsc)
|
||||
message(STATUS "Status of jscalender script was: ${unzip_jsc}")
|
||||
else(download_jsc EQUAL 0)
|
||||
message(STATUS "Unable to download optional jscalander. Skipping...")
|
||||
endif(download_jsc EQUAL 0)
|
||||
|
||||
# Create several empty folders
|
||||
file(MAKE_DIRECTORY sock swap zoneminder zoneminder-upload events images temp)
|
||||
|
||||
# Install the empty folders
|
||||
#install(DIRECTORY run DESTINATION /var DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_WRITE GROUP_READ GROUP_EXECUTE WORLD_WRITE WORLD_READ WORLD_EXECUTE)
|
||||
install(DIRECTORY sock swap DESTINATION /var/lib/zoneminder DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(DIRECTORY zoneminder DESTINATION /var/log DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(DIRECTORY zoneminder DESTINATION /run DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(DIRECTORY zoneminder-upload DESTINATION /var/spool DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(DIRECTORY events images temp DESTINATION /var/lib/zoneminder DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
|
||||
# Create symlinks
|
||||
install(CODE "execute_process(COMMAND ln -sf ../../../../var/lib/zoneminder/events \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/events\")")
|
||||
install(CODE "execute_process(COMMAND ln -sf ../../../../var/lib/zoneminder/images \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/images\")")
|
||||
install(CODE "execute_process(COMMAND ln -sf ../../../../var/lib/zoneminder/temp \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/temp\")")
|
||||
|
||||
# Fedora requires cambozola as a separate package so just link to it
|
||||
install(CODE "execute_process(COMMAND ln -sf ../../java/cambozola.jar \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/cambozola.jar\")")
|
||||
|
||||
# Install auxillary files required to run zoneminder on Fedora
|
||||
install(FILES zoneminder.conf DESTINATION /etc/httpd/conf.d PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
install(FILES zoneminder.logrotate DESTINATION /etc/logrotate.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
install(FILES zoneminder.tmpfiles DESTINATION /etc/tmpfiles.d RENAME zoneminder.conf PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(FILES redalert.wav DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/sounds PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(FILES zoneminder.service DESTINATION /usr/lib/systemd/system PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
|
||||
# Install jscalendar
|
||||
if(unzip_jsc STREQUAL "")
|
||||
install(DIRECTORY jscalendar-1.0/ DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/tools/jscalendar)
|
||||
endif(unzip_jsc STREQUAL "")
|
|
@ -4,27 +4,29 @@ New installs
|
|||
1. Unless you are already using the MySQL server or you are running it
|
||||
remotely you will need to ensure that the server is installed and secured:
|
||||
|
||||
yum install mysql-community-server
|
||||
--OR--
|
||||
yum install mariadb-server
|
||||
sudo yum install community-mysql-server
|
||||
|
||||
sudo systemctl enable mysqld
|
||||
|
||||
sudo system start mysqld
|
||||
sudo systemctl start mysqld.service
|
||||
|
||||
mysql_secure_installation
|
||||
|
||||
2. Using the password for the root account set during the previous step, you
|
||||
will need to create the ZoneMinder database, assuming your database server is local:
|
||||
NOTE: The Fedora team currently recommends mysql-community over mariadb
|
||||
|
||||
mysql -u root -p < /usr/share/zoneminder/db/zm_create.sql
|
||||
mysqladmin reload
|
||||
2. Using the password for the root account set during the previous step, you
|
||||
will need to create the ZoneMinder database, assuming your database server
|
||||
is local:
|
||||
|
||||
mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
|
||||
mysqladmin -uroot -p reload
|
||||
|
||||
3. The database needs a user. One is not created by default because this would
|
||||
introduce an obvious security issue. The following should set this up:
|
||||
|
||||
mysql -u root -p
|
||||
grant select,insert,update,delete,alter on zm.* to 'zmuser'@localhost identified by 'zmpass';
|
||||
grant select,insert,update,delete,lock tables,alter on zm.* to
|
||||
'zmuser'@localhost identified by 'zmpass';
|
||||
|
||||
Obviously, change at least zmpass to an actual, secure password or
|
||||
passphrase. You can change zmuser as well if you like.
|
||||
|
@ -44,31 +46,32 @@ New installs
|
|||
may be necessary to disable SELinux for httpd, or even completely for
|
||||
ZoneMinder to function. This will be addressed in a later release. Run
|
||||
|
||||
setenforce 0
|
||||
sudo setenforce 0
|
||||
|
||||
for testing, and edit /etc/sysconfig/selinux to disable it at boot time.
|
||||
|
||||
7. IMPORTANT: Edit /etc/httpd/conf.d/zoneminder.conf and/or /etc/httpd/conf.
|
||||
7. IMPORTANT: Edit /etc/httpd/conf.d/zoneminder.conf and/or
|
||||
/etc/httpd/conf/httpd.conf.
|
||||
|
||||
The httpd.conf file included with this version of Fedora processes the conf.d
|
||||
folder after the default ScriptAlias directive in the httpd.conf file.
|
||||
Previously, the conf.d folder was processed before the default ScriptAlias
|
||||
directive. This causes a ScriptAlias overlap and breaks Zoneminder's streaming
|
||||
abilities.
|
||||
directive. This causes a ScriptAlias overlap and breaks Zoneminder's
|
||||
streaming abilities.
|
||||
|
||||
Reference: http://httpd.apache.org/docs/2.4/mod/mod_alias.html#order
|
||||
Bug Report: https://bugzilla.redhat.com/show_bug.cgi?id=973067
|
||||
|
||||
WORKAROUND #1
|
||||
If you are running zoneminder on a dedicated server then the simplest solution
|
||||
may be to simply comment out the line in httpd.conf that reads:
|
||||
If you are running zoneminder on a dedicated server then the simplest
|
||||
solution may be to simply comment out the line in httpd.conf that reads:
|
||||
|
||||
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
|
||||
|
||||
WORKAROUND #2
|
||||
If you need both the default cgi-bin folder & the zoneminder cgi-bin folder then
|
||||
a solution might be to move the following line before the default ScriptAlias
|
||||
directive in the httpd.conf file:
|
||||
If you need both the default cgi-bin folder & the zoneminder cgi-bin folder
|
||||
then a solution might be to move the following line before the default
|
||||
ScriptAlias directive in the httpd.conf file:
|
||||
|
||||
IncludeOptional conf.d/*.conf
|
||||
|
||||
|
@ -77,29 +80,10 @@ New installs
|
|||
sudo systemctl enable httpd.service
|
||||
sudo systemctl start httpd.service
|
||||
|
||||
9. You should immediately visit http://localhost/zm and secure the system if
|
||||
it is network facing. To do this:
|
||||
9. Now start zoneminder:
|
||||
|
||||
a) click Options, then System.
|
||||
b) check OPT_USE_AUTH.
|
||||
c) set AUTH_HASH_SECRET to a random string.
|
||||
d) click Save and refresh the main browser window.
|
||||
e) You should be prompted to log in; the default username/password is admin/admin.
|
||||
f) Open Options again, choose the newly visible Users tab.
|
||||
g) click the admin user and set a password.
|
||||
h) enable OPT_CONTROL on the Ssytem tab to enable ptz camera control.
|
||||
|
||||
10. The zoneminder.service file fails at present but the zmpkg.pl script
|
||||
can be run as root to start zoneminder.
|
||||
|
||||
sudo zmpkg.pl start
|
||||
|
||||
To start zoneminder automatically, create /etc/rc.d/rc.local and place the
|
||||
following inside it:
|
||||
#!/bin/sh
|
||||
/usr/bin/zmpkg.pl start
|
||||
|
||||
The rc.local file must be made executable.
|
||||
sudo systemctl enable zoneminder.service
|
||||
sudo systemctl start zoneminder.service
|
||||
|
||||
Upgrades
|
||||
========
|
||||
|
@ -108,7 +92,22 @@ Upgrades
|
|||
information. Comparing /etc/zm.conf and /etc/zm.conf.rpmnew should help to
|
||||
do this.
|
||||
|
||||
2. You will need to upgrade the ZoneMinder database as described in the
|
||||
manual. This command should be sufficient when run as root:
|
||||
2. Add additional permissions to the zmuser account:
|
||||
|
||||
zmupdate.pl --user=root --pass=<mysql_root_pwd> --version=<from version>
|
||||
mysql -u root -p
|
||||
grant lock tables,alter on zm.* to
|
||||
'zmuser'@localhost identified by 'zmpass';
|
||||
|
||||
Since this is an upgrade, the assumption is that the zmuser account already
|
||||
has select, insert, update, and delete permission.
|
||||
|
||||
3. You will need to upgrade the ZoneMinder database as described in the
|
||||
manual. Only if the previous step was succesful, may you run zmupdate like
|
||||
so:
|
||||
|
||||
sudo zmupdate.pl --version=<from version>
|
||||
|
||||
|
||||
If unsure then run it this way:
|
||||
|
||||
sudo zmupdate.pl --user=root --pass=<mysql_root_pwd> --version=<from version>
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
--- configure.ac 2013-09-05 10:33:08.000000000 -0500
|
||||
+++ configure.ac.dbinstall 2013-09-05 17:23:28.555553447 -0500
|
||||
@@ -1,13 +1,11 @@
|
||||
AC_PREREQ(2.59)
|
||||
-AC_INIT(zm,1.26.4,[http://www.zoneminder.com/forums/ - Please check FAQ first],ZoneMinder,http://www.zoneminder.com/downloads.html)
|
||||
+AC_INIT(zm,1.26.4,[http://www.zoneminder.com/forums/ - Please check FAQ first],zoneminder,http://www.zoneminder.com/downloads.html)
|
||||
AM_INIT_AUTOMAKE
|
||||
AC_CONFIG_SRCDIR(src/zm.h)
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
|
||||
AC_SUBST([AM_CXXFLAGS], [-D__STDC_CONSTANT_MACROS])
|
||||
|
||||
-PATH_BUILD=`pwd`
|
||||
-AC_SUBST(PATH_BUILD)
|
||||
TIME_BUILD=`date +'%s'`
|
||||
AC_SUBST(TIME_BUILD)
|
||||
|
||||
@@ -354,6 +352,8 @@ AC_PROG_PERL_MODULES(X10::ActiveHome,,AC
|
||||
|
||||
AC_DEFINE_DIR([BINDIR],[bindir],[Expanded binary directory])
|
||||
AC_DEFINE_DIR([LIBDIR],[libdir],[Expanded library directory])
|
||||
+AC_DEFINE_DIR([DATADIR],[datadir],[Expanded data directory])
|
||||
+AC_SUBST(PKGDATADIR,"$DATADIR/$PACKAGE")
|
||||
AC_SUBST(ZM_PID,"$ZM_RUNDIR/zm.pid")
|
||||
AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Expanded configuration directory])
|
||||
AC_SUBST(ZM_CONFIG,"$SYSCONFDIR/zm.conf")
|
||||
diff -up ./db/Makefile.am.dbinstall ./db/Makefile.am
|
||||
--- ./db/Makefile.am.dbinstall 2009-10-14 04:42:46.000000000 -0500
|
||||
+++ ./db/Makefile.am 2011-03-24 22:50:14.173912137 -0500
|
||||
@@ -1,7 +1,16 @@
|
||||
AUTOMAKE_OPTIONS = gnu
|
||||
|
||||
+zmdbdatadir = $(pkgdatadir)/db
|
||||
+
|
||||
EXTRA_DIST = \
|
||||
zm_create.sql.in \
|
||||
+ $(dbupgrade_scripts)
|
||||
+
|
||||
+dist_zmdbdata_DATA = \
|
||||
+ zm_create.sql \
|
||||
+ $(dbupgrade_scripts)
|
||||
+
|
||||
+dbupgrade_scripts = \
|
||||
zm_update-0.0.1.sql \
|
||||
zm_update-0.9.7.sql \
|
||||
zm_update-0.9.8.sql \
|
||||
diff -up ./scripts/zmupdate.pl.in.dbinstall ./scripts/zmupdate.pl.in
|
||||
--- scripts/zmupdate.pl.in 2013-10-05 14:46:16.000000000 -0500
|
||||
+++ scripts/zmupdate.pl.in.dbinstall 2013-10-05 18:56:05.431045910 -0500
|
||||
@@ -429,7 +429,7 @@ if ( $version )
|
||||
}
|
||||
else
|
||||
{
|
||||
- $command .= ZM_PATH_BUILD."/db";
|
||||
+ $command .= ZM_PATH_DATA."/db";
|
||||
}
|
||||
$command .= "/zm_update-".$version.".sql";
|
||||
|
||||
@@ -1030,7 +1030,7 @@ if ( $version )
|
||||
if ( $version ge '1.26.0' ) {
|
||||
|
||||
my @files;
|
||||
- $updateDir = ZM_PATH_BUILD."/db" if ! $updateDir;
|
||||
+ $updateDir = ZM_PATH_DATA."/db" if ! $updateDir;
|
||||
opendir( my $dh, $updateDir ) || die "Can't open updateDir $!";
|
||||
@files = sort grep { (!/^\./) && /^zm_update\-[\d\.]+\.sql$/ && -f "$updateDir/$_" } readdir($dh);
|
||||
closedir $dh;
|
||||
diff -up ./zm.conf.in.dbinstall ./zm.conf.in
|
||||
--- ./zm.conf.in.dbinstall 2008-07-25 04:48:16.000000000 -0500
|
||||
+++ ./zm.conf.in 2011-03-24 22:50:14.175912077 -0500
|
||||
@@ -12,8 +12,8 @@
|
||||
# Current version of ZoneMinder
|
||||
ZM_VERSION=@VERSION@
|
||||
|
||||
-# Path to build directory, used mostly for finding DB upgrade scripts
|
||||
-ZM_PATH_BUILD=@PATH_BUILD@
|
||||
+# Path to installed data directory, used mostly for finding DB upgrade scripts
|
||||
+ZM_PATH_DATA=@PKGDATADIR@
|
||||
|
||||
# Build time, used to record when to trigger various checks
|
||||
ZM_TIME_BUILD=@TIME_BUILD@
|
|
@ -0,0 +1,392 @@
|
|||
%define zmuid $(id -un)
|
||||
%define zmgid $(id -gn)
|
||||
%define zmuid_final apache
|
||||
%define zmgid_final apache
|
||||
|
||||
%global _hardened_build 1
|
||||
|
||||
### Delete the lines below to build with ffmpeg and/or x10
|
||||
%define _without_ffmpeg 1
|
||||
%define _without_x10 1
|
||||
|
||||
Name: zoneminder
|
||||
Version: 1.27
|
||||
Release: 1%{?dist}
|
||||
Summary: A camera monitoring and analysis tool
|
||||
Group: System Environment/Daemons
|
||||
# jscalendar is LGPL (any version): http://www.dynarch.com/projects/calendar/
|
||||
# Mootools is inder the MIT license: http://mootools.net/
|
||||
License: GPLv2+ and LGPLv2+ and MIT
|
||||
URL: http://www.zoneminder.com/
|
||||
|
||||
#Source: https://github.com/ZoneMinder/ZoneMinder/archive/v%{version}.tar.gz
|
||||
Source: ZoneMinder-%{version}.tar.gz
|
||||
|
||||
Patch1: zoneminder-1.26.0-defaults.patch
|
||||
|
||||
BuildRequires: cmake gnutls-devel systemd-units bzip2-devel
|
||||
BuildRequires: community-mysql-devel pcre-devel libjpeg-turbo-devel
|
||||
BuildRequires: perl(Archive::Tar) perl(Archive::Zip)
|
||||
BuildRequires: perl(Date::Manip) perl(DBD::mysql)
|
||||
BuildRequires: perl(ExtUtils::MakeMaker) perl(LWP::UserAgent)
|
||||
BuildRequires: perl(MIME::Entity) perl(MIME::Lite)
|
||||
BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap)
|
||||
BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign)
|
||||
BuildRequires: perl(Expect) perl(Sys::Syslog)
|
||||
BuildRequires: gcc gcc-c++ vlc-devel libcurl-devel
|
||||
%{!?_without_ffmpeg:BuildRequires: ffmpeg-devel}
|
||||
%{!?_without_x10:BuildRequires: perl(X10::ActiveHome) perl(Astro::SunTime)}
|
||||
# cmake needs the following installed at build time due to the way it auto-detects certain parameters
|
||||
BuildRequires: httpd polkit-devel
|
||||
%{!?_without_ffmpeg:BuildRequires: ffmpeg}
|
||||
|
||||
Requires: httpd php php-mysql cambozola polkit
|
||||
Requires: libjpeg-turbo vlc-core libcurl
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
|
||||
Requires: perl(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP)
|
||||
Requires: perl(LWP::Protocol::https)
|
||||
%{!?_without_ffmpeg:Requires: ffmpeg}
|
||||
|
||||
Requires(post): systemd-units systemd-sysv
|
||||
Requires(post): /usr/bin/gpasswd
|
||||
Requires(post): /usr/bin/less
|
||||
Requires(preun): systemd-units
|
||||
Requires(postun): systemd-units
|
||||
|
||||
%description
|
||||
ZoneMinder is a set of applications which is intended to provide a complete
|
||||
solution allowing you to capture, analyse, record and monitor any cameras you
|
||||
have attached to a Linux based machine. It is designed to run on kernels which
|
||||
support the Video For Linux (V4L) interface and has been tested with cameras
|
||||
attached to BTTV cards, various USB cameras and IP network cameras. It is
|
||||
designed to support as many cameras as you can attach to your computer without
|
||||
too much degradation of performance.
|
||||
|
||||
%prep
|
||||
%setup -q -n ZoneMinder-%{version}
|
||||
|
||||
%patch1 -p0 -b .defaults
|
||||
#%patch2 -p0 -b .noffmpeg
|
||||
|
||||
%build
|
||||
%cmake \
|
||||
-DZM_TARGET_DISTRO="f19" \
|
||||
-DZM_PERL_SUBPREFIX=`x="%{perl_vendorlib}" ; echo ${x#"%{_prefix}"}` \
|
||||
%{?_without_ffmpeg:-DZM_NO_FFMPEG=ON} \
|
||||
%{?_without_x10:-DZM_NO_X10=ON} \
|
||||
.
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
export DESTDIR=%{buildroot}
|
||||
make install
|
||||
|
||||
%post
|
||||
if [ $1 -eq 1 ] ; then
|
||||
# Initial installation
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
# Allow zoneminder access to local video sources, serial ports, and x10
|
||||
/usr/bin/gpasswd -a %{zmuid_final} video
|
||||
/usr/bin/gpasswd -a %{zmuid_final} dialout
|
||||
|
||||
# Display the README for post installation instructions
|
||||
/usr/bin/less %{_docdir}/%{name}-%{version}/README.Fedora
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
# Package removal, not upgrade
|
||||
/bin/systemctl --no-reload disable zoneminder.service > /dev/null 2>&1 || :
|
||||
/bin/systemctl stop zoneminder.service > /dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%postun
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
if [ $1 -ge 1 ] ; then
|
||||
# Package upgrade, not uninstall
|
||||
/bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%triggerun -- zoneminder < 1.25.0-4
|
||||
# Save the current service runlevel info
|
||||
# User must manually run systemd-sysv-convert --apply zoneminder
|
||||
# to migrate them to systemd targets
|
||||
/usr/bin/systemd-sysv-convert --save zoneminder >/dev/null 2>&1 ||:
|
||||
|
||||
# Run these because the SysV package being removed won't do them
|
||||
/sbin/chkconfig --del zoneminder >/dev/null 2>&1 || :
|
||||
/bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || :
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS COPYING README.md distros/fedora/README.Fedora distros/fedora/jscalendar-doc
|
||||
%config %attr(640,root,%{zmgid_final}) /etc/zm.conf
|
||||
%config(noreplace) %attr(644,root,root) /etc/httpd/conf.d/zoneminder.conf
|
||||
%config(noreplace) /etc/tmpfiles.d/zoneminder.conf
|
||||
%config(noreplace) /etc/logrotate.d/zoneminder
|
||||
|
||||
%{_unitdir}/zoneminder.service
|
||||
|
||||
%{_bindir}/zma
|
||||
%{_bindir}/zmaudit.pl
|
||||
%{_bindir}/zmc
|
||||
%{_bindir}/zmcontrol.pl
|
||||
%{_bindir}/zmdc.pl
|
||||
%{_bindir}/zmf
|
||||
%{_bindir}/zmfilter.pl
|
||||
# zmfix removed from zoneminder 1.26.6
|
||||
#%attr(4755,root,root) %{_bindir}/zmfix
|
||||
%{_bindir}/zmpkg.pl
|
||||
%{_bindir}/zmstreamer
|
||||
%{_bindir}/zmtrack.pl
|
||||
%{_bindir}/zmtrigger.pl
|
||||
%{_bindir}/zmu
|
||||
%{_bindir}/zmupdate.pl
|
||||
%{_bindir}/zmvideo.pl
|
||||
%{_bindir}/zmwatch.pl
|
||||
%{_bindir}/zmcamtool.pl
|
||||
%{_bindir}/zmsystemctl.pl
|
||||
%{!?_without_x10:%{_bindir}/zmx10.pl}
|
||||
|
||||
%{perl_vendorlib}/ZoneMinder*
|
||||
%{perl_vendorlib}/%{_arch}-linux-thread-multi/auto/ZoneMinder*
|
||||
#%{perl_archlib}/ZoneMinder*
|
||||
%{_mandir}/man*/*
|
||||
%dir %{_libexecdir}/zoneminder
|
||||
%{_libexecdir}/zoneminder/cgi-bin
|
||||
%dir %{_datadir}/zoneminder
|
||||
%{_datadir}/zoneminder/db
|
||||
%{_datadir}/zoneminder/www
|
||||
|
||||
%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy
|
||||
%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules
|
||||
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/events
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/images
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/sock
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/swap
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/temp
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/log/zoneminder
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/spool/zoneminder-upload
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /run/zoneminder
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Mar 14 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.27
|
||||
- Tweak build requirements for cmake
|
||||
|
||||
* Sat Feb 01 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.27
|
||||
- Add zmcamtool.pl. Bump version for 1.27 release.
|
||||
|
||||
* Mon Dec 16 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.5
|
||||
- This is a bug fixe release
|
||||
- RTSP fixes, cmake enhancements, couple other misc fixes
|
||||
|
||||
* Mon Oct 07 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.4
|
||||
- Initial cmake build.
|
||||
|
||||
* Sat Oct 05 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.4
|
||||
- Fedora specific path changes have been moved to zoneminder-1.26.0-defaults.patch
|
||||
- All files are now part of the zoneminder source tree. Update specfile accordingly.
|
||||
|
||||
* Sat Sep 21 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.3
|
||||
- Initial rebuild for ZoneMinder 1.26.3 release.
|
||||
|
||||
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.0-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
* Mon Jan 21 2013 Adam Tkac <atkac redhat com> - 1.25.0-12
|
||||
- rebuild due to "jpeg8-ABI" feature drop
|
||||
|
||||
* Mon Jan 7 2013 Remi Collet <rcollet@redhat.com> - 1.25.0-11
|
||||
- fix configuration file for httpd 2.4, #871502
|
||||
|
||||
* Fri Dec 21 2012 Adam Tkac <atkac redhat com> - 1.25.0-10
|
||||
- rebuild against new libjpeg
|
||||
|
||||
* Thu Aug 09 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-9
|
||||
- Add patch to work around v4l2 api breakage in 3.5 kernel.
|
||||
|
||||
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.0-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
* Sat Jun 23 2012 Petr Pisar <ppisar@redhat.com> - 1.25.0-7
|
||||
- Perl 5.16 rebuild
|
||||
|
||||
* Wed Mar 21 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-6
|
||||
- Fix stupid thinko in sql modifications.
|
||||
|
||||
* Sat Feb 25 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-5
|
||||
- Clean up macro usage.
|
||||
|
||||
* Sat Feb 25 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-4
|
||||
- Convert to systemd.
|
||||
- Add tmpfiles.d configuration since the initscript isn't around to create
|
||||
/run/zoneminder.
|
||||
- Remove some pointless executable permissions.
|
||||
- Add logrotate file.
|
||||
|
||||
* Wed Feb 22 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-3
|
||||
- Update README.Fedora to reference systemctl and mention timezone info in
|
||||
php.ini.
|
||||
- Add proper default for EYEZM_LOG_TO_FILE.
|
||||
|
||||
|
||||
* Thu Feb 09 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-2
|
||||
- Rebuild for new pcre.
|
||||
|
||||
* Thu Jan 19 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-1
|
||||
- Update to 1.25.0
|
||||
- Fix gcc4.7 build problems.
|
||||
- Drop gcc4.4 build fixes; for whatever reason they now break the build.
|
||||
- Clean up old patches.
|
||||
- Force setting of ZM_TMPDIR and ZM_RUNDIR.
|
||||
|
||||
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.4-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
* Thu Sep 15 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-3
|
||||
- Re-add the dist-tag that somehow got lost.
|
||||
|
||||
* Thu Sep 15 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-2
|
||||
- Add patch for bug 711780 - fix syntax issue in Mapped.pm.
|
||||
- Undo that patch, and undo another which was the cause of the whole mess.
|
||||
- Fix up other patches so ZM_PATH_BUILD is both defined and useful.
|
||||
- Make sure database creation mods actually take.
|
||||
- Update Fedora-specific docs with some additional info.
|
||||
- Use bundled mootools (javascript, so no guideline violation).
|
||||
- Update download location.
|
||||
- Update the gcrypt patch to actually work.
|
||||
- Upstream changed the tarball without changing the version to patch a
|
||||
vulnerability, so redownload.
|
||||
|
||||
* Sun Aug 14 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-1
|
||||
- Initial attempt to upgrade to 1.24.4.
|
||||
- Add patch from BZ 460310 to build against libgcrypt instead of requiring the
|
||||
gnutls openssl libs.
|
||||
|
||||
* Thu Jul 21 2011 Petr Sabata <contyk@redhat.com> - 1.24.3-7.20110324svn3310
|
||||
- Perl mass rebuild
|
||||
|
||||
* Wed Jul 20 2011 Petr Sabata <contyk@redhat.com> - 1.24.3-6.20110324svn3310
|
||||
- Perl mass rebuild
|
||||
|
||||
* Mon May 09 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-5.20110324svn3310
|
||||
- Bump for gnutls update.
|
||||
|
||||
* Thu Mar 24 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-4.20110324svn3310
|
||||
- Update to latest 1.24.3 subversion. Turns out that what upstream was calling
|
||||
1.24.3 is really just an occasionally updated devel snapshot.
|
||||
- Rebase various patches.
|
||||
|
||||
* Wed Mar 23 2011 Dan Horák <dan@danny.cz> - 1.24.3-3
|
||||
- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
* Tue Jan 25 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-1
|
||||
- Update to latest upstream version.
|
||||
- Rebase patches.
|
||||
- Initial incomplete attempt to disable v4l1 support.
|
||||
|
||||
* Fri Jan 21 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-6
|
||||
- Unbundle cambozola; instead link to the separately pacakged copy.
|
||||
- Remove BuildRoot:, %%clean and buildroot cleaning in %%install.
|
||||
- Git rid of mixed space/tab usage by removing all tabs.
|
||||
- Remove unnecessary Conflicts: line.
|
||||
- Attempt to force short_open_tag on for the code directories.
|
||||
- Move default location of sockets, swaps, logfiles and some temporary files to
|
||||
make more sense and allow things to work better with a future selinux policy.
|
||||
- Fix errors in README.Fedora.
|
||||
|
||||
* Wed Jun 02 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.24.2-5
|
||||
- Mass rebuild with perl-5.12.0
|
||||
|
||||
* Fri Dec 4 2009 Stepan Kasal <skasal@redhat.com> - 1.24.2-4
|
||||
- rebuild against perl 5.10.1
|
||||
- use Perl vendorarch and archlib variables correctly
|
||||
|
||||
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||
|
||||
* Wed Jul 22 2009 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-2
|
||||
- Bump release since 1.24.2-1 was mistakenly tagged a few months ago.
|
||||
|
||||
* Wed Jul 22 2009 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-1
|
||||
- Initial update to 1.24.2.
|
||||
- Rebase patches.
|
||||
- Update mootools download location.
|
||||
- Update to mootools 1.2.3.
|
||||
- Add additional dependencies for some optional features.
|
||||
|
||||
* Sat Apr 11 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-3
|
||||
- Remove unused Sys::Mmap perl dependency RPM is finding
|
||||
|
||||
* Sat Apr 11 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-2
|
||||
- Update gcc44 patch to disable -frepo, seems to be broken with gcc44
|
||||
- Added noffmpeg patch to make building outside mock easier
|
||||
|
||||
* Sat Mar 21 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-1
|
||||
- Patch for gcc 4.4 compilation errors
|
||||
- Upgrade to 1.24.1
|
||||
|
||||
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.23.3-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
* Sat Jan 24 2009 Caolán McNamara <caolanm@redhat.com> - 1.23.3-3
|
||||
- rebuild for dependencies
|
||||
|
||||
* Mon Dec 15 2008 Martin Ebourne <martin@zepler.org> - 1.23.3-2
|
||||
- Fix permissions on zm.conf
|
||||
|
||||
* Fri Jul 11 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.23.3-1
|
||||
- Initial attempt at packaging 1.23.
|
||||
|
||||
* Tue Jul 1 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-15
|
||||
- Add perl module compat dependency, bz #453590
|
||||
|
||||
* Tue May 6 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-14
|
||||
- Remove default runlevel, bz #441315
|
||||
|
||||
* Mon Apr 28 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.22.3-13
|
||||
- Backport patch for CVE-2008-1381 from 1.23.3 to 1.22.3.
|
||||
|
||||
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.22.3-12
|
||||
- Autorebuild for GCC 4.3
|
||||
|
||||
* Thu Jan 3 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-11
|
||||
- Fix compilation on gcc 4.3
|
||||
|
||||
* Thu Dec 6 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-10
|
||||
- Rebuild for new openssl
|
||||
|
||||
* Thu Aug 2 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-8
|
||||
- Fix licence tag
|
||||
|
||||
* Thu Jul 12 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-7
|
||||
- Fixes from testing by Jitz including missing dependencies and database creation
|
||||
|
||||
* Sat Jun 30 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-6
|
||||
- Disable crashtrace on ppc
|
||||
|
||||
* Sat Jun 30 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-5
|
||||
- Fix uid for directories in /var/lib/zoneminder
|
||||
|
||||
* Tue Jun 26 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-4
|
||||
- Added perl Archive::Tar dependency
|
||||
- Disabled web interface due to lack of access control on the event images
|
||||
|
||||
* Sun Jun 10 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-3
|
||||
- Changes recommended in review by Jason Tibbitts
|
||||
|
||||
* Mon Apr 2 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-2
|
||||
- Standardised on package name of zoneminder
|
||||
|
||||
* Thu Dec 28 2006 Martin Ebourne <martin@zepler.org> - 1.22.3-1
|
||||
- First version. Uses some parts from zm-1.20.1 by Corey DeLasaux and Serg Oskin
|
|
@ -1,10 +1,20 @@
|
|||
%define cambrev 0.931
|
||||
%define moorev 1.3.2
|
||||
%define jscrev 1.0
|
||||
|
||||
%define zmuid $(id -un)
|
||||
%define zmgid $(id -gn)
|
||||
%define zmuid_final apache
|
||||
%define zmgid_final apache
|
||||
|
||||
%global _hardened_build 1
|
||||
|
||||
### Delete the lines below to build with ffmpeg and/or x10
|
||||
%define _without_ffmpeg 1
|
||||
%define _without_x10 1
|
||||
|
||||
Name: zoneminder
|
||||
Version: 1.26.3
|
||||
Version: 1.27
|
||||
Release: 1%{?dist}
|
||||
Summary: A camera monitoring and analysis tool
|
||||
Group: System Environment/Daemons
|
||||
|
@ -13,55 +23,49 @@ Group: System Environment/Daemons
|
|||
License: GPLv2+ and LGPLv2+ and MIT
|
||||
URL: http://www.zoneminder.com/
|
||||
|
||||
#Source: http://www2.zoneminder.com/downloads/ZoneMinder-%{version}.tar.gz
|
||||
#Source: https://github.com/ZoneMinder/ZoneMinder/archive/v%{version}.tar.gz
|
||||
Source: ZoneMinder-%{version}.tar.gz
|
||||
Source2: zoneminder.conf
|
||||
Source3: redalert.wav
|
||||
Source4: README.Fedora
|
||||
Source5: http://downloads.sourceforge.net/jscalendar/jscalendar-1.0.zip
|
||||
Source6: zoneminder.service
|
||||
Source7: zoneminder.logrotate
|
||||
Source2: jscalendar-%{jscrev}.zip
|
||||
#Source2: http://downloads.sourceforge.net/jscalendar/jscalendar-%{jscrev}.zip
|
||||
|
||||
# Need to unravel the proper mootools files to grab from upstream, since the
|
||||
# number of them keeps multiplying. In the meantime, rely on the ones bundled
|
||||
# with zoneminder. As these are javascript, there is no guideline violation
|
||||
# here.
|
||||
#Source8: http://mootools.net/download/get/mootools-1.2.3-core-yc.js
|
||||
Patch1: zoneminder-1.26.3-dbinstall.patch
|
||||
Patch2: zoneminder-1.24.3-runlevel.patch
|
||||
#Patch3: zoneminder-1.26.3-noffmpeg.patch
|
||||
Patch10: zoneminder-1.24.4-installfix.patch
|
||||
Patch11: zoneminder-1.26.3-gcc48.patch
|
||||
#Patch12: zoneminder-1.25.0-gcrypt.patch
|
||||
#Patch13: zoneminder-1.25.0-kernel35.patch
|
||||
#Patch14: zoneminder-1.26.3-ffmpeg.patch
|
||||
#Source3: http://mootools.net/download/get/mootools-core-%{moorev}-full-compat-yc.js
|
||||
|
||||
Patch1: zoneminder-1.24.3-runlevel.patch
|
||||
Patch2: zoneminder-1.26.0-defaults.patch
|
||||
%{?_without_ffmpeg:Patch3: zoneminder-1.26.3-noffmpeg.patch}
|
||||
|
||||
BuildRequires: automake gnutls-devel systemd-units
|
||||
BuildRequires: libtool bzip2-devel
|
||||
BuildRequires: mysql-devel pcre-devel libjpeg-devel
|
||||
BuildRequires: community-mysql-devel pcre-devel libjpeg-turbo-devel
|
||||
BuildRequires: perl(Archive::Tar) perl(Archive::Zip)
|
||||
BuildRequires: perl(Date::Manip) perl(DBD::mysql)
|
||||
BuildRequires: perl(ExtUtils::MakeMaker) perl(LWP::UserAgent)
|
||||
BuildRequires: perl(ExtUtils::MakeMaker) perl(LWP::UserAgent::Determined)
|
||||
BuildRequires: perl(MIME::Entity) perl(MIME::Lite)
|
||||
BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap)
|
||||
BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign)
|
||||
BuildRequires: perl(Expect)
|
||||
BuildRequires: gcc gcc-c++ ffmpeg-devel
|
||||
BuildRequires: autoconf autoconf-archive
|
||||
# Uncomment for X10 support
|
||||
#BuildRequires: perl(X10::ActiveHome) perl(Astro::SunTime)
|
||||
BuildRequires: perl(Expect) perl(Sys::Syslog)
|
||||
BuildRequires: gcc gcc-c++ vlc-devel libcurl-devel
|
||||
BuildRequires: autoconf autoconf-archive polkit-devel
|
||||
%{!?_without_ffmpeg:BuildRequires: ffmpeg-devel}
|
||||
%{!?_without_x10:BuildRequires: perl(X10::ActiveHome) perl(Astro::SunTime)}
|
||||
|
||||
Requires: httpd php php-mysql cambozola
|
||||
Requires: libjpeg-turbo ffmpeg
|
||||
Requires: httpd php php-mysql cambozola polkit
|
||||
Requires: libjpeg-turbo libcurl vlc-core ffmpeg
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
|
||||
Requires: perl(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP)
|
||||
Requires: perl(LWP::Protocol::https)
|
||||
|
||||
Requires(post): systemd-units systemd-sysv
|
||||
Requires(post): /usr/bin/gpasswd
|
||||
Requires(post): /usr/bin/less
|
||||
Requires(preun): systemd-units
|
||||
Requires(postun): systemd-units
|
||||
|
||||
|
||||
%description
|
||||
ZoneMinder is a set of applications which is intended to provide a complete
|
||||
solution allowing you to capture, analyse, record and monitor any cameras you
|
||||
|
@ -71,29 +75,22 @@ attached to BTTV cards, various USB cameras and IP network cameras. It is
|
|||
designed to support as many cameras as you can attach to your computer without
|
||||
too much degradation of performance.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n ZoneMinder-%{version}
|
||||
|
||||
# Unpack jscalendar and move some files around
|
||||
%setup -q -D -T -a 5 -n ZoneMinder-%{version}
|
||||
%setup -q -D -T -a 2 -n ZoneMinder-%{version}
|
||||
mkdir jscalendar-doc
|
||||
pushd jscalendar-1.0
|
||||
mv *html *php doc/* README ../jscalendar-doc
|
||||
rmdir doc
|
||||
popd
|
||||
|
||||
%patch1 -p0 -b .dbinstall
|
||||
%patch2 -p0 -b .runlevel
|
||||
#%patch3 -p0 -b .noffmpeg
|
||||
%patch10 -p0 -b .installfix
|
||||
%patch11 -p0 -b .gcc47
|
||||
#%patch12 -p0 -b .gcrypt
|
||||
#%patch13 -p0 -b .kernel35
|
||||
#%patch14 -p0 -b .ffmpeg
|
||||
cp %{SOURCE4} README.Fedora
|
||||
chmod -x src/zm_event.cpp src/zm_user.h
|
||||
%patch1 -p0 -b .runlevel
|
||||
%patch2 -p0 -b .defaults
|
||||
%{?_without_ffmpeg:%patch3 -p0 -b .noffmpeg}
|
||||
|
||||
chmod -x src/zm_event.cpp src/zm_user.h
|
||||
|
||||
%build
|
||||
libtoolize --force
|
||||
|
@ -101,15 +98,9 @@ aclocal
|
|||
autoheader
|
||||
automake --force-missing --add-missing
|
||||
autoconf
|
||||
#autoreconf
|
||||
|
||||
OPTS=""
|
||||
#%ifnarch %{ix86} x86_64
|
||||
# OPTS="$OPTS --disable-crashtrace"
|
||||
#%endif
|
||||
|
||||
export ZM_RUNDIR=/var/run/zoneminder
|
||||
export ZM_TMPDIR=/var/lib/zoneminder/temp
|
||||
%configure \
|
||||
--disable-crashtrace \
|
||||
--with-libarch=%{_lib} \
|
||||
|
@ -125,50 +116,42 @@ export ZM_TMPDIR=/var/lib/zoneminder/temp
|
|||
ZM_SSL_LIB="gnutls" \
|
||||
ZM_RUNDIR=/var/run/zoneminder \
|
||||
ZM_TMPDIR=/var/lib/zoneminder/temp \
|
||||
%ifarch x86_64
|
||||
CXXFLAGS="-D__STDC_CONSTANT_MACROS -msse2" \
|
||||
%else
|
||||
CXXFLAGS="-D__STDC_CONSTANT_MACROS" \
|
||||
%endif
|
||||
--with-extralibs="" \
|
||||
$OPTS
|
||||
|
||||
# Have to do this now because the configure script wipes out modifications made to this file
|
||||
cat <<EOF >> db/zm_create.sql
|
||||
# Fedora change:
|
||||
# Alter some default paths to match the default URL and selinux expectations
|
||||
update Config set Value = '/cgi-bin/zm/nph-zms' where Name = 'ZM_PATH_ZMS';
|
||||
update Config set Value = '/var/log/zoneminder' where Name = 'ZM_PATH_LOGS';
|
||||
update Config set Value = '/var/log/zoneminder/zm_debug_log+' where Name = 'ZM_EXTRA_DEBUG_LOG';
|
||||
update Config set Value = '/var/log/zoneminder/zm_xml.log' where Name = 'ZM_EYEZM_LOG_FILE';
|
||||
update Config set Value = '/var/lib/zoneminder/sock' where Name = 'ZM_PATH_SOCKS';
|
||||
update Config set Value = '/var/lib/zoneminder/swap' where Name = 'ZM_PATH_SWAP';
|
||||
update Config set Value = '/var/spool/zoneminder-upload' where Name = 'ZM_UPLOAD_FTP_LOC_DIR';
|
||||
EOF
|
||||
|
||||
make %{?_smp_mflags}
|
||||
%{__perl} -pi -e 's/(ZM_WEB_USER=).*$/${1}%{zmuid_final}/;' \
|
||||
-e 's/(ZM_WEB_GROUP=).*$/${1}%{zmgid_final}/;' zm.conf
|
||||
|
||||
|
||||
%install
|
||||
install -d %{buildroot}/%{_localstatedir}/run
|
||||
make install DESTDIR=%{buildroot} \
|
||||
INSTALLDIRS=vendor
|
||||
rm -rf %{buildroot}/%{perl_vendorarch} %{buildroot}/%{perl_archlib}
|
||||
rm -f %{buildroot}/%{_bindir}/zmx10.pl
|
||||
%{?_without_x10:%{__rm} -f %{buildroot}/%{_bindir}/zmx10.pl}
|
||||
|
||||
install -m 755 -d %{buildroot}/var/log/zoneminder
|
||||
for dir in events images temp
|
||||
do
|
||||
install -m 755 -d %{buildroot}/var/lib/zoneminder/$dir
|
||||
rmdir %{buildroot}/%{_datadir}/zoneminder/www/$dir
|
||||
if [ -d %{buildroot}/%{_datadir}/zoneminder/www/$dir ]; then
|
||||
rmdir %{buildroot}/%{_datadir}/zoneminder/www/$dir
|
||||
fi
|
||||
ln -sf ../../../../var/lib/zoneminder/$dir %{buildroot}/%{_datadir}/zoneminder/www/$dir
|
||||
done
|
||||
install -m 755 -d %{buildroot}/var/lib/zoneminder/sock
|
||||
install -m 755 -d %{buildroot}/var/lib/zoneminder/swap
|
||||
install -m 755 -d %{buildroot}/var/spool/zoneminder-upload
|
||||
|
||||
install -D -m 644 %{SOURCE2} %{buildroot}/etc/httpd/conf.d/zoneminder.conf
|
||||
install -D -m 755 %{SOURCE3} %{buildroot}/%{_datadir}/zoneminder/www/sounds/redalert.wav
|
||||
install -D -m 644 %{SOURCE6} %{buildroot}/%{_unitdir}/zoneminder.service
|
||||
install -D -m 644 %{SOURCE7} %{buildroot}/etc/logrotate.d/zoneminder
|
||||
install -D -m 644 distros/fedora/zoneminder.conf %{buildroot}/etc/httpd/conf.d/zoneminder.conf
|
||||
install -D -m 755 distros/fedora/redalert.wav %{buildroot}/%{_datadir}/zoneminder/www/sounds/redalert.wav
|
||||
install -D -m 644 distros/fedora/zoneminder.service %{buildroot}/%{_unitdir}/zoneminder.service
|
||||
install -D -m 644 distros/fedora/zoneminder.logrotate %{buildroot}/etc/logrotate.d/zoneminder
|
||||
|
||||
# Install jscalendar - this really should be in its own package
|
||||
install -d -m 755 %{buildroot}/%{_datadir}/%{name}/www/jscalendar
|
||||
|
@ -176,13 +159,18 @@ cp -rp jscalendar-1.0/* %{buildroot}/%{_datadir}/zoneminder/www/jscalendar
|
|||
|
||||
# Set up cambozola
|
||||
pushd %{buildroot}/%{_datadir}/zoneminder/www
|
||||
ln -s ../../java/cambozola.jar
|
||||
%{__ln_s} ../../java/cambozola.jar
|
||||
popd
|
||||
|
||||
install -d -m 755 %{buildroot}/etc/tmpfiles.d
|
||||
cat > %{buildroot}/etc/tmpfiles.d/zoneminder.conf <<EOF
|
||||
d /run/zoneminder 0755 %{zmuid_final} %{zmgid_final}
|
||||
EOF
|
||||
# Set up mootools
|
||||
pushd %{buildroot}/%{_datadir}/%{name}/www
|
||||
ln -f -s tools/mootools/mootools-core-%{moorev}-yc.js mootools-core.js
|
||||
ln -f -s tools/mootools/mootools-more-%{moorev}.1-yc.js mootools-more.js
|
||||
popd
|
||||
|
||||
# Create an entry for tmpfiles.d
|
||||
install -D -m 755 distros/fedora/zoneminder.tmpfiles %{buildroot}/etc/tmpfiles.d/zoneminder.conf
|
||||
|
||||
install -m 755 -d %{buildroot}/run/zoneminder
|
||||
|
||||
|
||||
|
@ -192,6 +180,13 @@ if [ $1 -eq 1 ] ; then
|
|||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
# Allow zoneminder access to local video sources, serial ports, and x10
|
||||
/usr/bin/gpasswd -a %{zmuid_final} video
|
||||
/usr/bin/gpasswd -a %{zmuid_final} dialout
|
||||
|
||||
# Display the README for post installation instructions
|
||||
/usr/bin/less %{_docdir}/%{name}-%{version}/README.Fedora
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
# Package removal, not upgrade
|
||||
|
@ -219,8 +214,8 @@ fi
|
|||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS COPYING README.md README.Fedora jscalendar-doc
|
||||
%config(noreplace) %attr(640,root,%{zmgid_final}) /etc/zm.conf
|
||||
%doc AUTHORS COPYING README.md distros/fedora/README.Fedora jscalendar-doc
|
||||
%config %attr(640,root,%{zmgid_final}) /etc/zm.conf
|
||||
%config(noreplace) %attr(644,root,root) /etc/httpd/conf.d/zoneminder.conf
|
||||
%config(noreplace) /etc/tmpfiles.d/zoneminder.conf
|
||||
%config(noreplace) /etc/logrotate.d/zoneminder
|
||||
|
@ -234,7 +229,8 @@ fi
|
|||
%{_bindir}/zmdc.pl
|
||||
%{_bindir}/zmf
|
||||
%{_bindir}/zmfilter.pl
|
||||
%attr(4755,root,root) %{_bindir}/zmfix
|
||||
# zmfix removed from zoneminder 1.26.6
|
||||
#%attr(4755,root,root) %{_bindir}/zmfix
|
||||
%{_bindir}/zmpkg.pl
|
||||
%{_bindir}/zmstreamer
|
||||
%{_bindir}/zmtrack.pl
|
||||
|
@ -243,7 +239,9 @@ fi
|
|||
%{_bindir}/zmupdate.pl
|
||||
%{_bindir}/zmvideo.pl
|
||||
%{_bindir}/zmwatch.pl
|
||||
#%{_bindir}/zmx10.pl
|
||||
%{_bindir}/zmcamtool.pl
|
||||
%{_bindir}/zmsystemctl.pl
|
||||
%{!?_without_x10:%{_bindir}/zmx10.pl}
|
||||
|
||||
%{perl_vendorlib}/ZoneMinder*
|
||||
%{_mandir}/man*/*
|
||||
|
@ -253,6 +251,9 @@ fi
|
|||
%{_datadir}/zoneminder/db
|
||||
%{_datadir}/zoneminder/www
|
||||
|
||||
%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy
|
||||
%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules
|
||||
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/events
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/images
|
||||
|
@ -265,8 +266,19 @@ fi
|
|||
|
||||
|
||||
%changelog
|
||||
* Sat Feb 01 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.27
|
||||
- Add zmcamtool.pl. Bump version for 1.27 release.
|
||||
|
||||
* Mon Dec 16 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.5
|
||||
- This is a bug fixe release
|
||||
- RTSP fixes, cmake enhancements, couple other misc fixes
|
||||
|
||||
* Sat Oct 05 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.4
|
||||
- Fedora specific path changes have been moved to zoneminder-1.26.0-defaults.patch
|
||||
- All files are now part of the zoneminder source tree. Update specfile accordingly.
|
||||
|
||||
* Sat Sep 21 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.3
|
||||
- Initial rebuild for ZoneMinder 1.26.3 release.
|
||||
- Initial rebuild for ZoneMinder 1.26.3 release.
|
||||
|
||||
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.0-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
@ -0,0 +1 @@
|
|||
../redhat/jscalendar.sh
|
|
@ -1 +0,0 @@
|
|||
../redhat/redalert.wav
|
|
@ -0,0 +1 @@
|
|||
../redhat/redalert.wav
|
|
@ -0,0 +1,47 @@
|
|||
--- scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in 2013-08-01 18:14:45.175241378 -0500
|
||||
+++ scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in.defaults 2013-08-07 18:57:42.525006149 -0500
|
||||
@@ -187,7 +187,7 @@
|
||||
},
|
||||
{
|
||||
name => "ZM_PATH_ZMS",
|
||||
- default => "/cgi-bin/nph-zms",
|
||||
+ default => "/cgi-bin/zm/nph-zms",
|
||||
description => "Web path to zms streaming server",
|
||||
help => "The ZoneMinder streaming server is required to send streamed images to your browser. It will be installed into the cgi-bin path given at configuration time. This option determines what the web path to the server is rather than the local path on your machine. Ordinarily the streaming server runs in parser-header mode however if you experience problems with streaming you can change this to non-parsed-header (nph) mode by changing 'zms' to 'nph-zms'.",
|
||||
type => $types{rel_path},
|
||||
@@ -276,7 +276,7 @@
|
||||
},
|
||||
{
|
||||
name => "ZM_OPT_CAMBOZOLA",
|
||||
- default => "no",
|
||||
+ default => "yes",
|
||||
description => "Is the (optional) cambozola java streaming client installed",
|
||||
help => "Cambozola is a handy low fat cheese flavoured Java applet that ZoneMinder uses to view image streams on browsers such as Internet Explorer that don't natively support this format. If you use this browser it is highly recommended to install this from http://www.charliemouse.com/code/cambozola/ however if it is not installed still images at a lower refresh rate can still be viewed.",
|
||||
type => $types{boolean},
|
||||
@@ -639,7 +639,7 @@
|
||||
},
|
||||
{
|
||||
name => "ZM_PATH_SWAP",
|
||||
- default => "@ZM_TMPDIR@",
|
||||
+ default => "/dev/shm",
|
||||
description => "Path to location for temporary swap images used in streaming",
|
||||
help => "Buffered playback requires temporary swap images to be stored for each instance of the streaming daemons. This option determines where these images will be stored. The images will actually be stored in sub directories beneath this location and will be automatically cleaned up after a period of time.",
|
||||
type => $types{abs_path},
|
||||
@@ -902,7 +902,7 @@
|
||||
},
|
||||
{
|
||||
name => "ZM_UPLOAD_FTP_LOC_DIR",
|
||||
- default => "@ZM_TMPDIR@",
|
||||
+ default => "/var/spool/zoneminder-upload",
|
||||
description => "The local directory in which to create upload files",
|
||||
help => "You can use filters to instruct ZoneMinder to upload events to a remote ftp server. This option indicates the local directory that ZoneMinder should use for temporary upload files. These are files that are created from events, uploaded and then deleted.",
|
||||
requires => [ { name => "ZM_OPT_UPLOAD", value => "yes" } ],
|
||||
@@ -1258,7 +1258,7 @@
|
||||
},
|
||||
{
|
||||
name => "ZM_OPT_CONTROL",
|
||||
- default => "no",
|
||||
+ default => "yes",
|
||||
description => "Support controllable (e.g. PTZ) cameras",
|
||||
help => "ZoneMinder includes limited support for controllable cameras. A number of sample protocols are included and others can easily be added. If you wish to control your cameras via ZoneMinder then select this option otherwise if you only have static cameras or use other control methods then leave this option off.",
|
||||
type => $types{boolean},
|
|
@ -0,0 +1,392 @@
|
|||
%define zmuid $(id -un)
|
||||
%define zmgid $(id -gn)
|
||||
%define zmuid_final apache
|
||||
%define zmgid_final apache
|
||||
|
||||
%global _hardened_build 1
|
||||
|
||||
### Delete the lines below to build with ffmpeg and/or x10
|
||||
%define _without_ffmpeg 1
|
||||
%define _without_x10 1
|
||||
|
||||
Name: zoneminder
|
||||
Version: 1.28.0
|
||||
Release: 1%{?dist}
|
||||
Summary: A camera monitoring and analysis tool
|
||||
Group: System Environment/Daemons
|
||||
# jscalendar is LGPL (any version): http://www.dynarch.com/projects/calendar/
|
||||
# Mootools is inder the MIT license: http://mootools.net/
|
||||
License: GPLv2+ and LGPLv2+ and MIT
|
||||
URL: http://www.zoneminder.com/
|
||||
|
||||
#Source: https://github.com/ZoneMinder/ZoneMinder/archive/v%{version}.tar.gz
|
||||
Source: ZoneMinder-%{version}.tar.gz
|
||||
|
||||
Patch1: zoneminder-1.28.0-defaults.patch
|
||||
|
||||
BuildRequires: cmake gnutls-devel systemd-units bzip2-devel
|
||||
BuildRequires: community-mysql-devel pcre-devel libjpeg-turbo-devel
|
||||
BuildRequires: perl(Archive::Tar) perl(Archive::Zip)
|
||||
BuildRequires: perl(Date::Manip) perl(DBD::mysql)
|
||||
BuildRequires: perl(ExtUtils::MakeMaker) perl(LWP::UserAgent)
|
||||
BuildRequires: perl(MIME::Entity) perl(MIME::Lite)
|
||||
BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap)
|
||||
BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign)
|
||||
BuildRequires: perl(Expect) perl(Sys::Syslog)
|
||||
BuildRequires: gcc gcc-c++ vlc-devel libcurl-devel
|
||||
%{!?_without_ffmpeg:BuildRequires: ffmpeg-devel}
|
||||
%{!?_without_x10:BuildRequires: perl(X10::ActiveHome) perl(Astro::SunTime)}
|
||||
# cmake needs the following installed at build time due to the way it auto-detects certain parameters
|
||||
BuildRequires: httpd polkit-devel
|
||||
%{!?_without_ffmpeg:BuildRequires: ffmpeg}
|
||||
|
||||
Requires: httpd php php-mysql cambozola polkit
|
||||
Requires: libjpeg-turbo vlc-core libcurl
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
|
||||
Requires: perl(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP)
|
||||
Requires: perl(LWP::Protocol::https)
|
||||
%{!?_without_ffmpeg:Requires: ffmpeg}
|
||||
|
||||
Requires(post): systemd-units systemd-sysv
|
||||
Requires(post): /usr/bin/gpasswd
|
||||
Requires(post): /usr/bin/less
|
||||
Requires(preun): systemd-units
|
||||
Requires(postun): systemd-units
|
||||
|
||||
%description
|
||||
ZoneMinder is a set of applications which is intended to provide a complete
|
||||
solution allowing you to capture, analyse, record and monitor any cameras you
|
||||
have attached to a Linux based machine. It is designed to run on kernels which
|
||||
support the Video For Linux (V4L) interface and has been tested with cameras
|
||||
attached to BTTV cards, various USB cameras and IP network cameras. It is
|
||||
designed to support as many cameras as you can attach to your computer without
|
||||
too much degradation of performance.
|
||||
|
||||
%prep
|
||||
%setup -q -n ZoneMinder-%{version}
|
||||
|
||||
%patch1 -p0 -b .defaults
|
||||
|
||||
%build
|
||||
%cmake \
|
||||
-DZM_TARGET_DISTRO="f20" \
|
||||
-DZM_PERL_SUBPREFIX=`x="%{perl_vendorlib}" ; echo ${x#"%{_prefix}"}` \
|
||||
%{?_without_ffmpeg:-DZM_NO_FFMPEG=ON} \
|
||||
%{?_without_x10:-DZM_NO_X10=ON} \
|
||||
.
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
export DESTDIR=%{buildroot}
|
||||
make install
|
||||
|
||||
%post
|
||||
if [ $1 -eq 1 ] ; then
|
||||
# Initial installation
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
# Allow zoneminder access to local video sources, serial ports, and x10
|
||||
/usr/bin/gpasswd -a %{zmuid_final} video
|
||||
/usr/bin/gpasswd -a %{zmuid_final} dialout
|
||||
|
||||
# Display the README for post installation instructions
|
||||
/usr/bin/less %{_docdir}/%{name}-%{version}/README.Fedora
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
# Package removal, not upgrade
|
||||
/bin/systemctl --no-reload disable zoneminder.service > /dev/null 2>&1 || :
|
||||
/bin/systemctl stop zoneminder.service > /dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%postun
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
if [ $1 -ge 1 ] ; then
|
||||
# Package upgrade, not uninstall
|
||||
/bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%triggerun -- zoneminder < 1.25.0-4
|
||||
# Save the current service runlevel info
|
||||
# User must manually run systemd-sysv-convert --apply zoneminder
|
||||
# to migrate them to systemd targets
|
||||
/usr/bin/systemd-sysv-convert --save zoneminder >/dev/null 2>&1 ||:
|
||||
|
||||
# Run these because the SysV package being removed won't do them
|
||||
/sbin/chkconfig --del zoneminder >/dev/null 2>&1 || :
|
||||
/bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || :
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS COPYING README.md distros/fedora/README.Fedora distros/fedora/jscalendar-doc
|
||||
%config %attr(640,root,%{zmgid_final}) /etc/zm.conf
|
||||
%config(noreplace) %attr(644,root,root) /etc/httpd/conf.d/zoneminder.conf
|
||||
%config(noreplace) /etc/tmpfiles.d/zoneminder.conf
|
||||
%config(noreplace) /etc/logrotate.d/zoneminder
|
||||
|
||||
%{_unitdir}/zoneminder.service
|
||||
|
||||
%{_bindir}/zma
|
||||
%{_bindir}/zmaudit.pl
|
||||
%{_bindir}/zmc
|
||||
%{_bindir}/zmcontrol.pl
|
||||
%{_bindir}/zmdc.pl
|
||||
%{_bindir}/zmf
|
||||
%{_bindir}/zmfilter.pl
|
||||
%{_bindir}/zmpkg.pl
|
||||
%{_bindir}/zmstreamer
|
||||
%{_bindir}/zmtrack.pl
|
||||
%{_bindir}/zmtrigger.pl
|
||||
%{_bindir}/zmu
|
||||
%{_bindir}/zmupdate.pl
|
||||
%{_bindir}/zmvideo.pl
|
||||
%{_bindir}/zmwatch.pl
|
||||
%{_bindir}/zmcamtool.pl
|
||||
%{_bindir}/zmsystemctl.pl
|
||||
%{!?_without_x10:%{_bindir}/zmx10.pl}
|
||||
|
||||
%{perl_vendorlib}/ZoneMinder*
|
||||
%{perl_vendorlib}/%{_arch}-linux-thread-multi/auto/ZoneMinder*
|
||||
#%{perl_archlib}/ZoneMinder*
|
||||
%{_mandir}/man*/*
|
||||
%dir %{_libexecdir}/zoneminder
|
||||
%{_libexecdir}/zoneminder/cgi-bin
|
||||
%dir %{_datadir}/zoneminder
|
||||
%{_datadir}/zoneminder/db
|
||||
%{_datadir}/zoneminder/www
|
||||
|
||||
%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy
|
||||
%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules
|
||||
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/events
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/images
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/sock
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/swap
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/temp
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/log/zoneminder
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/spool/zoneminder-upload
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /run/zoneminder
|
||||
|
||||
|
||||
%changelog
|
||||
* Sun Oct 5 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.28.0
|
||||
- Bump version for 1.28.0 release.
|
||||
|
||||
* Fri Mar 14 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.27
|
||||
- Tweak build requirements for cmake
|
||||
|
||||
* Sat Feb 01 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.27
|
||||
- Add zmcamtool.pl. Bump version for 1.27 release.
|
||||
|
||||
* Mon Dec 16 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.5
|
||||
- This is a bug fixe release
|
||||
- RTSP fixes, cmake enhancements, couple other misc fixes
|
||||
|
||||
* Mon Oct 07 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.4
|
||||
- Initial cmake build.
|
||||
|
||||
* Sat Oct 05 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.4
|
||||
- Fedora specific path changes have been moved to zoneminder-1.26.0-defaults.patch
|
||||
- All files are now part of the zoneminder source tree. Update specfile accordingly.
|
||||
|
||||
* Sat Sep 21 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.3
|
||||
- Initial rebuild for ZoneMinder 1.26.3 release.
|
||||
|
||||
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.0-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
* Mon Jan 21 2013 Adam Tkac <atkac redhat com> - 1.25.0-12
|
||||
- rebuild due to "jpeg8-ABI" feature drop
|
||||
|
||||
* Mon Jan 7 2013 Remi Collet <rcollet@redhat.com> - 1.25.0-11
|
||||
- fix configuration file for httpd 2.4, #871502
|
||||
|
||||
* Fri Dec 21 2012 Adam Tkac <atkac redhat com> - 1.25.0-10
|
||||
- rebuild against new libjpeg
|
||||
|
||||
* Thu Aug 09 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-9
|
||||
- Add patch to work around v4l2 api breakage in 3.5 kernel.
|
||||
|
||||
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.0-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
* Sat Jun 23 2012 Petr Pisar <ppisar@redhat.com> - 1.25.0-7
|
||||
- Perl 5.16 rebuild
|
||||
|
||||
* Wed Mar 21 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-6
|
||||
- Fix stupid thinko in sql modifications.
|
||||
|
||||
* Sat Feb 25 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-5
|
||||
- Clean up macro usage.
|
||||
|
||||
* Sat Feb 25 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-4
|
||||
- Convert to systemd.
|
||||
- Add tmpfiles.d configuration since the initscript isn't around to create
|
||||
/run/zoneminder.
|
||||
- Remove some pointless executable permissions.
|
||||
- Add logrotate file.
|
||||
|
||||
* Wed Feb 22 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-3
|
||||
- Update README.Fedora to reference systemctl and mention timezone info in
|
||||
php.ini.
|
||||
- Add proper default for EYEZM_LOG_TO_FILE.
|
||||
|
||||
|
||||
* Thu Feb 09 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-2
|
||||
- Rebuild for new pcre.
|
||||
|
||||
* Thu Jan 19 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-1
|
||||
- Update to 1.25.0
|
||||
- Fix gcc4.7 build problems.
|
||||
- Drop gcc4.4 build fixes; for whatever reason they now break the build.
|
||||
- Clean up old patches.
|
||||
- Force setting of ZM_TMPDIR and ZM_RUNDIR.
|
||||
|
||||
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.4-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
* Thu Sep 15 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-3
|
||||
- Re-add the dist-tag that somehow got lost.
|
||||
|
||||
* Thu Sep 15 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-2
|
||||
- Add patch for bug 711780 - fix syntax issue in Mapped.pm.
|
||||
- Undo that patch, and undo another which was the cause of the whole mess.
|
||||
- Fix up other patches so ZM_PATH_BUILD is both defined and useful.
|
||||
- Make sure database creation mods actually take.
|
||||
- Update Fedora-specific docs with some additional info.
|
||||
- Use bundled mootools (javascript, so no guideline violation).
|
||||
- Update download location.
|
||||
- Update the gcrypt patch to actually work.
|
||||
- Upstream changed the tarball without changing the version to patch a
|
||||
vulnerability, so redownload.
|
||||
|
||||
* Sun Aug 14 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-1
|
||||
- Initial attempt to upgrade to 1.24.4.
|
||||
- Add patch from BZ 460310 to build against libgcrypt instead of requiring the
|
||||
gnutls openssl libs.
|
||||
|
||||
* Thu Jul 21 2011 Petr Sabata <contyk@redhat.com> - 1.24.3-7.20110324svn3310
|
||||
- Perl mass rebuild
|
||||
|
||||
* Wed Jul 20 2011 Petr Sabata <contyk@redhat.com> - 1.24.3-6.20110324svn3310
|
||||
- Perl mass rebuild
|
||||
|
||||
* Mon May 09 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-5.20110324svn3310
|
||||
- Bump for gnutls update.
|
||||
|
||||
* Thu Mar 24 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-4.20110324svn3310
|
||||
- Update to latest 1.24.3 subversion. Turns out that what upstream was calling
|
||||
1.24.3 is really just an occasionally updated devel snapshot.
|
||||
- Rebase various patches.
|
||||
|
||||
* Wed Mar 23 2011 Dan Horák <dan@danny.cz> - 1.24.3-3
|
||||
- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
* Tue Jan 25 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-1
|
||||
- Update to latest upstream version.
|
||||
- Rebase patches.
|
||||
- Initial incomplete attempt to disable v4l1 support.
|
||||
|
||||
* Fri Jan 21 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-6
|
||||
- Unbundle cambozola; instead link to the separately pacakged copy.
|
||||
- Remove BuildRoot:, %%clean and buildroot cleaning in %%install.
|
||||
- Git rid of mixed space/tab usage by removing all tabs.
|
||||
- Remove unnecessary Conflicts: line.
|
||||
- Attempt to force short_open_tag on for the code directories.
|
||||
- Move default location of sockets, swaps, logfiles and some temporary files to
|
||||
make more sense and allow things to work better with a future selinux policy.
|
||||
- Fix errors in README.Fedora.
|
||||
|
||||
* Wed Jun 02 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.24.2-5
|
||||
- Mass rebuild with perl-5.12.0
|
||||
|
||||
* Fri Dec 4 2009 Stepan Kasal <skasal@redhat.com> - 1.24.2-4
|
||||
- rebuild against perl 5.10.1
|
||||
- use Perl vendorarch and archlib variables correctly
|
||||
|
||||
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||
|
||||
* Wed Jul 22 2009 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-2
|
||||
- Bump release since 1.24.2-1 was mistakenly tagged a few months ago.
|
||||
|
||||
* Wed Jul 22 2009 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-1
|
||||
- Initial update to 1.24.2.
|
||||
- Rebase patches.
|
||||
- Update mootools download location.
|
||||
- Update to mootools 1.2.3.
|
||||
- Add additional dependencies for some optional features.
|
||||
|
||||
* Sat Apr 11 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-3
|
||||
- Remove unused Sys::Mmap perl dependency RPM is finding
|
||||
|
||||
* Sat Apr 11 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-2
|
||||
- Update gcc44 patch to disable -frepo, seems to be broken with gcc44
|
||||
- Added noffmpeg patch to make building outside mock easier
|
||||
|
||||
* Sat Mar 21 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-1
|
||||
- Patch for gcc 4.4 compilation errors
|
||||
- Upgrade to 1.24.1
|
||||
|
||||
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.23.3-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
* Sat Jan 24 2009 Caolán McNamara <caolanm@redhat.com> - 1.23.3-3
|
||||
- rebuild for dependencies
|
||||
|
||||
* Mon Dec 15 2008 Martin Ebourne <martin@zepler.org> - 1.23.3-2
|
||||
- Fix permissions on zm.conf
|
||||
|
||||
* Fri Jul 11 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.23.3-1
|
||||
- Initial attempt at packaging 1.23.
|
||||
|
||||
* Tue Jul 1 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-15
|
||||
- Add perl module compat dependency, bz #453590
|
||||
|
||||
* Tue May 6 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-14
|
||||
- Remove default runlevel, bz #441315
|
||||
|
||||
* Mon Apr 28 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.22.3-13
|
||||
- Backport patch for CVE-2008-1381 from 1.23.3 to 1.22.3.
|
||||
|
||||
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.22.3-12
|
||||
- Autorebuild for GCC 4.3
|
||||
|
||||
* Thu Jan 3 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-11
|
||||
- Fix compilation on gcc 4.3
|
||||
|
||||
* Thu Dec 6 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-10
|
||||
- Rebuild for new openssl
|
||||
|
||||
* Thu Aug 2 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-8
|
||||
- Fix licence tag
|
||||
|
||||
* Thu Jul 12 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-7
|
||||
- Fixes from testing by Jitz including missing dependencies and database creation
|
||||
|
||||
* Sat Jun 30 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-6
|
||||
- Disable crashtrace on ppc
|
||||
|
||||
* Sat Jun 30 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-5
|
||||
- Fix uid for directories in /var/lib/zoneminder
|
||||
|
||||
* Tue Jun 26 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-4
|
||||
- Added perl Archive::Tar dependency
|
||||
- Disabled web interface due to lack of access control on the event images
|
||||
|
||||
* Sun Jun 10 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-3
|
||||
- Changes recommended in review by Jason Tibbitts
|
||||
|
||||
* Mon Apr 2 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-2
|
||||
- Standardised on package name of zoneminder
|
||||
|
||||
* Thu Dec 28 2006 Martin Ebourne <martin@zepler.org> - 1.22.3-1
|
||||
- First version. Uses some parts from zm-1.20.1 by Corey DeLasaux and Serg Oskin
|
|
@ -1,5 +1,6 @@
|
|||
[Unit]
|
||||
Description=Video security and surveillance system
|
||||
After=mysqld.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
d /run/zoneminder 0755 apache apache
|
|
@ -0,0 +1,51 @@
|
|||
# CMakeLists.txt for the OpenSuse Target Distro.
|
||||
# Amended Apr 02 2014 David Wilcox
|
||||
# Add named variables so that if destinations change it will be easier
|
||||
# temp directory was not being installed
|
||||
|
||||
SET(zmuid_final wwwrun)
|
||||
SET(zmgid_final www)
|
||||
SET(webroot /srv/www/htdocs)
|
||||
SET(zm_webdir ${webroot}/zoneminder)
|
||||
|
||||
# Download jscalendar & move files into position
|
||||
file(DOWNLOAD http://downloads.sourceforge.net/jscalendar/jscalendar-1.0.zip ${CMAKE_CURRENT_SOURCE_DIR}/jscalendar-1.0.zip STATUS download_jsc)
|
||||
if(download_jsc EQUAL 0)
|
||||
message(STATUS "Jscalander successfully downloaded. Installing...")
|
||||
execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/jscalendar.sh WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ERROR_VARIABLE unzip_jsc)
|
||||
message(STATUS "Status of jscalender script was: ${unzip_jsc}")
|
||||
else(download_jsc EQUAL 0)
|
||||
message(STATUS "Unable to download optional jscalander. Skipping...")
|
||||
endif(download_jsc EQUAL 0)
|
||||
|
||||
# Create several empty folders
|
||||
file(MAKE_DIRECTORY sock swap zoneminder zoneminder-upload events images temp)
|
||||
|
||||
# Install the empty folders
|
||||
#install(DIRECTORY run DESTINATION /var DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_WRITE GROUP_READ GROUP_EXECUTE WORLD_WRITE WORLD_READ WORLD_EXECUTE)
|
||||
#install(DIRECTORY sock swap DESTINATION /var/lib/zoneminder DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(DIRECTORY zoneminder DESTINATION /var/log DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(DIRECTORY zoneminder DESTINATION /var/run DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(DIRECTORY zoneminder-upload DESTINATION /var/spool DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(DIRECTORY zoneminder DESTINATION ${webroot} DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(DIRECTORY events images temp DESTINATION ${zm_webdir} DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
|
||||
# Create symlinks
|
||||
install(CODE "execute_process(COMMAND ln -sf ../../../../${zm_webdir}/events \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/events\")")
|
||||
install(CODE "execute_process(COMMAND ln -sf ../../../../${zm_webdir}/images \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/images\")")
|
||||
install(CODE "execute_process(COMMAND ln -sf ../../../../${zm_webdir}/temp \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/temp\")")
|
||||
|
||||
# Opensuse cambazola? requires cambozola as a separate package so just link to it
|
||||
#install(CODE "execute_process(COMMAND ln -sf ../../java/cambozola.jar \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/cambozola.jar\")")
|
||||
|
||||
# Install auxillary files required to run zoneminder on OpenSuse
|
||||
install(FILES zoneminder.conf DESTINATION /etc/apache2/conf.d PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
install(FILES zoneminder.logrotate DESTINATION /etc/logrotate.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
install(FILES zoneminder.tmpfiles DESTINATION /etc/tmpfiles.d RENAME zoneminder.conf PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(FILES redalert.wav DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/sounds PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(FILES zoneminder.service DESTINATION /usr/lib/systemd/system PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
|
||||
# Install jscalendar
|
||||
if(unzip_jsc STREQUAL "")
|
||||
install(DIRECTORY jscalendar-1.0/ DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/tools/jscalendar)
|
||||
endif(unzip_jsc STREQUAL "")
|
|
@ -0,0 +1,176 @@
|
|||
OpenSuse Notes
|
||||
===============
|
||||
|
||||
1. OpenSuse, along with other distros, now use systemd for task control.
|
||||
One of the capabilties of systemd is to use private space for /tmp to reduce
|
||||
the possibility of cross talk between applications. The default settings
|
||||
for zoneminder use /tmp for a number of files. When you start/stop
|
||||
zoneminder from a web page /tmp will be in private space but when the
|
||||
start/stop script zmpkg.pl is run from a shell it will be looking in the
|
||||
real /tmp. This can result in two instances of zoneminder running at
|
||||
the same time.
|
||||
|
||||
In order to remove this problem the OpenSuse rpm defaults the temporary
|
||||
directory to /var/run/zoneminder. For a new install this will not be a
|
||||
problem but if you use the rpm to upgrade you may have to make database
|
||||
changes.
|
||||
|
||||
Note: the location is held both within the database an explicitly within some
|
||||
scripts. It is therefore essential that the database conforms to the values
|
||||
used in the scripts. Please see information in the Upgrades section of this
|
||||
document.
|
||||
|
||||
2. OpenSuse prefers mariadb to mysql. mariadb is a direct replacement for mysql
|
||||
and all mysql functions work in the same way. These notes assumes that you
|
||||
are running mariadb.
|
||||
|
||||
3. It is necessary to add repositories to allow the zoneminder rpm to install.
|
||||
These can be added using commands (as root):
|
||||
zypper ar -f http://packman.inode.at/suse/openSUSE_13.1 packman
|
||||
zypper ar -f -n perl-modules http://download.opensuse.org/repositories/devel:/languages:/perl/openSUSE_13.1 perl-modules
|
||||
|
||||
The first time the repositories are accessed a prompt will be issued
|
||||
asking if the key is to be trusted. We suggest that you a(lways) trust
|
||||
this repository
|
||||
|
||||
4. There may be a prompt about the version of libavcodec.s0.55 and a change
|
||||
of vendor for libavutil52. In order to allow zoneminder to run correctly
|
||||
this solution change vendor should be accepted.
|
||||
|
||||
New installs
|
||||
============
|
||||
|
||||
1. Unless you are already using the MySQL server or you are running it
|
||||
remotely you will need to ensure that the server is installed and secured:
|
||||
|
||||
The rpm install should ensure that the database is installed. To ensure
|
||||
that it is running at boot time and secure for zoneminder run the
|
||||
following commands (as root):
|
||||
|
||||
systemctl enable mysql
|
||||
|
||||
systemctl start mysql.service
|
||||
|
||||
mysql_secure_installation
|
||||
|
||||
IMPORTANT: mariadb defaults to strict mode of operation which will cause
|
||||
some zoneminder database writes to fail. In order to turn this off -
|
||||
which will be for the whole database - you will need to edit
|
||||
/etc/my.cnf and comment out the record
|
||||
|
||||
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES and restart the
|
||||
server
|
||||
|
||||
2. Using the password for the root account set during the previous step, you
|
||||
will need to create the ZoneMinder database, assuming your database server
|
||||
is local:
|
||||
|
||||
mysql -uroot -p < /opt/zoneminder/share/zoneminder/db/zm_create.sql
|
||||
mysqladmin -uroot -p reload
|
||||
|
||||
3. The database needs a user. One is not created by default because this would
|
||||
introduce an obvious security issue. The following should set this up:
|
||||
|
||||
mysqladmin -uroot -p reload
|
||||
grant select,insert,update,delete,alter on zm.* to
|
||||
'zmuser'@localhost identified by 'zmpass';
|
||||
|
||||
Obviously, change at least zmpass to an actual, secure password or
|
||||
passphrase. You can change zmuser as well if you like.
|
||||
|
||||
4. Edit /etc/zm.conf and, at the bottom, change ZM_DB_PASS and perhaps
|
||||
ZM_DB_USER to match.
|
||||
|
||||
5. Edit /etc/php5/apache2/php.ini, uncomment the date.timezone line, and add
|
||||
your local timezone. For whatever reason, PHP will complain loudly if
|
||||
this is not set, or if it is set incorrectly, and these complaints will
|
||||
show up in the zoneminder logging system as errors.
|
||||
|
||||
If you are not sure of the proper timezone specification to use, look at
|
||||
http://php.net/manual/en/timezones.php
|
||||
|
||||
6. This package probably does not work with SELinux enabled at the moment. It
|
||||
may be necessary to disable SELinux for httpd, or even completely for
|
||||
ZoneMinder to function. This will be addressed in a later release. Run
|
||||
|
||||
setenforce 0
|
||||
|
||||
for testing, and edit /etc/sysconfig/selinux to disable it at boot time.
|
||||
|
||||
7. Now start the web server (as root):
|
||||
|
||||
systemctl enable apache2.service
|
||||
systemctl start apache2.service
|
||||
|
||||
9. You should immediately visit http://localhost/zm and secure the system if
|
||||
it is network facing. To do this:
|
||||
|
||||
a) click Options, then System.
|
||||
b) check OPT_USE_AUTH.
|
||||
c) set AUTH_HASH_SECRET to a random string.
|
||||
d) click Save and refresh the main browser window.
|
||||
e) You should be prompted to log in;
|
||||
the default username/password is admin/admin.
|
||||
f) Open Options again, choose the newly visible Users tab.
|
||||
g) click the admin user and set a password.
|
||||
h) enable OPT_CONTROL on the Ssytem tab to enable ptz camera control.
|
||||
|
||||
10. You should be able to start zoneminder by issuing the commands (as root):
|
||||
|
||||
systemctl enable zoneminder
|
||||
systemctl start zoneminder
|
||||
|
||||
|
||||
Upgrades
|
||||
========
|
||||
|
||||
1. Update /etc/zm.conf. Check for any new settings and update the version
|
||||
information. Comparing /etc/zm.conf and /etc/zm.conf.rpmnew should help to
|
||||
do this.
|
||||
|
||||
2. Add the mysql ALTER permission to the zmuser account:
|
||||
|
||||
mysql -u root -p
|
||||
use zm
|
||||
grant alter, lock tables on zm.* to 'zmuser'@localhost;
|
||||
|
||||
Since this is an upgrade, the assumption is that the zmuser account already
|
||||
has select, insert, update, and delete permission.
|
||||
|
||||
3. You will need to upgrade the ZoneMinder database as described in the
|
||||
manual. Only if the previous step was succesful, may you run zmupdate like
|
||||
so (as root):
|
||||
|
||||
/opt/zoneminder/bin/zmupdate.pl
|
||||
|
||||
|
||||
4. As mentioned in the OpenSuse notes you may need to change database values.
|
||||
These steps may be run at any time (as root):
|
||||
|
||||
stop the current instance of zoneminder - systemctl stop zoneminder
|
||||
|
||||
ensure that all zoneminder processes have terminated:
|
||||
|
||||
ps -ef|grep zm
|
||||
if you find any process still running issue a kill -9 for each
|
||||
|
||||
mysql -u root
|
||||
use zm
|
||||
update Config set DefaultValue = '/var/run/zoneminder'
|
||||
where name = 'ZM_PATH_LOGS';
|
||||
update Config set Value = '/var/run/zoneminder'
|
||||
where name = 'ZM_PATH_LOGS';
|
||||
update Config set DefaultValue = '/var/run/zoneminder'
|
||||
where name = 'ZM_PATH_SOCKS';
|
||||
update Config set Value = '/var/run/zoneminder'
|
||||
where name = 'ZM_PATH_SOCKS';
|
||||
update Config set DefaultValue = '/var/run/zoneminder'
|
||||
where name = 'ZM_PATH_LOGS';
|
||||
update Config set Value = '/var/run/zoneminder'
|
||||
where name = 'ZM_PATH_SWAP';
|
||||
commit;
|
||||
exit
|
||||
|
||||
|
||||
You can then restart zoneminder - systemctl start zoneminder
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
unzip -o jscalendar-1.0.zip
|
||||
mkdir -v jscalendar-doc
|
||||
cd jscalendar-1.0
|
||||
mv -v *html *php doc/* README ../jscalendar-doc
|
||||
rmdir -v doc
|
|
@ -0,0 +1 @@
|
|||
../redhat/redalert.wav
|
|
@ -0,0 +1,49 @@
|
|||
--- CMakeLists.txt.orig 2014-03-06 20:29:40.041817163 +0000
|
||||
+++ CMakeLists.txt 2014-03-10 16:03:05.169663558 +0000
|
||||
@@ -65,7 +65,23 @@
|
||||
set(ZM_NO_X10 "OFF" CACHE BOOL "Set to ON to build ZoneMinder without X10 support. default: OFF")
|
||||
set(ZM_PERL_SUBPREFIX "${CMAKE_INSTALL_LIBDIR}/perl5" CACHE PATH "Use a different directory for the zm perl modules. NOTE: This is a subprefix, e.g. lib will be turned into <prefix>/lib, default: <libdir>/perl5")
|
||||
set(ZM_PERL_USE_PATH "${CMAKE_INSTALL_PREFIX}/${ZM_PERL_SUBPREFIX}" CACHE PATH "Override the include path for zm perl modules. Useful if you are moving the perl modules without using the ZM_PERL_SUBPREFIX option. default: <prefix>/<zmperlsubprefix>")
|
||||
-set(ZM_TARGET_DISTRO "" CACHE STRING "Build ZoneMinder for a specific distribution. Currently, valid names are: f19, el6")
|
||||
+set(ZM_TARGET_DISTRO "" CACHE STRING "Build ZoneMinder for a specific distribution. Currently, valid names are: f19, el6, OS13")
|
||||
+
|
||||
+# Reassign some variables if a target distro has been specified
|
||||
+if((ZM_TARGET_DISTRO STREQUAL "f19") OR (ZM_TARGET_DISTRO STREQUAL "el6"))
|
||||
+ set(ZM_RUNDIR "/var/run/zoneminder")
|
||||
+ set(ZM_TMPDIR "/var/lib/zoneminder/temp")
|
||||
+ set(ZM_LOGDIR "/var/log/zoneminder")
|
||||
+elseif(ZM_TARGET_DISTRO STREQUAL "OS13")
|
||||
+ set(ZM_RUNDIR "/var/run/zoneminder")
|
||||
+ set(ZM_TMPDIR "/var/run/zoneminder")
|
||||
+ set(ZM_CONTENTDIR "/var/run/zoneminder")
|
||||
+ set(ZM_LOGDIR "/var/log/zoneminder")
|
||||
+ set(ZM_WEB_USER "wwwrun")
|
||||
+ set(ZM_WEB_GROUP "www")
|
||||
+ set(ZM_WEBDIR "/srv/www/htdocs/zoneminder")
|
||||
+ set(ZM_CGIDIR "/srv/www/cgi-bin")
|
||||
+endif((ZM_TARGET_DISTRO STREQUAL "f19") OR (ZM_TARGET_DISTRO STREQUAL "el6"))
|
||||
|
||||
# Required for certain checks to work
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} stdio.h stdlib.h math.h signal.h)
|
||||
@@ -437,12 +453,6 @@
|
||||
set(ZM_DB_TYPE "mysql")
|
||||
set(EXTRA_PERL_LIB "use lib '${ZM_PERL_USE_PATH}';")
|
||||
|
||||
-# Reassign some variables if a target distro has been specified
|
||||
-if((ZM_TARGET_DISTRO STREQUAL "f19") OR (ZM_TARGET_DISTRO STREQUAL "el6"))
|
||||
- set(ZM_RUNDIR "/var/run/zoneminder")
|
||||
- set(ZM_TMPDIR "/var/lib/zoneminder/temp")
|
||||
- set(ZM_LOGDIR "/var/log/zoneminder")
|
||||
-endif((ZM_TARGET_DISTRO STREQUAL "f19") OR (ZM_TARGET_DISTRO STREQUAL "el6"))
|
||||
|
||||
# Generate files from the .in files
|
||||
configure_file(zm.conf.in "${CMAKE_CURRENT_BINARY_DIR}/zm.conf" @ONLY)
|
||||
@@ -461,6 +471,8 @@
|
||||
add_subdirectory(distros/fedora)
|
||||
elseif(ZM_TARGET_DISTRO STREQUAL "el6")
|
||||
add_subdirectory(distros/redhat)
|
||||
+elseif(ZM_TARGET_DISTRO STREQUAL "OS13")
|
||||
+ add_subdirectory(distros/opensuse)
|
||||
else(ZM_TARGET_DISTRO STREQUAL "el6")
|
||||
add_subdirectory(misc)
|
||||
endif(ZM_TARGET_DISTRO STREQUAL "f19")
|
|
@ -0,0 +1,392 @@
|
|||
%define zmuid $(id -un)
|
||||
%define zmgid $(id -gn)
|
||||
%define zmuid_final wwwrun
|
||||
%define zmgid_final www
|
||||
# definitions for OpenSuse
|
||||
%define zm_tmpdir /var/run/zoneminder
|
||||
%define zm_instdir /opt/zoneminder
|
||||
%define zm_rundir %{zm_instdir}/bin
|
||||
# OpenSuse seems to have its web services in a different
|
||||
# directory structure to some other distros
|
||||
%define webroot /srv/www/htdocs
|
||||
%define webcgi /srv/www/cgi-bin
|
||||
|
||||
Name: zoneminder
|
||||
Version: 1.27.0
|
||||
Release: 1%{?dist}
|
||||
Summary: A camera monitoring and analysis tool
|
||||
Group: System Environment/Daemons
|
||||
# jscalendar is LGPL (any version): http://www.dynarch.com/projects/calendar/
|
||||
# Mootools is under the MIT license: http://mootools.net/
|
||||
License: GPLv2+ and LGPLv2+ and MIT
|
||||
URL: http://www.zoneminder.com/
|
||||
|
||||
Source: ZoneMinder-%{version}.tar.gz
|
||||
|
||||
# patch no longer necessary as OpenSuse now in standard build
|
||||
# Patch1: zoneminder-1.26.5-opensuse.patch
|
||||
|
||||
BuildRequires: cmake polkit-devel
|
||||
BuildRequires: perl-DBI perl-DBD-mysql perl-Date-Manip perl-Sys-Mmap
|
||||
BuildRequires: libjpeg62 libjpeg62-devel libmysqld-devel libSDL-devel libgcrypt-devel libgnutls-devel
|
||||
BuildRequires: libffmpeg-devel x264
|
||||
BuildRequires: pcre-devel w32codec-all
|
||||
|
||||
Requires: apache2 apache2-mod_php5 mysql polkit
|
||||
Requires: ffmpeg libavformat55
|
||||
Requires: php php-mysql
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
Requires: perl-Sys-Mmap perl-Date-Manip perl-DBD-mysql
|
||||
Requires: perl-Archive-Tar perl-Archive-Zip
|
||||
Requires: perl-MIME-Lite perl-LWP-Protocol-https
|
||||
|
||||
# Can't find suitable packages for OpenSuse for
|
||||
# perl-MIME-Entity perl-Net-SMTP perl-Net-FTP so installing using cpanm
|
||||
# cpanm needs make
|
||||
# Am installing perl(MIME::Tools), perl(Net::SMTP) and perl(Net::FTP)
|
||||
# MIME::Tools provides MIME::Entity
|
||||
|
||||
Requires(post): make cpanm
|
||||
|
||||
Requires(post): /usr/bin/gpasswd
|
||||
|
||||
%description
|
||||
ZoneMinder is a set of applications which is intended to provide a complete
|
||||
solution allowing you to capture, analyse, record and monitor any cameras you
|
||||
have attached to a Linux based machine. It is designed to run on kernels which
|
||||
support the Video For Linux (V4L) interface and has been tested with cameras
|
||||
attached to BTTV cards, various USB cameras and IP network cameras. It is
|
||||
designed to support as many cameras as you can attach to your computer without
|
||||
too much degradation of performance.
|
||||
|
||||
%prep
|
||||
%setup -q -n ZoneMinder-%{version}
|
||||
# cp and patch no longer necessary as opensuse distro now in standard build from 1.27.0 on
|
||||
# cp -R /home/makerpm/rpmbuild/SOURCES/opensuse distros
|
||||
# %patch1 -p0 -b .opensuse
|
||||
|
||||
%build
|
||||
# For OpenSuse 13.1 we need to set DENABLE_MMAP to yes to vercome a problem
|
||||
# where the perl modules don't have shared memory enabled
|
||||
%cmake \
|
||||
-DCMAKE_INSTALL_PREFIX=%{zm_instdir} \
|
||||
-DZM_TARGET_DISTRO="OS13" \
|
||||
-DZM_NO_X10=ON \
|
||||
-DENABLE_MMAP=yes
|
||||
|
||||
make
|
||||
# There doesn't seem to be any point in using the next make as the
|
||||
# makefiles for cmake don't seem to support multiple streams
|
||||
#make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
export DESTDIR=%{buildroot}
|
||||
# don't understand why but the built system appears in build under BUILDROOT
|
||||
cd build
|
||||
make install prefix=\${RPM_BUILD_ROOT}
|
||||
cd ..
|
||||
|
||||
%post
|
||||
if [ $1 -eq 1 ] ; then
|
||||
# Initial installation
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
# Allow zoneminder access to local video sources
|
||||
/usr/bin/gpasswd -a %zmuid_final video
|
||||
|
||||
|
||||
# Display the README for post installation instructions
|
||||
#/usr/bin/less %{_docdir}/%{name}-%{version}/README.OpenSuse
|
||||
# both less and more scroll straight off the end of the file
|
||||
# so we'll output info with echo
|
||||
|
||||
echo Installing additional perl modules
|
||||
/usr/bin/cpanm MIME::Tools
|
||||
/usr/bin/cpanm Net::SMTP
|
||||
/usr/bin/cpanm Net::FTP
|
||||
echo \***********************************************
|
||||
echo \***** For further information
|
||||
echo \***** please refer to
|
||||
echo \***** %{_docdir}/%{name}/README.OpenSuse
|
||||
echo \*****
|
||||
echo \***********************************************
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
# Package removal, not upgrade
|
||||
/bin/systemctl --no-reload disable zoneminder.service > /dev/null 2>&1 || :
|
||||
/bin/systemctl stop zoneminder.service > /dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%postun
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
if [ $1 -ge 1 ] ; then
|
||||
# Package upgrade, not uninstall
|
||||
/bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
# Next section removed for OpenSuse as the install starts
|
||||
# at 1.26.5 for this rpm
|
||||
# %triggerun -- zoneminder < 1.25.0-4
|
||||
# Save the current service runlevel info
|
||||
# User must manually run systemd-sysv-convert --apply zoneminder
|
||||
# to migrate them to systemd targets
|
||||
# /usr/bin/systemd-sysv-convert --save zoneminder >/dev/null 2>&1 ||:
|
||||
|
||||
# Run these because the SysV package being removed won't do them
|
||||
# /sbin/chkconfig --del zoneminder >/dev/null 2>&1 || :
|
||||
# /bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || :
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS COPYING README.md distros/opensuse/README.OpenSuse distros/opensuse/jscalendar-doc
|
||||
%docdir /opt/zoneminder/share/man
|
||||
%config %attr(640,root,%{zmgid_final}) /etc/zm.conf
|
||||
%config(noreplace) %attr(644,root,root) /etc/apache2/conf.d/zoneminder.conf
|
||||
%config(noreplace) %attr(644,root,root) /etc/tmpfiles.d/zoneminder.conf
|
||||
%config(noreplace) %attr(644,root,root) /etc/logrotate.d/zoneminder
|
||||
|
||||
%{_unitdir}/zoneminder.service
|
||||
|
||||
# zmfix removed from zoneminder 1.26.6
|
||||
# %attr(4755,root,root) %{zm_rundir}/zmfix
|
||||
|
||||
|
||||
%{zm_instdir}
|
||||
%{webcgi}/nph-zms
|
||||
%{webcgi}/zms
|
||||
%{webroot}/zoneminder
|
||||
|
||||
%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy
|
||||
%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules
|
||||
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{webroot}/zoneminder/events
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{webroot}/zoneminder/images
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{webroot}/zoneminder/temp
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{webcgi}
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{zm_tmpdir}
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/log/zoneminder
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/spool/zoneminder-upload
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Apr 02 2014 David Wilcox <david.wilcox@cloverbeen.com> - 1.27.0
|
||||
- Correct requires for cpanm and make as they should be post
|
||||
- change cpanm call to be full path name
|
||||
- correct permissions on events, images and temp
|
||||
|
||||
* Mon Mar 24 2014 David Wilcox <david.wilcox@cloverbeen.com> - 1.27.0
|
||||
- Update to zm 1.27.0
|
||||
- Remove patch which brought opensuse into distros as it is now included
|
||||
|
||||
* Tue Mar 18 2014 David Wilcox <david.wilcox@cloverbeen.com> - 1.26.5
|
||||
- Latest update for Opensuse 13.1 - work is still in progress
|
||||
|
||||
* Thu Feb 06 2014 David Wilcox <david.wilcox@cloverbeen.com> - 1.26.5
|
||||
- Initial build for OpenSuse 13.1 - based on Fedora 19 build
|
||||
|
||||
* Mon Oct 07 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.4
|
||||
- Initial cmake build.
|
||||
|
||||
* Sat Oct 05 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.4
|
||||
- Fedora specific path changes have been moved to zoneminder-1.26.0-defaults.patch
|
||||
- All files are now part of the zoneminder source tree. Update specfile accordingly.
|
||||
|
||||
* Sat Sep 21 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.3
|
||||
- Initial rebuild for ZoneMinder 1.26.3 release.
|
||||
|
||||
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.0-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
* Mon Jan 21 2013 Adam Tkac <atkac redhat com> - 1.25.0-12
|
||||
- rebuild due to "jpeg8-ABI" feature drop
|
||||
|
||||
* Mon Jan 7 2013 Remi Collet <rcollet@redhat.com> - 1.25.0-11
|
||||
- fix configuration file for httpd 2.4, #871502
|
||||
|
||||
* Fri Dec 21 2012 Adam Tkac <atkac redhat com> - 1.25.0-10
|
||||
- rebuild against new libjpeg
|
||||
|
||||
* Thu Aug 09 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-9
|
||||
- Add patch to work around v4l2 api breakage in 3.5 kernel.
|
||||
|
||||
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.0-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
* Sat Jun 23 2012 Petr Pisar <ppisar@redhat.com> - 1.25.0-7
|
||||
- Perl 5.16 rebuild
|
||||
|
||||
* Wed Mar 21 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-6
|
||||
- Fix stupid thinko in sql modifications.
|
||||
|
||||
* Sat Feb 25 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-5
|
||||
- Clean up macro usage.
|
||||
|
||||
* Sat Feb 25 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-4
|
||||
- Convert to systemd.
|
||||
- Add tmpfiles.d configuration since the initscript isn't around to create
|
||||
/run/zoneminder.
|
||||
- Remove some pointless executable permissions.
|
||||
- Add logrotate file.
|
||||
|
||||
* Wed Feb 22 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-3
|
||||
- Update README.Fedora to reference systemctl and mention timezone info in
|
||||
php.ini.
|
||||
- Add proper default for EYEZM_LOG_TO_FILE.
|
||||
|
||||
|
||||
* Thu Feb 09 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-2
|
||||
- Rebuild for new pcre.
|
||||
|
||||
* Thu Jan 19 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-1
|
||||
- Update to 1.25.0
|
||||
- Fix gcc4.7 build problems.
|
||||
- Drop gcc4.4 build fixes; for whatever reason they now break the build.
|
||||
- Clean up old patches.
|
||||
- Force setting of ZM_TMPDIR and ZM_RUNDIR.
|
||||
|
||||
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.4-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
* Thu Sep 15 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-3
|
||||
- Re-add the dist-tag that somehow got lost.
|
||||
|
||||
* Thu Sep 15 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-2
|
||||
- Add patch for bug 711780 - fix syntax issue in Mapped.pm.
|
||||
- Undo that patch, and undo another which was the cause of the whole mess.
|
||||
- Fix up other patches so ZM_PATH_BUILD is both defined and useful.
|
||||
- Make sure database creation mods actually take.
|
||||
- Update Fedora-specific docs with some additional info.
|
||||
- Use bundled mootools (javascript, so no guideline violation).
|
||||
- Update download location.
|
||||
- Update the gcrypt patch to actually work.
|
||||
- Upstream changed the tarball without changing the version to patch a
|
||||
vulnerability, so redownload.
|
||||
|
||||
* Sun Aug 14 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-1
|
||||
- Initial attempt to upgrade to 1.24.4.
|
||||
- Add patch from BZ 460310 to build against libgcrypt instead of requiring the
|
||||
gnutls openssl libs.
|
||||
|
||||
* Thu Jul 21 2011 Petr Sabata <contyk@redhat.com> - 1.24.3-7.20110324svn3310
|
||||
- Perl mass rebuild
|
||||
|
||||
* Wed Jul 20 2011 Petr Sabata <contyk@redhat.com> - 1.24.3-6.20110324svn3310
|
||||
- Perl mass rebuild
|
||||
|
||||
* Mon May 09 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-5.20110324svn3310
|
||||
- Bump for gnutls update.
|
||||
|
||||
* Thu Mar 24 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-4.20110324svn3310
|
||||
- Update to latest 1.24.3 subversion. Turns out that what upstream was calling
|
||||
1.24.3 is really just an occasionally updated devel snapshot.
|
||||
- Rebase various patches.
|
||||
|
||||
* Wed Mar 23 2011 Dan Horák <dan@danny.cz> - 1.24.3-3
|
||||
- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
* Tue Jan 25 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-1
|
||||
- Update to latest upstream version.
|
||||
- Rebase patches.
|
||||
- Initial incomplete attempt to disable v4l1 support.
|
||||
|
||||
* Fri Jan 21 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-6
|
||||
- Unbundle cambozola; instead link to the separately pacakged copy.
|
||||
- Remove BuildRoot:, %%clean and buildroot cleaning in %%install.
|
||||
- Git rid of mixed space/tab usage by removing all tabs.
|
||||
- Remove unnecessary Conflicts: line.
|
||||
- Attempt to force short_open_tag on for the code directories.
|
||||
- Move default location of sockets, swaps, logfiles and some temporary files to
|
||||
make more sense and allow things to work better with a future selinux policy.
|
||||
- Fix errors in README.Fedora.
|
||||
|
||||
* Wed Jun 02 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.24.2-5
|
||||
- Mass rebuild with perl-5.12.0
|
||||
|
||||
* Fri Dec 4 2009 Stepan Kasal <skasal@redhat.com> - 1.24.2-4
|
||||
- rebuild against perl 5.10.1
|
||||
- use Perl vendorarch and archlib variables correctly
|
||||
|
||||
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||
|
||||
* Wed Jul 22 2009 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-2
|
||||
- Bump release since 1.24.2-1 was mistakenly tagged a few months ago.
|
||||
|
||||
* Wed Jul 22 2009 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-1
|
||||
- Initial update to 1.24.2.
|
||||
- Rebase patches.
|
||||
- Update mootools download location.
|
||||
- Update to mootools 1.2.3.
|
||||
- Add additional dependencies for some optional features.
|
||||
|
||||
* Sat Apr 11 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-3
|
||||
- Remove unused Sys::Mmap perl dependency RPM is finding
|
||||
|
||||
* Sat Apr 11 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-2
|
||||
- Update gcc44 patch to disable -frepo, seems to be broken with gcc44
|
||||
- Added noffmpeg patch to make building outside mock easier
|
||||
|
||||
* Sat Mar 21 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-1
|
||||
- Patch for gcc 4.4 compilation errors
|
||||
- Upgrade to 1.24.1
|
||||
|
||||
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.23.3-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
* Sat Jan 24 2009 Caolán McNamara <caolanm@redhat.com> - 1.23.3-3
|
||||
- rebuild for dependencies
|
||||
|
||||
* Mon Dec 15 2008 Martin Ebourne <martin@zepler.org> - 1.23.3-2
|
||||
- Fix permissions on zm.conf
|
||||
|
||||
* Fri Jul 11 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.23.3-1
|
||||
- Initial attempt at packaging 1.23.
|
||||
|
||||
* Tue Jul 1 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-15
|
||||
- Add perl module compat dependency, bz #453590
|
||||
|
||||
* Tue May 6 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-14
|
||||
- Remove default runlevel, bz #441315
|
||||
|
||||
* Mon Apr 28 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.22.3-13
|
||||
- Backport patch for CVE-2008-1381 from 1.23.3 to 1.22.3.
|
||||
|
||||
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.22.3-12
|
||||
- Autorebuild for GCC 4.3
|
||||
|
||||
* Thu Jan 3 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-11
|
||||
- Fix compilation on gcc 4.3
|
||||
|
||||
* Thu Dec 6 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-10
|
||||
- Rebuild for new openssl
|
||||
|
||||
* Thu Aug 2 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-8
|
||||
- Fix licence tag
|
||||
|
||||
* Thu Jul 12 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-7
|
||||
- Fixes from testing by Jitz including missing dependencies and database creation
|
||||
|
||||
* Sat Jun 30 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-6
|
||||
- Disable crashtrace on ppc
|
||||
|
||||
* Sat Jun 30 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-5
|
||||
- Fix uid for directories in /var/lib/zoneminder
|
||||
|
||||
* Tue Jun 26 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-4
|
||||
- Added perl Archive::Tar dependency
|
||||
- Disabled web interface due to lack of access control on the event images
|
||||
|
||||
* Sun Jun 10 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-3
|
||||
- Changes recommended in review by Jason Tibbitts
|
||||
|
||||
* Mon Apr 2 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-2
|
||||
- Standardised on package name of zoneminder
|
||||
|
||||
* Thu Dec 28 2006 Martin Ebourne <martin@zepler.org> - 1.22.3-1
|
||||
- First version. Uses some parts from zm-1.20.1 by Corey DeLasaux and Serg Oskin
|
|
@ -0,0 +1,45 @@
|
|||
# The Zoneminder web interface has been disabled by default due to a small
|
||||
# security issue in the default install.
|
||||
#
|
||||
# When using Zoneminder's own authentication, recorded CCTV images are
|
||||
# accessible from the web directly without passing the authentication. This
|
||||
# means any attacker could see your CCTV images without a password. In order
|
||||
# to avoid this you can disable Zoneminder's authentication and configure
|
||||
# standard Apache authentication (see the Apache documentation for details on
|
||||
# this).
|
||||
#
|
||||
# If you still wish to use Zoneminder's own authentication, or have an
|
||||
# internal site which needs no authentication, you need to delete the line
|
||||
# marked below and restart Apache.
|
||||
|
||||
Alias /zm "/srv/www/htdocs/zoneminder"
|
||||
<Directory "srv/www/htdocs/zoneminder">
|
||||
Options -Indexes +MultiViews +FollowSymLinks
|
||||
AllowOverride All
|
||||
<IfModule mod_authz_core.c>
|
||||
# Apache 2.4
|
||||
Require all granted
|
||||
</IfModule>
|
||||
<IfModule !mod_authz_core.c>
|
||||
# Apache 2.2
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</IfModule>
|
||||
# The code unfortunately uses short tags in many places
|
||||
php_value short_open_tag 1
|
||||
</Directory>
|
||||
|
||||
ScriptAlias /cgi-bin/zm "/srv/www/cgi-bin"
|
||||
<Directory "/srv/www/cgi-bin">
|
||||
AllowOverride All
|
||||
Options ExecCGI
|
||||
<IfModule mod_authz_core.c>
|
||||
# Apache 2.4
|
||||
Require all granted
|
||||
</IfModule>
|
||||
<IfModule !mod_authz_core.c>
|
||||
# Apache 2.2
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</IfModule>
|
||||
</Directory>
|
|
@ -0,0 +1,8 @@
|
|||
/var/log/zoneminder/*.log {
|
||||
missingok
|
||||
notifempty
|
||||
sharedscripts
|
||||
postrotate
|
||||
/opt/zoneminder/bin/zmpkg.pl logrot 2> /dev/null > /dev/null || :
|
||||
endscript
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
[Unit]
|
||||
Description=Video security and surveillance system
|
||||
After=mysqld.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/opt/zoneminder/bin/zmpkg.pl start
|
||||
ExecStop=/opt/zoneminder/bin/zmpkg.pl stop
|
||||
ExecReload=/opt/zoneminder/bin/zmpkg.pl reload
|
||||
PIDFile=/var/run/zoneminder/zm.pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1 @@
|
|||
d /var/run/zoneminder 0755 wwwrun www
|
|
@ -0,0 +1,57 @@
|
|||
# CMakeLists.txt for the Redhat/CentOS Target Distro.
|
||||
|
||||
# Create the zoneminder service file
|
||||
configure_file(zoneminder.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.service @ONLY)
|
||||
|
||||
# Download jscalendar & move files into position
|
||||
file(DOWNLOAD http://softlayer-dal.dl.sourceforge.net/project/jscalendar/jscalendar/1.0/jscalendar-1.0.zip ${CMAKE_CURRENT_SOURCE_DIR}/jscalendar-1.0.zip LOG jsc_log STATUS download_jsc)
|
||||
#message(STATUS "Log of jscalender script was: ${jsc_log}")
|
||||
if(download_jsc EQUAL 0)
|
||||
message(STATUS "Jscalander successfully downloaded. Installing...")
|
||||
execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/jscalendar.sh WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ERROR_VARIABLE unzip_jsc)
|
||||
message(STATUS "Status of jscalender script was: ${unzip_jsc}")
|
||||
else(download_jsc EQUAL 0)
|
||||
message(STATUS "Unable to download optional jscalander. Skipping...")
|
||||
endif(download_jsc EQUAL 0)
|
||||
|
||||
# Download cambozola & move files into position
|
||||
file(DOWNLOAD http://www.andywilcock.com/code/cambozola/cambozola-0.931.tar.gz ${CMAKE_CURRENT_SOURCE_DIR}/cambozola-0.931.tar.gz STATUS download_camb)
|
||||
if(download_camb EQUAL 0)
|
||||
message(STATUS "Cambozola successfully downloaded. Installing...")
|
||||
execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/cambozola.sh WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ERROR_VARIABLE untar_camb)
|
||||
message(STATUS "Status of cambozola script was: ${untar_camb}")
|
||||
else(download_camb EQUAL 0)
|
||||
message(STATUS "Unable to download optional Cambozola. Skipping...")
|
||||
endif(download_camb EQUAL 0)
|
||||
|
||||
# Create several empty folders
|
||||
file(MAKE_DIRECTORY sock swap zoneminder zoneminder-upload events images temp)
|
||||
|
||||
# Install the empty folders
|
||||
#install(DIRECTORY run DESTINATION /var DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_WRITE GROUP_READ GROUP_EXECUTE WORLD_WRITE WORLD_READ WORLD_EXECUTE)
|
||||
install(DIRECTORY sock swap DESTINATION /var/lib/zoneminder DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(DIRECTORY zoneminder DESTINATION /var/log DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(DIRECTORY zoneminder DESTINATION /run DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(DIRECTORY zoneminder-upload DESTINATION /var/spool DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(DIRECTORY events images temp DESTINATION /var/lib/zoneminder DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
|
||||
# Create symlinks
|
||||
install(CODE "execute_process(COMMAND ln -sf ../../../../var/lib/zoneminder/events \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/events\")")
|
||||
install(CODE "execute_process(COMMAND ln -sf ../../../../var/lib/zoneminder/images \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/images\")")
|
||||
install(CODE "execute_process(COMMAND ln -sf ../../../../var/lib/zoneminder/temp \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/temp\")")
|
||||
|
||||
# Install auxillary files required to run zoneminder on CentOS
|
||||
install(FILES zoneminder.conf DESTINATION /etc/httpd/conf.d PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
install(FILES zm-logrotate_d DESTINATION /etc/logrotate.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
install(FILES redalert.wav DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/sounds PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(FILES zoneminder.service DESTINATION /etc/rc.d/init.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
|
||||
# Install jscalendar
|
||||
if(unzip_jsc STREQUAL "")
|
||||
install(DIRECTORY jscalendar-1.0/ DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/tools/jscalendar)
|
||||
endif(unzip_jsc STREQUAL "")
|
||||
|
||||
# Install cambozola
|
||||
if(untar_camb STREQUAL "")
|
||||
install(FILES cambozola-0.931/dist/cambozola.jar DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www)
|
||||
endif(untar_camb STREQUAL "")
|
|
@ -15,16 +15,20 @@
|
|||
|
||||
mysql -uroot -p
|
||||
mysql> create database zm;
|
||||
mysql> grant select,insert,update,delete,alter on zm.* to
|
||||
mysql> grant select,insert,update,delete,lock tables,alter on zm.* to
|
||||
'zmuser'@localhost identified by 'zmpass';
|
||||
mysql> exit;
|
||||
mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
|
||||
mysqladmin -uroot -p reload
|
||||
|
||||
3. IMPORTANT: Edit /etc/php.ini and put in the appropriate timezone for
|
||||
3. If you have chosen to change the zoneminder mysql credentials to something
|
||||
other than zmuser/zmpass then you must now edit /etc/zm.conf. Change
|
||||
ZM_DB_USER and ZM_DB_PASS to the values you created in step 2.
|
||||
|
||||
4. IMPORTANT: Edit /etc/php.ini and put in the appropriate timezone for
|
||||
date.timezone!
|
||||
|
||||
4. The ZoneMinder web interface is disabled by default, you will need
|
||||
5. The ZoneMinder web interface is disabled by default, you will need
|
||||
to edit this file to enable it:
|
||||
|
||||
/etc/httpd/conf.d/zoneminder.conf
|
||||
|
@ -32,16 +36,27 @@
|
|||
HINT: Most users will want to simply delete the line that says
|
||||
"Deny from all".
|
||||
|
||||
5. Configure the web server to start automatically:
|
||||
6. Configure the web server to start automatically:
|
||||
|
||||
sudo chkconfig httpd on
|
||||
sudo service httpd start
|
||||
|
||||
6. This package has automatically configured and installed an SELinux policy
|
||||
7. This package will automatically configure and install an SELinux policy
|
||||
called local_zoneminder. A copy of this policy is in the documentation
|
||||
folder.
|
||||
|
||||
Unfortunately, this has not resolved all the SELinux issues so
|
||||
most will want to disable SELinux permanently by editing the following:
|
||||
|
||||
/etc/selinux/conf
|
||||
|
||||
Change SELINUX line from "enforcing" to "disabled". This change will not
|
||||
take effect until a reboot, however. To avoid a reboot, execute the
|
||||
following from the commandline:
|
||||
|
||||
sudo setenforce 0
|
||||
|
||||
7. Finally, you may start the ZoneMinder service:
|
||||
8. Finally, you may start the ZoneMinder service:
|
||||
|
||||
sudo service zoneminder start
|
||||
|
||||
|
@ -51,12 +66,27 @@
|
|||
UPGRADES
|
||||
================================================================================
|
||||
|
||||
1. You will need to upgrade the ZoneMinder database as described in the
|
||||
manual. This command should be sufficient:
|
||||
1. Add additional permissions to the zmuser account:
|
||||
|
||||
sudo zmupdate.pl --user=root --pass=<mysql root pwd> --version=<from version>
|
||||
mysql -u root -p
|
||||
grant lock tables,alter on zm.* to
|
||||
'zmuser'@localhost identified by 'zmpass';
|
||||
|
||||
It is recommended to backup your database and then upgrade your tables
|
||||
to InnoDB when prompted.
|
||||
Since this is an upgrade, the assumption is that the zmuser account exists
|
||||
and already has select, insert, update, and delete permission.
|
||||
|
||||
2. If you have previsouly changed the zoneminder mysql credentials to something
|
||||
other than zmuser/zmpass then you must now edit /etc/zm.conf. Change
|
||||
ZM_DB_USER and ZM_DB_PASS to their appropriate values.
|
||||
|
||||
3. You will need to upgrade the ZoneMinder database as described in the manual.
|
||||
Only if step 1 was succesfully applied, may you run zmupdate like so:
|
||||
|
||||
sudo zmupdate.pl --version=<from version>
|
||||
|
||||
|
||||
If unsure then run it this way:
|
||||
|
||||
sudo zmupdate.pl --user=root --pass=<mysql_root_pwd> --version=<from version>
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
--- configure.ac 2013-08-15 11:44:10.000000000 -0500
|
||||
+++ configure.ac.logdir 2013-08-17 09:20:07.326053328 -0500
|
||||
@@ -46,7 +46,7 @@
|
||||
AC_SUBST(ZM_TMPDIR,[/tmp/zm])
|
||||
fi
|
||||
if test "$ZM_LOGDIR" == ""; then
|
||||
- AC_SUBST(ZM_LOGDIR,[/var/log/zm])
|
||||
+ AC_SUBST(ZM_LOGDIR,[/var/log/zoneminder])
|
||||
fi
|
||||
|
||||
LIB_ARCH=lib
|
||||
--- scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in 2013-08-01 18:14:45.175241378 -0500
|
||||
+++ scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in.defaults 2013-08-07 18:57:42.525006149 -0500
|
||||
@@ -187,7 +187,7 @@
|
||||
},
|
||||
{
|
||||
name => "ZM_PATH_ZMS",
|
||||
- default => "/cgi-bin/nph-zms",
|
||||
+ default => "/cgi-bin/zm/nph-zms",
|
||||
description => "Web path to zms streaming server",
|
||||
help => "The ZoneMinder streaming server is required to send streamed images to your browser. It will be installed into the cgi-bin path given at configuration time. This option determines what the web path to the server is rather than the local path on your machine. Ordinarily the streaming server runs in parser-header mode however if you experience problems with streaming you can change this to non-parsed-header (nph) mode by changing 'zms' to 'nph-zms'.",
|
||||
type => $types{rel_path},
|
||||
@@ -276,7 +276,7 @@
|
||||
},
|
||||
{
|
||||
name => "ZM_OPT_CAMBOZOLA",
|
||||
- default => "no",
|
||||
+ default => "yes",
|
||||
description => "Is the (optional) cambozola java streaming client installed",
|
||||
help => "Cambozola is a handy low fat cheese flavoured Java applet that ZoneMinder uses to view image streams on browsers such as Internet Explorer that don't natively support this format. If you use this browser it is highly recommended to install this from http://www.charliemouse.com/code/cambozola/ however if it is not installed still images at a lower refresh rate can still be viewed.",
|
||||
type => $types{boolean},
|
||||
@@ -526,7 +526,7 @@
|
||||
},
|
||||
{
|
||||
name => "ZM_LOG_DEBUG_FILE",
|
||||
- default => "@ZM_TMPDIR@/zm_debug.log+",
|
||||
+ default => "/var/log/zoneminder/zm_debug_log+",
|
||||
description => "Where extra debug is output to",
|
||||
help => "This option allows you to specify a different target for debug output. All components have a default log file which will norally be in /tmp or /var/log and this is where debug will be written to if this value is empty. Adding a path here will temporarily redirect debug, and other logging output, to this file. This option is a simple filename and you are debugging several components then they will all try and write to the same file with undesirable consequences. Appending a '+' to the filename will cause the file to be created with a '.<pid>' suffix containing your process id. In this way debug from each run of a component is kept separate. This is the recommended setting as it will also prevent subsequent runs from overwriting the same log. You should ensure that permissions are set up to allow writing to the file and directory specified here.",
|
||||
requires => [ { name => "ZM_LOG_DEBUG", value => "yes" } ],
|
||||
@@ -623,7 +623,7 @@
|
||||
},
|
||||
{
|
||||
name => "ZM_PATH_SOCKS",
|
||||
- default => "@ZM_TMPDIR@",
|
||||
+ default => "/var/lib/zoneminder/sock",
|
||||
description => "Path to the various Unix domain socket files that ZoneMinder uses",
|
||||
help => "ZoneMinder generally uses Unix domain sockets where possible. This reduces the need for port assignments and prevents external applications from possibly compromising the daemons. However each Unix socket requires a .sock file to be created. This option indicates where those socket files go.",
|
||||
type => $types{abs_path},
|
||||
@@ -639,7 +639,7 @@
|
||||
},
|
||||
{
|
||||
name => "ZM_PATH_SWAP",
|
||||
- default => "@ZM_TMPDIR@",
|
||||
+ default => "/dev/shm",
|
||||
description => "Path to location for temporary swap images used in streaming",
|
||||
help => "Buffered playback requires temporary swap images to be stored for each instance of the streaming daemons. This option determines where these images will be stored. The images will actually be stored in sub directories beneath this location and will be automatically cleaned up after a period of time.",
|
||||
type => $types{abs_path},
|
||||
@@ -902,7 +902,7 @@
|
||||
},
|
||||
{
|
||||
name => "ZM_UPLOAD_FTP_LOC_DIR",
|
||||
- default => "@ZM_TMPDIR@",
|
||||
+ default => "/var/spool/zoneminder-upload",
|
||||
description => "The local directory in which to create upload files",
|
||||
help => "You can use filters to instruct ZoneMinder to upload events to a remote ftp server. This option indicates the local directory that ZoneMinder should use for temporary upload files. These are files that are created from events, uploaded and then deleted.",
|
||||
requires => [ { name => "ZM_OPT_UPLOAD", value => "yes" } ],
|
||||
@@ -1258,7 +1258,7 @@
|
||||
},
|
||||
{
|
||||
name => "ZM_OPT_CONTROL",
|
||||
- default => "no",
|
||||
+ default => "yes",
|
||||
description => "Support controllable (e.g. PTZ) cameras",
|
||||
help => "ZoneMinder includes limited support for controllable cameras. A number of sample protocols are included and others can easily be added. If you wish to control your cameras via ZoneMinder then select this option otherwise if you only have static cameras or use other control methods then leave this option off.",
|
||||
type => $types{boolean},
|
|
@ -8,7 +8,7 @@
|
|||
%define zmgid_final apache
|
||||
|
||||
Name: zoneminder
|
||||
Version: 1.26.0
|
||||
Version: 1.27
|
||||
Release: 1%{?dist}
|
||||
Summary: A camera monitoring and analysis tool
|
||||
Group: System Environment/Daemons
|
||||
|
@ -18,26 +18,25 @@ Group: System Environment/Daemons
|
|||
License: GPLv2+ and LGPLv2+ and MIT
|
||||
URL: http://www.zoneminder.com/
|
||||
|
||||
# Some of these sources to be added upstream. Will edit once that happens.
|
||||
Source0: zoneminder-%{version}.tar.gz
|
||||
Source2: zoneminder.conf
|
||||
Source3: redalert.wav
|
||||
Source4: README.CentOS
|
||||
Source5: jscalendar-%{jscrev}.zip
|
||||
#Source5: http://downloads.sourceforge.net/jscalendar/jscalendar-%{jscrev}.zip
|
||||
Source6: mootools-core-%{moorev}-full-compat-yc.js
|
||||
#Source6: http://mootools.net/download/get/mootools-core-%{moorev}-full-compat-yc.js
|
||||
Source7: zm-init
|
||||
Source8: zm-logrotate_d
|
||||
Source9: local_zoneminder.te
|
||||
Source10: cambozola-%{cambrev}.tar.gz
|
||||
#Source10: http://www.andywilcock.com/code/cambozola/cambozola-%{cambrev}.tar.gz
|
||||
#Source0: https://github.com/ZoneMinder/ZoneMinder/archive/v%{version}.tar.gz
|
||||
Source0: ZoneMinder-%{version}.tar.gz
|
||||
Source1: jscalendar-%{jscrev}.zip
|
||||
#Source1: http://downloads.sourceforge.net/jscalendar/jscalendar-%{jscrev}.zip
|
||||
|
||||
Patch1: zoneminder-1.26.0-dbinstall.patch
|
||||
# Mootools is currently bundled in the zoneminder tarball
|
||||
#Source2: mootools-core-%{moorev}-full-compat-yc.js
|
||||
#Source2: http://mootools.net/download/get/mootools-core-%{moorev}-full-compat-yc.js
|
||||
|
||||
Source3: cambozola-%{cambrev}.tar.gz
|
||||
#Source3: http://www.andywilcock.com/code/cambozola/cambozola-%{cambrev}.tar.gz
|
||||
|
||||
#Patch1: zoneminder-1.26.4-dbinstall.patch
|
||||
Patch2: zoneminder-runlevel.patch
|
||||
Patch3: zoneminder-1.26.0-defaults.patch
|
||||
#Patch3: zoneminder-1.25.0-installfix.patch
|
||||
Patch4: zoneminder-1.26.0-defaults.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
# BuildRoot is depreciated and ignored in EPEL6
|
||||
#BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildRequires: automake gnutls-devel bzip2-devel libtool
|
||||
BuildRequires: mysql-devel pcre-devel libjpeg-turbo-devel
|
||||
|
@ -48,18 +47,13 @@ BuildRequires: perl(MIME::Entity) perl(MIME::Lite)
|
|||
BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap)
|
||||
BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign)
|
||||
BuildRequires: perl(Expect) perl(X10::ActiveHome) perl(Astro::SunTime)
|
||||
# Change this for distros compatible newer ffmpeg & gcc
|
||||
BuildRequires: ffmpeg-devel >= 0.4.9
|
||||
BuildRequires: ffmpeg-devel <= 0.6.5
|
||||
BuildRequires: gcc < 4.7
|
||||
BuildRequires: libcurl-devel vlc-devel polkit-devel ffmpeg-devel >= 0.4.9
|
||||
|
||||
Requires: httpd php php-mysql mysql-server libjpeg-turbo
|
||||
Requires: httpd php php-mysql mysql-server libjpeg-turbo polkit
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
|
||||
Requires: perl(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP)
|
||||
# Change this for distros compatible newer ffmpeg
|
||||
Requires: ffmpeg >= 0.4.9
|
||||
Requires: ffmpeg <= 0.6.5
|
||||
Requires: libcurl vlc-core ffmpeg >= 0.4.9
|
||||
|
||||
Requires(post): /sbin/chkconfig
|
||||
Requires(post): /usr/bin/checkmodule
|
||||
|
@ -84,10 +78,10 @@ too much degradation of performance.
|
|||
|
||||
|
||||
%prep
|
||||
%setup -q -n zoneminder-%{version}
|
||||
%setup -q -n ZoneMinder-%{version}
|
||||
|
||||
# Unpack jscalendar and move some files around
|
||||
%setup -q -D -T -a 5 -n zoneminder-%{version}
|
||||
%setup -q -D -T -a 1 -n ZoneMinder-%{version}
|
||||
mkdir jscalendar-doc
|
||||
pushd jscalendar-%{jscrev}
|
||||
mv *html *php doc/* README ../jscalendar-doc
|
||||
|
@ -95,19 +89,17 @@ rmdir doc
|
|||
popd
|
||||
|
||||
# Unpack Cambozola and move some files around
|
||||
%setup -q -D -T -a 10 -n zoneminder-%{version}
|
||||
%setup -q -D -T -a 3 -n ZoneMinder-%{version}
|
||||
mkdir cambozola-doc
|
||||
pushd cambozola-%{cambrev}
|
||||
mv application.properties build.xml dist.sh *html LICENSE testPages/* ../cambozola-doc
|
||||
rmdir testPages
|
||||
popd
|
||||
|
||||
%patch1 -p0 -b .dbinstall
|
||||
#%patch1 -p0 -b .dbinstall
|
||||
%patch2 -p0 -b .runlevel
|
||||
%patch3 -p0
|
||||
|
||||
cp %{SOURCE4} README.CentOS
|
||||
cp %{SOURCE9} local_zoneminder.te
|
||||
#%patch3 -p0 -b .installfix
|
||||
%patch4 -p0
|
||||
|
||||
%build
|
||||
libtoolize --force
|
||||
|
@ -115,7 +107,6 @@ aclocal
|
|||
autoheader
|
||||
automake --force-missing --add-missing
|
||||
autoconf
|
||||
#autoreconf
|
||||
|
||||
OPTS=""
|
||||
%ifnarch %{ix86} x86_64
|
||||
|
@ -141,7 +132,11 @@ OPTS=""
|
|||
ZM_SSL_LIB="gnutls" \
|
||||
ZM_RUNDIR=/var/run/zoneminder \
|
||||
ZM_TMPDIR=/var/lib/zoneminder/temp \
|
||||
%ifarch x86_64
|
||||
CXXFLAGS="-D__STDC_CONSTANT_MACROS -msse2" \
|
||||
%else
|
||||
CXXFLAGS="-D__STDC_CONSTANT_MACROS" \
|
||||
%endif
|
||||
--with-extralibs=""
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
@ -161,7 +156,9 @@ install -m 755 -d %{buildroot}/%{_localstatedir}/log/zoneminder
|
|||
for dir in events images temp
|
||||
do
|
||||
install -m 755 -d %{buildroot}/%{_localstatedir}/lib/zoneminder/$dir
|
||||
rmdir %{buildroot}/%{_datadir}/%{name}/www/$dir
|
||||
if [ -d %{buildroot}/%{_datadir}/zoneminder/www/$dir ]; then
|
||||
rmdir %{buildroot}/%{_datadir}/%{name}/www/$dir
|
||||
fi
|
||||
ln -sf ../../../..%{_localstatedir}/lib/zoneminder/$dir %{buildroot}/%{_datadir}/%{name}/www/$dir
|
||||
done
|
||||
install -m 755 -d %{buildroot}/%{_localstatedir}/lib/zoneminder/sock
|
||||
|
@ -169,9 +166,9 @@ install -m 755 -d %{buildroot}/%{_localstatedir}/lib/zoneminder/swap
|
|||
install -m 755 -d %{buildroot}/%{_localstatedir}/spool/zoneminder-upload
|
||||
|
||||
install -D -m 755 scripts/zm %{buildroot}/%{_initrddir}/zoneminder
|
||||
install -D -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/httpd/conf.d/zoneminder.conf
|
||||
install -D -m 755 %{SOURCE3} %{buildroot}/%{_datadir}/%{name}/www/sounds/redalert.wav
|
||||
install %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
|
||||
install -D -m 644 distros/redhat/zoneminder.conf %{buildroot}/%{_sysconfdir}/httpd/conf.d/zoneminder.conf
|
||||
install -D -m 755 distros/redhat/redalert.wav %{buildroot}/%{_datadir}/%{name}/www/sounds/redalert.wav
|
||||
install distros/redhat/zm-logrotate_d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}
|
||||
|
||||
# Install jscalendar
|
||||
install -d -m 755 %{buildroot}/%{_datadir}/%{name}/www/jscalendar
|
||||
|
@ -183,17 +180,20 @@ rm -rf cambozola-%{cambrev}
|
|||
|
||||
# Install mootools
|
||||
pushd %{buildroot}/%{_datadir}/%{name}/www
|
||||
install -m 644 %{SOURCE6} mootools-core-%{moorev}-full-compat-yc.js
|
||||
ln -s mootools-core-%{moorev}-full-compat-yc.js mootools.js
|
||||
#install -m 644 %{Source2} mootools-core-%{moorev}-full-compat-yc.js
|
||||
#ln -s mootools-core-%{moorev}-full-compat-yc.js mootools.js
|
||||
ln -f -s tools/mootools/mootools-core-%{moorev}-yc.js mootools-core.js
|
||||
ln -f -s tools/mootools/mootools-more-%{moorev}.1-yc.js mootools-more.js
|
||||
popd
|
||||
|
||||
%post
|
||||
/sbin/chkconfig --add zoneminder
|
||||
/sbin/chkconfig zoneminder on
|
||||
|
||||
# Allow zoneminder access to local video sources
|
||||
# Allow zoneminder access to local video sources, serial ports, and x10
|
||||
echo
|
||||
/usr/bin/gpasswd -a apache video
|
||||
/usr/bin/gpasswd -a %{zmuid_final} video
|
||||
/usr/bin/gpasswd -a %{zmuid_final} dialout
|
||||
|
||||
# Create and load zoneminder selinux policy module
|
||||
echo -e "\nCreating and installing a ZoneMinder SELinux policy module. Please wait.\n"
|
||||
|
@ -221,8 +221,8 @@ fi
|
|||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS BUGS ChangeLog COPYING LICENSE NEWS README.md README.CentOS jscalendar-doc cambozola-doc local_zoneminder.te
|
||||
%config(noreplace) %attr(640,root,%{zmgid_final}) %{_sysconfdir}/zm.conf
|
||||
%doc AUTHORS BUGS ChangeLog COPYING LICENSE NEWS README.md distros/redhat/README.CentOS jscalendar-doc cambozola-doc distros/redhat/local_zoneminder.te
|
||||
%config %attr(640,root,%{zmgid_final}) %{_sysconfdir}/zm.conf
|
||||
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/httpd/conf.d/zoneminder.conf
|
||||
%config(noreplace) /etc/logrotate.d/%{name}
|
||||
%attr(755,root,root) %{_initrddir}/zoneminder
|
||||
|
@ -234,7 +234,8 @@ fi
|
|||
%{_bindir}/zmdc.pl
|
||||
%{_bindir}/zmf
|
||||
%{_bindir}/zmfilter.pl
|
||||
%attr(4755,root,root) %{_bindir}/zmfix
|
||||
# zmfix removed from zoneminder 1.26.6
|
||||
#%attr(4755,root,root) %{_bindir}/zmfix
|
||||
%{_bindir}/zmpkg.pl
|
||||
%{_bindir}/zmstreamer
|
||||
%{_bindir}/zmtrack.pl
|
||||
|
@ -243,6 +244,8 @@ fi
|
|||
%{_bindir}/zmupdate.pl
|
||||
%{_bindir}/zmvideo.pl
|
||||
%{_bindir}/zmwatch.pl
|
||||
%{_bindir}/zmcamtool.pl
|
||||
%{_bindir}/zmsystemctl.pl
|
||||
%{_bindir}/zmx10.pl
|
||||
|
||||
%{perl_vendorlib}/ZoneMinder*
|
||||
|
@ -253,6 +256,9 @@ fi
|
|||
%{_datadir}/%{name}/db
|
||||
%{_datadir}/%{name}/www
|
||||
|
||||
%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy
|
||||
%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules
|
||||
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/events
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/images
|
||||
|
@ -264,6 +270,16 @@ fi
|
|||
|
||||
|
||||
%changelog
|
||||
* Sat Feb 01 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.27
|
||||
- Add zmcamtool.pl. Bump version for 1.27 release.
|
||||
|
||||
* Mon Dec 16 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.5
|
||||
- This is a bug fixe release
|
||||
- RTSP fixes, cmake enhancements, couple other misc fixes
|
||||
|
||||
* Sun Oct 06 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.4
|
||||
- All files are now part of the zoneminder source tree. Update specfile accordingly.
|
||||
|
||||
* Thu Sep 05 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.0
|
||||
- 1.26.0 Release
|
||||
- https://github.com/ZoneMinder/ZoneMinder/archive/v1.26.0.tar.gz
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
tar -xvzf cambozola-0.931.tar.gz
|
||||
mkdir -v cambozola-doc
|
||||
cd cambozola-0.931
|
||||
mv -v application.properties build.xml dist.sh *html LICENSE testPages/* ../cambozola-doc
|
||||
rmdir -v testPages
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
unzip -o jscalendar-1.0.zip
|
||||
mkdir -v jscalendar-doc
|
||||
cd jscalendar-1.0
|
||||
mv -v *html *php doc/* README ../jscalendar-doc
|
||||
rmdir -v doc
|
|
@ -1,7 +1,33 @@
|
|||
|
||||
module local_zoneminder 1.0;
|
||||
module local_zoneminder 1.1;
|
||||
|
||||
require {
|
||||
type afs_ka_port_t;
|
||||
type netsupport_port_t;
|
||||
type port_t;
|
||||
type presence_port_t;
|
||||
type postfix_pickup_t;
|
||||
type httpd_t;
|
||||
type var_lib_t;
|
||||
type ionixnetmon_port_t;
|
||||
type glance_port_t;
|
||||
type mmcc_port_t;
|
||||
type postfix_master_t;
|
||||
type commplex_port_t;
|
||||
type syslogd_port_t;
|
||||
type dcc_port_t;
|
||||
type sip_port_t;
|
||||
type amqp_port_t;
|
||||
type condor_port_t;
|
||||
type afs_fs_port_t;
|
||||
type nodejs_debug_port_t;
|
||||
type httpd_var_lib_t;
|
||||
type websm_port_t;
|
||||
type afs_pt_port_t;
|
||||
type postfix_qmgr_t;
|
||||
type git_port_t;
|
||||
type ipp_port_t;
|
||||
type aol_port_t;
|
||||
type unconfined_t;
|
||||
type kernel_t;
|
||||
type init_t;
|
||||
|
@ -24,10 +50,11 @@ require {
|
|||
type dhcpc_t;
|
||||
type v4l_device_t;
|
||||
type file_t;
|
||||
class sock_file write;
|
||||
class sock_file { write create unlink };
|
||||
class unix_stream_socket { read connectto };
|
||||
class lnk_file { write getattr read lock unlink };
|
||||
class lnk_file { write create getattr read lock unlink };
|
||||
class dir search;
|
||||
class udp_socket name_bind;
|
||||
class file { write getattr read lock unlink open };
|
||||
class shm { unix_read unix_write associate read write getattr };
|
||||
class chr_file getattr;
|
||||
|
@ -70,3 +97,27 @@ allow httpd_t unconfined_t:dir search;
|
|||
allow httpd_t unconfined_t:file { read getattr open };
|
||||
allow httpd_t var_lib_t:lnk_file { write getattr read lock unlink };
|
||||
allow httpd_t v4l_device_t:chr_file getattr;
|
||||
allow httpd_t afs_fs_port_t:udp_socket name_bind;
|
||||
allow httpd_t afs_ka_port_t:udp_socket name_bind;
|
||||
allow httpd_t afs_pt_port_t:udp_socket name_bind;
|
||||
allow httpd_t amqp_port_t:udp_socket name_bind;
|
||||
allow httpd_t aol_port_t:udp_socket name_bind;
|
||||
allow httpd_t commplex_port_t:udp_socket name_bind;
|
||||
allow httpd_t condor_port_t:udp_socket name_bind;
|
||||
allow httpd_t dcc_port_t:udp_socket name_bind;
|
||||
allow httpd_t git_port_t:udp_socket name_bind;
|
||||
allow httpd_t glance_port_t:udp_socket name_bind;
|
||||
allow httpd_t httpd_var_lib_t:lnk_file create;
|
||||
allow httpd_t ionixnetmon_port_t:udp_socket name_bind;
|
||||
allow httpd_t ipp_port_t:udp_socket name_bind;
|
||||
allow httpd_t mmcc_port_t:udp_socket name_bind;
|
||||
allow httpd_t netsupport_port_t:udp_socket name_bind;
|
||||
allow httpd_t nodejs_debug_port_t:udp_socket name_bind;
|
||||
allow httpd_t port_t:udp_socket name_bind;
|
||||
allow httpd_t postfix_master_t:dir search;
|
||||
allow httpd_t postfix_master_t:file { read getattr open };
|
||||
allow httpd_t postfix_pickup_t:dir search;
|
||||
allow httpd_t postfix_pickup_t:file { read getattr open };
|
||||
allow httpd_t postfix_qmgr_t:dir search;
|
||||
allow httpd_t postfix_qmgr_t:file { read getattr open };
|
||||
allow httpd_t presence_port_t:udp_socket name_bind;
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
--- scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in 2013-08-01 18:14:45.175241378 -0500
|
||||
+++ scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in.defaults 2013-08-07 18:57:42.525006149 -0500
|
||||
@@ -187,7 +187,7 @@
|
||||
},
|
||||
{
|
||||
name => "ZM_PATH_ZMS",
|
||||
- default => "/cgi-bin/nph-zms",
|
||||
+ default => "/cgi-bin/zm/nph-zms",
|
||||
description => "Web path to zms streaming server",
|
||||
help => "The ZoneMinder streaming server is required to send streamed images to your browser. It will be installed into the cgi-bin path given at configuration time. This option determines what the web path to the server is rather than the local path on your machine. Ordinarily the streaming server runs in parser-header mode however if you experience problems with streaming you can change this to non-parsed-header (nph) mode by changing 'zms' to 'nph-zms'.",
|
||||
type => $types{rel_path},
|
||||
@@ -276,7 +276,7 @@
|
||||
},
|
||||
{
|
||||
name => "ZM_OPT_CAMBOZOLA",
|
||||
- default => "no",
|
||||
+ default => "yes",
|
||||
description => "Is the (optional) cambozola java streaming client installed",
|
||||
help => "Cambozola is a handy low fat cheese flavoured Java applet that ZoneMinder uses to view image streams on browsers such as Internet Explorer that don't natively support this format. If you use this browser it is highly recommended to install this from http://www.charliemouse.com/code/cambozola/ however if it is not installed still images at a lower refresh rate can still be viewed.",
|
||||
type => $types{boolean},
|
||||
@@ -639,7 +639,7 @@
|
||||
},
|
||||
{
|
||||
name => "ZM_PATH_SWAP",
|
||||
- default => "@ZM_TMPDIR@",
|
||||
+ default => "/dev/shm",
|
||||
description => "Path to location for temporary swap images used in streaming",
|
||||
help => "Buffered playback requires temporary swap images to be stored for each instance of the streaming daemons. This option determines where these images will be stored. The images will actually be stored in sub directories beneath this location and will be automatically cleaned up after a period of time.",
|
||||
type => $types{abs_path},
|
||||
@@ -902,7 +902,7 @@
|
||||
},
|
||||
{
|
||||
name => "ZM_UPLOAD_FTP_LOC_DIR",
|
||||
- default => "@ZM_TMPDIR@",
|
||||
+ default => "/var/spool/zoneminder-upload",
|
||||
description => "The local directory in which to create upload files",
|
||||
help => "You can use filters to instruct ZoneMinder to upload events to a remote ftp server. This option indicates the local directory that ZoneMinder should use for temporary upload files. These are files that are created from events, uploaded and then deleted.",
|
||||
requires => [ { name => "ZM_OPT_UPLOAD", value => "yes" } ],
|
||||
@@ -1258,7 +1258,7 @@
|
||||
},
|
||||
{
|
||||
name => "ZM_OPT_CONTROL",
|
||||
- default => "no",
|
||||
+ default => "yes",
|
||||
description => "Support controllable (e.g. PTZ) cameras",
|
||||
help => "ZoneMinder includes limited support for controllable cameras. A number of sample protocols are included and others can easily be added. If you wish to control your cameras via ZoneMinder then select this option otherwise if you only have static cameras or use other control methods then leave this option off.",
|
||||
type => $types{boolean},
|
|
@ -0,0 +1,326 @@
|
|||
%define zmuid $(id -un)
|
||||
%define zmgid $(id -gn)
|
||||
%define zmuid_final apache
|
||||
%define zmgid_final apache
|
||||
|
||||
Name: zoneminder
|
||||
Version: 1.28.0
|
||||
Release: 1%{?dist}
|
||||
Summary: A camera monitoring and analysis tool
|
||||
Group: System Environment/Daemons
|
||||
# jscalendar is LGPL (any version): http://www.dynarch.com/projects/calendar/
|
||||
# Mootools is inder the MIT license: http://mootools.net/
|
||||
# Cambozola is GPL: http://www.charliemouse.com/code/cambozola/
|
||||
License: GPLv2+ and LGPLv2+ and MIT
|
||||
URL: http://www.zoneminder.com/
|
||||
|
||||
#Source0: https://github.com/ZoneMinder/ZoneMinder/archive/v%{version}.tar.gz
|
||||
Source0: ZoneMinder-%{version}.tar.gz
|
||||
|
||||
Patch1: zoneminder-1.28.0-defaults.patch
|
||||
|
||||
BuildRequires: cmake gnutls-devel bzip2-devel
|
||||
BuildRequires: mysql-devel pcre-devel libjpeg-turbo-devel
|
||||
BuildRequires: perl(Archive::Tar) perl(Archive::Zip)
|
||||
BuildRequires: perl(Date::Manip) perl(DBD::mysql)
|
||||
BuildRequires: perl(ExtUtils::MakeMaker) perl(LWP::UserAgent)
|
||||
BuildRequires: perl(MIME::Entity) perl(MIME::Lite)
|
||||
BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap)
|
||||
BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign)
|
||||
BuildRequires: perl(Expect) perl(X10::ActiveHome) perl(Astro::SunTime)
|
||||
BuildRequires: libcurl-devel vlc-devel ffmpeg-devel polkit-devel
|
||||
# cmake needs the following installed at build time due to the way it auto-detects certain parameters
|
||||
BuildRequires: httpd ffmpeg
|
||||
|
||||
Requires: httpd php php-mysql mysql-server libjpeg-turbo polkit
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
|
||||
Requires: perl(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP)
|
||||
Requires: libcurl vlc-core ffmpeg
|
||||
|
||||
Requires(post): /sbin/chkconfig
|
||||
Requires(post): /usr/bin/checkmodule
|
||||
Requires(post): /usr/bin/semodule_package
|
||||
Requires(post): /usr/sbin/semodule
|
||||
Requires(post): /usr/bin/gpasswd
|
||||
Requires(post): /usr/bin/less
|
||||
Requires(preun): /sbin/chkconfig
|
||||
Requires(preun): /sbin/service
|
||||
Requires(preun): /usr/sbin/semodule
|
||||
Requires(postun): /sbin/service
|
||||
|
||||
|
||||
%description
|
||||
ZoneMinder is a set of applications which is intended to provide a complete
|
||||
solution allowing you to capture, analyse, record and monitor any cameras you
|
||||
have attached to a Linux based machine. It is designed to run on kernels which
|
||||
support the Video For Linux (V4L) interface and has been tested with cameras
|
||||
attached to BTTV cards, various USB cameras and IP network cameras. It is
|
||||
designed to support as many cameras as you can attach to your computer without
|
||||
too much degradation of performance.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n ZoneMinder-%{version}
|
||||
|
||||
%patch1 -p0 -b .defaults
|
||||
|
||||
%build
|
||||
# Have to override CMAKE_INSTALL_LIBDIR for cmake < 2.8.7 due to this bug:
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=795542
|
||||
%cmake -DZM_TARGET_DISTRO="el6" -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} -DZM_PERL_SUBPREFIX=`x="%{perl_vendorlib}" ; echo ${x#"%{_prefix}"}` .
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
export DESTDIR=%{buildroot}
|
||||
make install
|
||||
|
||||
%post
|
||||
/sbin/chkconfig --add zoneminder
|
||||
/sbin/chkconfig zoneminder on
|
||||
|
||||
# Allow zoneminder access to local video sources, serial ports, and x10
|
||||
echo
|
||||
/usr/bin/gpasswd -a %{zmuid_final} video
|
||||
/usr/bin/gpasswd -a %{zmuid_final} dialout
|
||||
|
||||
# Create and load zoneminder selinux policy module
|
||||
echo -e "\nCreating and installing a ZoneMinder SELinux policy module. Please wait.\n"
|
||||
/usr/bin/checkmodule -M -m -o %{_docdir}/%{name}-%{version}/local_zoneminder.mod %{_docdir}/%{name}-%{version}/local_zoneminder.te > /dev/null
|
||||
/usr/bin/semodule_package -o %{_docdir}/%{name}-%{version}/local_zoneminder.pp -m %{_docdir}/%{name}-%{version}/local_zoneminder.mod > /dev/null
|
||||
/usr/sbin/semodule -i %{_docdir}/%{name}-%{version}/local_zoneminder.pp > /dev/null
|
||||
|
||||
# Display the README for post installation instructions
|
||||
/usr/bin/less %{_docdir}/%{name}-%{version}/README.CentOS
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then
|
||||
/sbin/service zoneminder stop > /dev/null 2>&1 || :
|
||||
/sbin/chkconfig --del zoneminder
|
||||
echo -e "\nRemoving ZoneMinder SELinux policy module. Please wait.\n"
|
||||
/usr/sbin/semodule -r local_zoneminder.pp
|
||||
fi
|
||||
|
||||
|
||||
%postun
|
||||
if [ $1 -ge 1 ]; then
|
||||
/sbin/service zoneminder condrestart > /dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
# Remove the doc folder.
|
||||
rm -rf %{_docdir}/%{name}-%{version}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS BUGS ChangeLog COPYING LICENSE NEWS README.md distros/redhat/README.CentOS distros/redhat/jscalendar-doc
|
||||
%doc distros/redhat/cambozola-doc distros/redhat/local_zoneminder.te
|
||||
%config %attr(640,root,%{zmgid_final}) %{_sysconfdir}/zm.conf
|
||||
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/httpd/conf.d/zoneminder.conf
|
||||
%config(noreplace) /etc/logrotate.d/%{name}
|
||||
%attr(755,root,root) %{_initrddir}/zoneminder
|
||||
|
||||
%{_bindir}/zma
|
||||
%{_bindir}/zmaudit.pl
|
||||
%{_bindir}/zmc
|
||||
%{_bindir}/zmcontrol.pl
|
||||
%{_bindir}/zmdc.pl
|
||||
%{_bindir}/zmf
|
||||
%{_bindir}/zmfilter.pl
|
||||
%{_bindir}/zmpkg.pl
|
||||
%{_bindir}/zmstreamer
|
||||
%{_bindir}/zmtrack.pl
|
||||
%{_bindir}/zmtrigger.pl
|
||||
%{_bindir}/zmu
|
||||
%{_bindir}/zmupdate.pl
|
||||
%{_bindir}/zmvideo.pl
|
||||
%{_bindir}/zmwatch.pl
|
||||
%{_bindir}/zmcamtool.pl
|
||||
%{_bindir}/zmsystemctl.pl
|
||||
%{_bindir}/zmx10.pl
|
||||
|
||||
%{perl_vendorlib}/ZoneMinder*
|
||||
%{perl_vendorlib}/%{_arch}-linux-thread-multi/auto/ZoneMinder*
|
||||
%{_mandir}/man*/*
|
||||
%dir %{_libexecdir}/%{name}
|
||||
%{_libexecdir}/%{name}/cgi-bin
|
||||
%dir %{_datadir}/%{name}
|
||||
%{_datadir}/%{name}/db
|
||||
%{_datadir}/%{name}/www
|
||||
|
||||
%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy
|
||||
%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules
|
||||
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/events
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/images
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/sock
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/swap
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/temp
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/log/zoneminder
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/spool/zoneminder-upload
|
||||
|
||||
%changelog
|
||||
* Sun Oct 5 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.28.0
|
||||
- Bump version for 1.28.0 release.
|
||||
|
||||
* Fri Mar 14 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.27
|
||||
- Tweak build requirements for cmake
|
||||
|
||||
* Sat Feb 01 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.27
|
||||
- Add zmcamtool.pl. Bump version for 1.27 release.
|
||||
|
||||
* Mon Dec 16 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.5
|
||||
- This is a bug fixe release
|
||||
- RTSP fixes, cmake enhancements, couple other misc fixes
|
||||
|
||||
* Sat Oct 19 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.4
|
||||
- Streamline the cmake build. Move much code into cmakelist.txt file.
|
||||
|
||||
* Mon Oct 07 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.4
|
||||
- Initial cmake build.
|
||||
|
||||
* Sun Oct 06 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.4
|
||||
- All files are now part of the zoneminder source tree. Update specfile accordingly.
|
||||
|
||||
* Thu Sep 05 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.0
|
||||
- 1.26.0 Release
|
||||
- https://github.com/ZoneMinder/ZoneMinder/archive/v1.26.0.tar.gz
|
||||
|
||||
* Sun Sep 01 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.0-beta
|
||||
- Update SELinux policy module
|
||||
|
||||
* Thu Aug 29 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.0-beta
|
||||
- Third Beta release
|
||||
- https://github.com/ZoneMinder/ZoneMinder/tree/release-1.26
|
||||
- Reduce number of uneeded dependencies by integrating cambozola into spec file
|
||||
|
||||
* Thu Aug 15 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.0-beta
|
||||
- Initial Beta release
|
||||
- https://github.com/ZoneMinder/ZoneMinder/tree/release-1.26
|
||||
|
||||
* Sun Aug 11 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.25.0-kfirproper
|
||||
- Modified specfile to work with kfir-proper branch
|
||||
- https://github.com/ZoneMinder/ZoneMinder/tree/kfir-proper
|
||||
|
||||
* Wed Aug 07 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.25.0-2svn3827
|
||||
- Move RHEL/CentOS specific defaults to a patch file
|
||||
- Add bzip2-devel as a build dependency
|
||||
- Default ZM_SSL_LIB back to gnutls. AUTH_RELAY = hashed didn't work with openssl.
|
||||
|
||||
* Fri Aug 02 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.25.0-1svn3827
|
||||
- Update to latest 1.25.0 subversion.
|
||||
- Does not compile with modern versions of ffmpeg. Configure to work only with older versions.
|
||||
- Does not compile with gcc 4.7. Configure to build with gcc less than 4.7.
|
||||
|
||||
* Thu Mar 24 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-4.20110324svn3310
|
||||
- Update to latest 1.24.3 subversion. Turns out that what upstream was calling
|
||||
1.24.3 is really just an occasionally updated devel snapshot.
|
||||
- Rebase various patches.
|
||||
|
||||
* Wed Mar 23 2011 Dan Horák <dan@danny.cz> - 1.24.3-3
|
||||
- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
* Tue Jan 25 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-1
|
||||
- Update to latest upstream version.
|
||||
- Rebase patches.
|
||||
- Initial incomplete attempt to disable v4l1 support.
|
||||
|
||||
* Fri Jan 21 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-6
|
||||
- Unbundle cambozola; instead link to the separately pacakged copy.
|
||||
- Remove BuildRoot:, %%clean and buildroot cleaning in %%install.
|
||||
- Git rid of mixed space/tab usage by removing all tabs.
|
||||
- Remove unnecessary Conflicts: line.
|
||||
- Attempt to force short_open_tag on for the code directories.
|
||||
- Move default location of sockets, swaps, logfiles and some temporary files to
|
||||
make more sense and allow things to work better with a future selinux policy.
|
||||
- Fix errors in README.CentOS.
|
||||
|
||||
* Wed Jun 02 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.24.2-5
|
||||
- Mass rebuild with perl-5.12.0
|
||||
|
||||
* Fri Dec 4 2009 Stepan Kasal <skasal@redhat.com> - 1.24.2-4
|
||||
- rebuild against perl 5.10.1
|
||||
- use Perl vendorarch and archlib variables correctly
|
||||
|
||||
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||
|
||||
* Wed Jul 22 2009 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-2
|
||||
- Bump release since 1.24.2-1 was mistakenly tagged a few months ago.
|
||||
|
||||
* Wed Jul 22 2009 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-1
|
||||
- Initial update to 1.24.2.
|
||||
- Rebase patches.
|
||||
- Update mootools download location.
|
||||
- Update to mootools 1.2.3.
|
||||
- Add additional dependencies for some optional features.
|
||||
|
||||
* Sat Apr 11 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-3
|
||||
- Remove unused Sys::Mmap perl dependency RPM is finding
|
||||
|
||||
* Sat Apr 11 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-2
|
||||
- Update gcc44 patch to disable -frepo, seems to be broken with gcc44
|
||||
- Added noffmpeg patch to make building outside mock easier
|
||||
|
||||
* Sat Mar 21 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-1
|
||||
- Patch for gcc 4.4 compilation errors
|
||||
- Upgrade to 1.24.1
|
||||
|
||||
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.23.3-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
* Sat Jan 24 2009 Caolán McNamara <caolanm@redhat.com> - 1.23.3-3
|
||||
- rebuild for dependencies
|
||||
|
||||
* Mon Dec 15 2008 Martin Ebourne <martin@zepler.org> - 1.23.3-2
|
||||
- Fix permissions on zm.conf
|
||||
|
||||
* Fri Jul 11 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.23.3-1
|
||||
- Initial attempt at packaging 1.23.
|
||||
|
||||
* Tue Jul 1 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-15
|
||||
- Add perl module compat dependency, bz #453590
|
||||
|
||||
* Tue May 6 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-14
|
||||
- Remove default runlevel, bz #441315
|
||||
|
||||
* Mon Apr 28 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.22.3-13
|
||||
- Backport patch for CVE-2008-1381 from 1.23.3 to 1.22.3.
|
||||
|
||||
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.22.3-12
|
||||
- Autorebuild for GCC 4.3
|
||||
|
||||
* Thu Jan 3 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-11
|
||||
- Fix compilation on gcc 4.3
|
||||
|
||||
* Thu Dec 6 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-10
|
||||
- Rebuild for new openssl
|
||||
|
||||
* Thu Aug 2 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-8
|
||||
- Fix licence tag
|
||||
|
||||
* Thu Jul 12 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-7
|
||||
- Fixes from testing by Jitz including missing dependencies and database creation
|
||||
|
||||
* Sat Jun 30 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-6
|
||||
- Disable crashtrace on ppc
|
||||
|
||||
* Sat Jun 30 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-5
|
||||
- Fix uid for directories in /var/lib/zoneminder
|
||||
|
||||
* Tue Jun 26 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-4
|
||||
- Added perl Archive::Tar dependency
|
||||
- Disabled web interface due to lack of access control on the event images
|
||||
|
||||
* Sun Jun 10 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-3
|
||||
- Changes recommended in review by Jason Tibbitts
|
||||
|
||||
* Mon Apr 2 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-2
|
||||
- Standardised on package name of zoneminder
|
||||
|
||||
* Thu Dec 28 2006 Martin Ebourne <martin@zepler.org> - 1.22.3-1
|
||||
- First version. Uses some parts from zm-1.20.1 by Corey DeLasaux and Serg Oskin
|
|
@ -0,0 +1,121 @@
|
|||
#!/bin/sh
|
||||
# description: ZoneMinder is the top Linux video camera security and surveillance solution. ZoneMinder is intended for use in single or multi-camera video security applications.Copyright: Philip Coombes, Corey DeLasaux 2003-2008
|
||||
# chkconfig: - 99 00
|
||||
# processname: zmpkg.pl
|
||||
|
||||
# Source function library.
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
prog=ZoneMinder
|
||||
ZM_CONFIG="@ZM_CONFIG@"
|
||||
pidfile="@ZM_RUNDIR@"
|
||||
LOCKFILE=/var/lock/subsys/zm
|
||||
|
||||
loadconf()
|
||||
{
|
||||
if [ -f $ZM_CONFIG ]; then
|
||||
. $ZM_CONFIG
|
||||
else
|
||||
echo "ERROR: $ZM_CONFIG not found."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
loadconf
|
||||
command="$ZM_PATH_BIN/zmpkg.pl"
|
||||
|
||||
start()
|
||||
{
|
||||
# Commenting out as it is not needed. Leaving as a placeholder for future use.
|
||||
# zmupdate || return $?
|
||||
loadconf || return $?
|
||||
#Make sure the directory for our PID folder exists or create one.
|
||||
[ ! -d $pidfile ] \
|
||||
&& mkdir -m 774 $pidfile \
|
||||
&& chown $ZM_WEB_USER:$ZM_WEB_GROUP $pidfile
|
||||
#Make sure the folder for the socks file exists or create one
|
||||
GetPath="select Value from Config where Name='ZM_PATH_SOCKS'"
|
||||
dbHost=`echo $ZM_DB_HOST | cut -d: -f1`
|
||||
dbPort=`echo $ZM_DB_HOST | cut -d: -s -f2`
|
||||
if [ "$dbPort" = "" ]
|
||||
then
|
||||
ZM_PATH_SOCK=`echo $GetPath | mysql -B -h$ZM_DB_HOST -u$ZM_DB_USER -p$ZM_DB_PASS $ZM_DB_NAME | grep -v '^Value'`
|
||||
else
|
||||
ZM_PATH_SOCK=`echo $GetPath | mysql -B -h$dbHost -P$dbPort -u$ZM_DB_USER -p$ZM_DB_PASS $ZM_DB_NAME | grep -v '^Value'`
|
||||
fi
|
||||
[ ! -d $ZM_PATH_SOCK ] \
|
||||
&& mkdir -m 774 $ZM_PATH_SOCK \
|
||||
&& chown $ZM_WEB_USER:$ZM_WEB_GROUP $ZM_PATH_SOCK
|
||||
echo -n $"Starting $prog: "
|
||||
$command start
|
||||
RETVAL=$?
|
||||
[ $RETVAL = 0 ] && success || failure
|
||||
echo
|
||||
[ $RETVAL = 0 ] && touch $LOCKFILE
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
loadconf
|
||||
echo -n $"Stopping $prog: "
|
||||
$command stop
|
||||
RETVAL=$?
|
||||
[ $RETVAL = 0 ] && success || failure
|
||||
echo
|
||||
[ $RETVAL = 0 ] && rm -f $LOCKFILE
|
||||
}
|
||||
|
||||
zmstatus()
|
||||
{
|
||||
loadconf
|
||||
result=`$command status`
|
||||
if [ "$result" = "running" ]; then
|
||||
echo "ZoneMinder is running"
|
||||
$ZM_PATH_BIN/zmu -l
|
||||
RETVAL=0
|
||||
else
|
||||
echo "ZoneMinder is stopped"
|
||||
RETVAL=1
|
||||
fi
|
||||
}
|
||||
|
||||
zmupdate()
|
||||
{
|
||||
if [ -x $ZM_PATH_BIN/zmupdate.pl ]; then
|
||||
$ZM_PATH_BIN/zmupdate.pl -f
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
case "$1" in
|
||||
'start')
|
||||
start
|
||||
;;
|
||||
'stop')
|
||||
stop
|
||||
;;
|
||||
'restart')
|
||||
stop
|
||||
start
|
||||
;;
|
||||
'condrestart')
|
||||
loadconf
|
||||
result=`$ZM_PATH_BIN/zmdc.pl check`
|
||||
if [ "$result" = "running" ]; then
|
||||
$ZM_PATH_BIN/zmdc.pl shutdown > /dev/null
|
||||
rm -f $LOCKFILE
|
||||
start
|
||||
fi
|
||||
;;
|
||||
'status')
|
||||
status httpd
|
||||
status mysqld
|
||||
zmstatus
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 { start | stop | restart | condrestart | status }"
|
||||
RETVAL=1
|
||||
;;
|
||||
esac
|
||||
exit $RETVAL
|
|
@ -1,18 +1,49 @@
|
|||
zoneminder (1.26.4-2) precise; urgency=high
|
||||
zoneminder (1.27.99+1-trusty-SNAPSHOT2014101401) trusty; urgency=medium
|
||||
|
||||
* improvements to zmupdate.pl, cleanups
|
||||
* Several PR merges in big push for 1.28.0
|
||||
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Thu, 03 Oct 2013 11:40:32 -0400
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Tue, 14 Oct 2014 09:28:29 -0400
|
||||
|
||||
zoneminder (1.26.3-1) unstable; urgency=low
|
||||
zoneminder (1.27.99+1-trusty-SNAPSHOT2014092601) trusty; urgency=medium
|
||||
|
||||
* A 'minor' release focusing on performance improvement and bug fixes.
|
||||
* style updates and db fixes for database logging filters
|
||||
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Sun, 22 Sep 2013 09:36:42 +0800
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Fri, 26 Sep 2014 14:44:45 -0400
|
||||
|
||||
zoneminder (1.25.1-1) unstable; urgency=low
|
||||
zoneminder (1.27.99+1-trusty-SNAPSHOT2014090801) trusty; urgency=medium
|
||||
|
||||
* Initial Version.
|
||||
* several segfault fixes for local cameras
|
||||
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Mon, 29 Apr 2013 12:38:00 -0400
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Mon, 08 Sep 2014 16:56:57 -0400
|
||||
|
||||
zoneminder (1.27.99+1-trusty-SNAPSHOT2014090701) trusty; urgency=medium
|
||||
|
||||
* Fix segfaults for local cameras, also now includes the systemd support patch
|
||||
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Sun, 07 Sep 2014 17:19:01 -0400
|
||||
|
||||
zoneminder (1.27.99+1-trusty-SNAPSHOT2014082102) trusty; urgency=medium
|
||||
|
||||
* Fix UI inputs for v4l multibuffer and captures per frame
|
||||
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Thu, 21 Aug 2014 12:03:31 -0400
|
||||
|
||||
zoneminder (1.27.99+1-trusty-SNAPSHOT2014082101) trusty; urgency=medium
|
||||
|
||||
* fall back to Config table values for V4l MultiBUffer and Captures Per Frame
|
||||
* add mention of monitor page settings for thse in the config table
|
||||
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Thu, 21 Aug 2014 10:04:46 -0400
|
||||
|
||||
zoneminder (1.27.99+1-precise-SNAPSHOT2014080601) precise; urgency=medium
|
||||
|
||||
* improve error messages
|
||||
* Make zmupdate re-run the most recent patch so that people running the daily builds get their db updates
|
||||
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Wed, 06 Aug 2014 20:20:20 -0400
|
||||
|
||||
zoneminder (1.27.0+1-trusty-v4ltomonitor-1) trusty; urgency=high
|
||||
|
||||
* Snapshot release -
|
||||
|
||||
-- Isaac Connor <iconnor@connortechnology.com> Wed, 09 Jul 2014 21:35:29 -0400
|
||||
|
|
|
@ -2,13 +2,32 @@ Source: zoneminder
|
|||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: Isaac Connor <iconnor@connortechnology.com>
|
||||
Build-Depends: debhelper (>= 5), autoconf, automake, dpatch, libphp-serialization-perl, libgnutls-dev, libmysqlclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, ffmpeg, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libpcre3, libarchive-zip-perl, libmime-lite-perl, libjpeg8, dh-autoreconf
|
||||
Build-Depends: debhelper (>= 7.0.50), autoconf, automake, dpatch, libphp-serialization-perl, libgnutls-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, ffmpeg | libav-tools, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libpcre3, libarchive-zip-perl, libmime-lite-perl, libjpeg8, dh-autoreconf, libvlccore-dev, libvlc-dev, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libgcrypt11-dev, libpolkit-gobject-1-dev
|
||||
Standards-Version: 3.9.2
|
||||
|
||||
Package: zoneminder
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2, libapache2-mod-php5, php5, php5-mysql, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-lite-perl, mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, ffmpeg, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53, libjpeg8, zip, libnet-sftp-foreign-perl
|
||||
Description: Linux video camera security and surveillance solution
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2, libapache2-mod-php5 | libapache2-mod-fcgid, php5, php5-mysql|php5-mysqlnd, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl, mariadb-client|mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, ffmpeg | libav-tools, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53, libjpeg8, zip, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl, libvlccore5 | libvlccore7 | libvlccore8, libvlc5, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libpolkit-gobject-1-0
|
||||
Recommends: mysql-server|mariadb-server
|
||||
Description: A video camera security and surveillance solution
|
||||
ZoneMinder is intended for use in single or multi-camera video security
|
||||
applications, including commercial or home CCTV, theft prevention and child
|
||||
or family member or home monitoring and other care scenarios. It
|
||||
supports capture, analysis, recording, and monitoring of video data coming
|
||||
from one or more video or network cameras attached to a Linux system.
|
||||
ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom
|
||||
cameras using a variety of protocols. It is suitable for use as a home
|
||||
video security system and for commercial or professional video security
|
||||
and surveillance. It can also be integrated into a home automation system
|
||||
via X.10 or other protocols.
|
||||
|
||||
Package: zoneminder-dbg
|
||||
Architecture: any
|
||||
Depends:
|
||||
zoneminder (= ${binary:Version}),
|
||||
${misc:Depends}
|
||||
Description: debugging syumbols for zoneminder.
|
||||
ZoneMinder is a video camera security and surveillance solution.
|
||||
ZoneMinder is intended for use in single or multi-camera video security
|
||||
applications, including commercial or home CCTV, theft prevention and child
|
||||
or family member or home monitoring and other care scenarios. It
|
||||
|
|
|
@ -25,7 +25,6 @@ start() {
|
|||
echo -n "Starting $prog: "
|
||||
mkdir -p $RUNDIR && chown www-data:www-data $RUNDIR
|
||||
mkdir -p $TMPDIR && chown www-data:www-data $TMPDIR
|
||||
zmfix -a
|
||||
$command start
|
||||
RETVAL=$?
|
||||
[ $RETVAL = 0 ] && echo success
|
||||
|
|
|
@ -2,44 +2,36 @@
|
|||
|
||||
set -e
|
||||
|
||||
VERSION=1.26.4
|
||||
|
||||
if [ "$1" = "configure" ]; then
|
||||
#
|
||||
# Get mysql started if it isn't
|
||||
#
|
||||
if ! $(/etc/init.d/mysql status >/dev/null 2>&1); then
|
||||
invoke-rc.d mysql start
|
||||
fi
|
||||
if $(/etc/init.d/mysql status >/dev/null 2>&1); then
|
||||
mysqladmin --defaults-file=/etc/mysql/debian.cnf -f reload
|
||||
# test if database if already present...
|
||||
if ! $(echo quit | mysql --defaults-file=/etc/mysql/debian.cnf zm > /dev/null 2> /dev/null) ; then
|
||||
cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf
|
||||
echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
|
||||
fi
|
||||
if [ -e "/etc/init.d/mysql" ]; then
|
||||
#
|
||||
# Get mysql started if it isn't
|
||||
#
|
||||
if ! $(/etc/init.d/mysql status >/dev/null 2>&1); then
|
||||
invoke-rc.d mysql start
|
||||
fi
|
||||
if $(/etc/init.d/mysql status >/dev/null 2>&1); then
|
||||
mysqladmin --defaults-file=/etc/mysql/debian.cnf -f reload
|
||||
# test if database if already present...
|
||||
if ! $(echo quit | mysql --defaults-file=/etc/mysql/debian.cnf zm > /dev/null 2> /dev/null) ; then
|
||||
cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf
|
||||
echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
|
||||
fi
|
||||
|
||||
# get old version from upgrade...
|
||||
OLD_ZM_VERSION=${2%-*}
|
||||
if [ -z "$OLD_ZM_VERSION" ]; then
|
||||
# fall back to getting version from database itself, which may not necessarily be accurate?
|
||||
OLD_ZM_VERSION=$(echo 'select Value from Config where Name = "ZM_DYN_CURR_VERSION";' | mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names zm )
|
||||
fi
|
||||
if [ -n "$OLD_ZM_VERSION" ] && [ "$OLD_ZM_VERSION" != "$VERSION" ] ; then
|
||||
echo 'grant lock tables, create, alter on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
|
||||
# stop zoneminder before performing database upgrade.
|
||||
invoke-rc.d zoneminder stop || true
|
||||
zmupdate.pl --nointeractive --version $OLD_ZM_VERSION
|
||||
fi
|
||||
invoke-rc.d zoneminder stop || true
|
||||
zmupdate.pl --nointeractive
|
||||
|
||||
else
|
||||
echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.'
|
||||
fi
|
||||
chown www-data:www-data /var/log/zm
|
||||
chown www-data:www-data /var/lib/zm/
|
||||
if [ -z "$2" ]; then
|
||||
chown www-data:www-data -R /var/cache/zoneminder
|
||||
fi
|
||||
else
|
||||
echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.'
|
||||
fi
|
||||
else
|
||||
echo 'mysql not found, assuming remote server.'
|
||||
fi
|
||||
chown www-data:www-data /var/log/zm
|
||||
chown www-data:www-data /var/lib/zm/
|
||||
if [ -z "$2" ]; then
|
||||
chown www-data:www-data -R /var/cache/zoneminder
|
||||
fi
|
||||
fi
|
||||
# Ensure zoneminder is stopped...
|
||||
if [ -x "/etc/init.d/zoneminder" ]; then
|
||||
|
@ -55,10 +47,7 @@ if [ "$1" = "configure" ]; then
|
|||
chown www-data:www-data -R /var/cache/zoneminder
|
||||
else
|
||||
chown www-data:www-data /var/log/zm
|
||||
OLD_ZM_VERSION=${2%-*}
|
||||
if [ "$OLD_ZM_VERSION" != "$VERSION" ] ; then
|
||||
zmupdate.pl --version $OLD_ZM_VERSION
|
||||
fi
|
||||
zmupdate.pl
|
||||
fi
|
||||
fi
|
||||
#DEBHELPER#
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
UPSTREAM_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ' | cut -d - -f 1)
|
||||
POSTINST_VERSION := $(shell egrep ^VERSION= debian/postinst | cut -d = -f 2)
|
||||
|
||||
# These are used for cross-compiling and for saving the configure script
|
||||
# from having to guess our platform (since we know it already)
|
||||
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
||||
|
@ -31,12 +28,9 @@ endif
|
|||
dh $@ --with autoreconf
|
||||
|
||||
override_dh_auto_configure:
|
||||
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --sysconfdir=/etc/zm --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-mysql=/usr --with-webdir=/usr/share/zoneminder --with-ffmpeg=/usr --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-crashtrace=no --enable-mmap=yes
|
||||
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --sysconfdir=/etc/zm --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-mysql=/usr --with-mariadb=/usr --with-webdir=/usr/share/zoneminder --with-ffmpeg=/usr --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-crashtrace=no --enable-mmap=yes
|
||||
|
||||
override_dh_clean:
|
||||
# check to make sure that postinst contains the correct upstream version
|
||||
[ $(UPSTREAM_VERSION) = $(POSTINST_VERSION) ]
|
||||
|
||||
# Add here commands to clean up after the build process.
|
||||
[ ! -f Makefile ] || $(MAKE) distclean
|
||||
dh_clean
|
||||
|
@ -71,3 +65,7 @@ override_dh_fixperms:
|
|||
|
||||
override_dh_auto_test:
|
||||
# do not run tests...
|
||||
|
||||
.PHONY: override_dh_strip
|
||||
override_dh_strip:
|
||||
dh_strip --dbg-package=zoneminder-dbg
|
||||
|
|
|
@ -0,0 +1,177 @@
|
|||
# Makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
SPHINXBUILD = sphinx-build
|
||||
PAPER =
|
||||
BUILDDIR = _build
|
||||
|
||||
# User-friendly check for sphinx-build
|
||||
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
|
||||
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
|
||||
endif
|
||||
|
||||
# Internal variables.
|
||||
PAPEROPT_a4 = -D latex_paper_size=a4
|
||||
PAPEROPT_letter = -D latex_paper_size=letter
|
||||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
||||
# the i18n builder cannot share the environment and doctrees with the others
|
||||
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
||||
|
||||
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
|
||||
|
||||
help:
|
||||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
@echo " html to make standalone HTML files"
|
||||
@echo " dirhtml to make HTML files named index.html in directories"
|
||||
@echo " singlehtml to make a single large HTML file"
|
||||
@echo " pickle to make pickle files"
|
||||
@echo " json to make JSON files"
|
||||
@echo " htmlhelp to make HTML files and a HTML help project"
|
||||
@echo " qthelp to make HTML files and a qthelp project"
|
||||
@echo " devhelp to make HTML files and a Devhelp project"
|
||||
@echo " epub to make an epub"
|
||||
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
||||
@echo " latexpdf to make LaTeX files and run them through pdflatex"
|
||||
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
|
||||
@echo " text to make text files"
|
||||
@echo " man to make manual pages"
|
||||
@echo " texinfo to make Texinfo files"
|
||||
@echo " info to make Texinfo files and run them through makeinfo"
|
||||
@echo " gettext to make PO message catalogs"
|
||||
@echo " changes to make an overview of all changed/added/deprecated items"
|
||||
@echo " xml to make Docutils-native XML files"
|
||||
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
|
||||
@echo " linkcheck to check all external links for integrity"
|
||||
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILDDIR)/*
|
||||
|
||||
html:
|
||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||
|
||||
dirhtml:
|
||||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
||||
|
||||
singlehtml:
|
||||
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
||||
|
||||
pickle:
|
||||
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
||||
@echo
|
||||
@echo "Build finished; now you can process the pickle files."
|
||||
|
||||
json:
|
||||
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
||||
@echo
|
||||
@echo "Build finished; now you can process the JSON files."
|
||||
|
||||
htmlhelp:
|
||||
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
||||
".hhp project file in $(BUILDDIR)/htmlhelp."
|
||||
|
||||
qthelp:
|
||||
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
||||
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
||||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/ZoneMinder.qhcp"
|
||||
@echo "To view the help file:"
|
||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ZoneMinder.qhc"
|
||||
|
||||
devhelp:
|
||||
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
|
||||
@echo
|
||||
@echo "Build finished."
|
||||
@echo "To view the help file:"
|
||||
@echo "# mkdir -p $$HOME/.local/share/devhelp/ZoneMinder"
|
||||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ZoneMinder"
|
||||
@echo "# devhelp"
|
||||
|
||||
epub:
|
||||
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
||||
@echo
|
||||
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
||||
|
||||
latex:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo
|
||||
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
||||
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
||||
"(use \`make latexpdf' here to do that automatically)."
|
||||
|
||||
latexpdf:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo "Running LaTeX files through pdflatex..."
|
||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf
|
||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||
|
||||
latexpdfja:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo "Running LaTeX files through platex and dvipdfmx..."
|
||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
|
||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||
|
||||
text:
|
||||
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
||||
@echo
|
||||
@echo "Build finished. The text files are in $(BUILDDIR)/text."
|
||||
|
||||
man:
|
||||
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
||||
@echo
|
||||
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
||||
|
||||
texinfo:
|
||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||
@echo
|
||||
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
|
||||
@echo "Run \`make' in that directory to run these through makeinfo" \
|
||||
"(use \`make info' here to do that automatically)."
|
||||
|
||||
info:
|
||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||
@echo "Running Texinfo files through makeinfo..."
|
||||
make -C $(BUILDDIR)/texinfo info
|
||||
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
|
||||
|
||||
gettext:
|
||||
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
|
||||
@echo
|
||||
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
|
||||
|
||||
changes:
|
||||
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
||||
@echo
|
||||
@echo "The overview file is in $(BUILDDIR)/changes."
|
||||
|
||||
linkcheck:
|
||||
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
||||
@echo
|
||||
@echo "Link check complete; look for any errors in the above output " \
|
||||
"or in $(BUILDDIR)/linkcheck/output.txt."
|
||||
|
||||
doctest:
|
||||
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
||||
@echo "Testing of doctests in the sources finished, look at the " \
|
||||
"results in $(BUILDDIR)/doctest/output.txt."
|
||||
|
||||
xml:
|
||||
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
|
||||
@echo
|
||||
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
|
||||
|
||||
pseudoxml:
|
||||
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
|
||||
@echo
|
||||
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
|
|
@ -0,0 +1 @@
|
|||
The latest version of these docs can be found at http://zoneminder.readthedocs.org/
|
|
@ -0,0 +1,11 @@
|
|||
{#
|
||||
basic/globaltoc.html
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Sphinx sidebar template: global table of contents.
|
||||
|
||||
:copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS.
|
||||
:license: BSD, see LICENSE for details.
|
||||
#}
|
||||
<h3><a href="{{ pathto(master_doc) }}">{{ _('Table Of Contents') }}</a></h3>
|
||||
{{ toctree(includehidden=True) }}
|
|
@ -0,0 +1,118 @@
|
|||
API
|
||||
===
|
||||
|
||||
This document will provide an overview of ZoneMinder's API.
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
In an effort to further 'open up' ZoneMinder, an API was needed. This will
|
||||
allow quick integration with and development of ZoneMinder.
|
||||
|
||||
The API is built in CakePHP and lives under the ``/api`` directory. It
|
||||
provides a RESTful service and supports CRUD (create, retrieve, update, delete)
|
||||
functions for Monitors, Events, Frames, Zones and Config.
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Here be a list of examples. Some results may be truncated.
|
||||
|
||||
You will see each URL ending in either ``.xml`` or ``.json``. This is the
|
||||
format of the request, and it determines the format that any data returned to
|
||||
you will be in. I like json, however you can use xml if you'd like.
|
||||
|
||||
Return a list of all monitors
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
``curl -XGET http://zmdevapi/monitors.json``
|
||||
|
||||
Retrieve monitor 1
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
``curl -XGET http://zmdevapi/monitors/1.json``
|
||||
|
||||
Add a monitor
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
This command will add a new http monitor.
|
||||
|
||||
``curl -XPOST http://zmdevapi/monitors.js -d "Monitor[Name]=Cliff-Burton \
|
||||
&Monitor[Function]=Modect \
|
||||
&Monitor[Protocol]=http \
|
||||
&Monitor[Method]=simple \
|
||||
&Monitor[Host]=ussr:pass@192.168.11.20 \
|
||||
&Monitor[Port]=80 \
|
||||
&Monitor[Path]=/mjpg/video.mjpg \
|
||||
&Monitor[Width]=704 \
|
||||
&Monitor[Height]=480 \
|
||||
&Monitor[Colours]=4"``
|
||||
|
||||
Edit monitor 1
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
This command will change the 'Name' field of Monitor 1 to 'test1'
|
||||
|
||||
``curl -XPUT http://zmdevapi/monitors/1.json -d "Monitor[Name]=test1"``
|
||||
|
||||
Delete monitor 1
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This command will delete Monitor 1, but will _not_ delete any Events which
|
||||
depend on it.
|
||||
|
||||
|
||||
``curl -XDELETE http://zmdevapi/monitors/1.json``
|
||||
|
||||
Return a list of all events
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
``curl -XGET http://zmdevapi/events.json``
|
||||
|
||||
Retrieve event 1
|
||||
^^^^^^^^^^^^^^^^
|
||||
``curl -XGET http://zmdevapi/events/1.json``
|
||||
|
||||
Edit event 1
|
||||
^^^^^^^^^^^^
|
||||
|
||||
This command will change the 'Name' field of Event 1 to 'Seek and Destroy'
|
||||
|
||||
``curl -XPUT http://zmdevapi/events/1.json -d "Event[Name]=Seek and Destroy"``
|
||||
|
||||
Delete event 1
|
||||
^^^^^^^^^^^^^^
|
||||
This command will delete Event 1, and any Frames which depend on it.
|
||||
|
||||
``curl -XDELETE http://zmdevapi/events/1.json``
|
||||
|
||||
Edit config 121
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
This command will change the 'Value' field of Config 121 to 901.
|
||||
|
||||
``curl -XPUT http://zmdevapi/configs/121.json -d "Config[Value]=901"``
|
||||
|
||||
Create a Zone
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
``curl -XPOST http://zmdevapi/zones.json -d "Zone[Name]=Jason-Newsted \
|
||||
&Zone[MonitorId]=3 \
|
||||
&Zone[Type]=Active \
|
||||
&Zone[Units]=Percent \
|
||||
&Zone[NumCoords]=4 \
|
||||
&Zone[Coords]=0,0 639,0 639,479 0,479 \
|
||||
&Zone[AlarmRGB]=16711680 \
|
||||
&Zone[CheckMethod]=Blobs \
|
||||
&Zone[MinPixelThreshold]=25 \
|
||||
&Zone[MaxPixelThreshold]= \
|
||||
&Zone[MinAlarmPixels]=9216 \
|
||||
&Zone[MaxAlarmPixels]= \
|
||||
&Zone[FilterX]=3 \
|
||||
&Zone[FilterY]=3 \
|
||||
&Zone[MinFilterPixels]=9216 \
|
||||
&Zone[MaxFilterPixels]=230400 \
|
||||
&Zone[MinBlobPixels]=6144 \
|
||||
&Zone[MaxBlobPixels]= \
|
||||
&Zone[MinBlobs]=1 \
|
||||
&Zone[MaxBlobs]= \
|
||||
&Zone[OverloadFrames]=0"``
|
|
@ -0,0 +1,262 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# ZoneMinder documentation build configuration file, created by
|
||||
# sphinx-quickstart on Fri Apr 25 18:31:58 2014.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its
|
||||
# containing dir.
|
||||
#
|
||||
# Note that not all possible configuration values are present in this
|
||||
# autogenerated file.
|
||||
#
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
#needs_sphinx = '1.0'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = []
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'ZoneMinder'
|
||||
copyright = u'2014, https://github.com/ZoneMinder/ZoneMinder/graphs/contributors'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '1.27.0'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '1.27.0'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#language = None
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
#today_fmt = '%B %d, %Y'
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
exclude_patterns = ['_build']
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all
|
||||
# documents.
|
||||
#default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
|
||||
# If true, keep warnings as "system message" paragraphs in the built documents.
|
||||
#keep_warnings = False
|
||||
|
||||
|
||||
# -- Options for HTML output ----------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
html_theme = 'default'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
html_theme_options = {
|
||||
"stickysidebar": "true"
|
||||
}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = []
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
#html_logo = None
|
||||
|
||||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = None
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
|
||||
# Add any extra paths that contain custom files (such as robots.txt or
|
||||
# .htaccess) here, relative to this directory. These files are copied
|
||||
# directly to the root of the documentation.
|
||||
#html_extra_path = []
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
#html_use_smartypants = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
html_sidebars = {
|
||||
'**': ['hiddenglobaltoc.html', 'searchbox.html']
|
||||
}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
#html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
#html_domain_indices = True
|
||||
|
||||
# If false, no index is generated.
|
||||
#html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
#html_show_sphinx = True
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
#html_show_copyright = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
#html_use_opensearch = ''
|
||||
|
||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
#html_file_suffix = None
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'ZoneMinderdoc'
|
||||
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#'papersize': 'letterpaper',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#'pointsize': '10pt',
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#'preamble': '',
|
||||
}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title,
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
latex_documents = [
|
||||
('index', 'ZoneMinder.tex', u'ZoneMinder Documentation',
|
||||
u'https://github.com/ZoneMinder/ZoneMinder/graphs/contributors', 'manual'),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
#latex_use_parts = False
|
||||
|
||||
# If true, show page references after internal links.
|
||||
#latex_show_pagerefs = False
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#latex_show_urls = False
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#latex_domain_indices = True
|
||||
|
||||
|
||||
# -- Options for manual page output ---------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
('index', 'zoneminder', u'ZoneMinder Documentation',
|
||||
[u'https://github.com/ZoneMinder/ZoneMinder/graphs/contributors'], 1)
|
||||
]
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#man_show_urls = False
|
||||
|
||||
|
||||
# -- Options for Texinfo output -------------------------------------------
|
||||
|
||||
# Grouping the document tree into Texinfo files. List of tuples
|
||||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
('index', 'ZoneMinder', u'ZoneMinder Documentation',
|
||||
u'https://github.com/ZoneMinder/ZoneMinder/graphs/contributors', 'ZoneMinder', 'One line description of project.',
|
||||
'Miscellaneous'),
|
||||
]
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#texinfo_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#texinfo_domain_indices = True
|
||||
|
||||
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
||||
#texinfo_show_urls = 'footnote'
|
||||
|
||||
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||
#texinfo_no_detailmenu = False
|
|
@ -0,0 +1,7 @@
|
|||
Contributing
|
||||
============
|
||||
|
||||
1. Check for `open issues <https://github.com/ZoneMinder/ZoneMinder/issues/>`_ or open a fresh issue to start a discussion around a feature idea or a bug.
|
||||
2. Fork the ZoneMinder repository on Github to start making your changes.
|
||||
3. Send a pull request and bug the maintainer until it gets merged and published. Stop by the #zoneminder channel on irc.freenode.net.
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
FAQ
|
||||
===
|
||||
|
||||
This is the FAQ page. Feel free to contribute any FAQs that you think are missing.
|
||||
|
||||
Why can't I view all of my monitors in Montage view?
|
||||
----------------------------------------------------
|
||||
|
||||
1. You will most likely need to increase `mysql_max_connections` in my.cnf.
|
||||
2. If using Firefox, you may need to increase `network.http.max-persistent-connections-per-server` in `about:config`.
|
||||
|
||||
|
||||
How do I enable ZoneMinder's security?
|
||||
--------------------------------------
|
||||
|
||||
You may also consider to use the web server security, for example, htaccess files under Apache, or mod_auth.
|
||||
|
||||
1. In the console, click on Options.
|
||||
2. Check the box next to "ZM_OPT_USE_AUTH".
|
||||
3. Click Save
|
||||
4. You will immediately be asked to login. The username is 'admin' and the password is 'admin'.
|
||||
|
||||
To Manage Users
|
||||
---------------
|
||||
|
||||
1. In main console, go to Options->Users.
|
||||
|
||||
The "Zones" view for a Monitor is blank (I can't see / setup a Zone)
|
||||
--------------------------------------------------------------------
|
||||
|
||||
Snapshots and Zones images are stored in the `images` directory in your webroot.
|
||||
Ensure that the `images` directory is writable by the user which ZoneMinder is
|
||||
running as. If the `images` directory is a symlink, ensure that your web server
|
||||
has access to that directory as well.
|
||||
|
||||
How do the 3 AlarmCheckMethods interact?
|
||||
----------------------------------------
|
||||
|
||||
In example, if I set the alarm % to 5-10% and the filtered and blob to 1-100%, what happens?
|
||||
|
||||
1. If any of the min/max values is 0, the check that the value is applied to is skipped.
|
||||
2. If you have a min-alarmed area and you're below that, then it quits.
|
||||
3. If you have a max-alarmed area and you're above that, then it quits.
|
||||
4. If you're on filtered or blobs
|
||||
|
||||
1. and have a min filtered area that you're below then it quits
|
||||
2. and have a max filtered area that you're above then it quits
|
||||
|
||||
5. If you're on blobs
|
||||
|
||||
1. any blob smaller than the min blob area (if set) is discarded
|
||||
2. any blob larger than the max blob area (if set) is discarded
|
||||
3. If there are less remaining blobs than the minimum-blobs, then it quits.
|
||||
4. If there are more remaining blobs than the maximum-blobs, then it quits.
|
||||
|
||||
If AlarmedPixels is selected, you can only enter min/max pixel threshold and
|
||||
min/max alarmed area. If FilteredPixels is selected, the Blob options are
|
||||
disabled. The Blob check method allows you to specify all options. Filtered
|
||||
adds more checks than alarmed, and blobs adds more checks than filtered. The
|
||||
final 'score' is calculated using final check method.
|
|
@ -0,0 +1,38 @@
|
|||
ZoneMinder Documentation
|
||||
========================
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
|
||||
installationguide/index
|
||||
userguide/index
|
||||
api
|
||||
faq
|
||||
contributing
|
||||
|
||||
Welcome to ZoneMinder's documentation, the following resources are available
|
||||
|
||||
:doc:`installationguide/index`
|
||||
Many distrubution repos only hold older versions of ZoneMinder, current versions contain many bug fixes and updated functionality. Instructions here for installing updated packages or compiling from source.
|
||||
|
||||
:doc:`userguide/index`
|
||||
Guide to setting up ZoneMinder for the first time and detailed guides for using the ZoneMinder front end.
|
||||
|
||||
:doc:`api`
|
||||
Information on using the CakePHP based API for interfacing to ZoneMinder
|
||||
|
||||
:doc:`faq`
|
||||
Frequently Asked Questions
|
||||
|
||||
:doc:`contributing`
|
||||
How to contribute to ZoneMinder. As a community project we always need help, you don't need to be a coder to test or update documentation.
|
||||
|
||||
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
Centos
|
||||
======
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
Debian
|
||||
======
|
||||
|
||||
A fresh build based on master branch running Debian 7 (wheezy)\:
|
||||
::
|
||||
|
||||
root@host:~# aptitude install -y apache2 mysql-server php5 php5-mysql build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libpcre3 libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm automake autoconf libjpeg8-dev libjpeg8 apache2-mpm-prefork libapache2-mod-php5 php5-cli libphp-serialization-perl libgnutls-dev libjpeg8-dev libavcodec-dev libavformat-dev libswscale-dev libavutil-dev libv4l-dev libtool ffmpeg libnetpbm10-dev libavdevice-dev libmime-lite-perl dh-autoreconf dpatch;
|
||||
|
||||
root@host:~# git clone https://github.com/ZoneMinder/ZoneMinder.git zoneminder;
|
||||
root@host:~# cd zoneminder;
|
||||
root@host:~# ln -s distros/debian;
|
||||
root@host:~# dpkg-checkbuilddeps;
|
||||
root@host:~# dpkg-buildpackage;
|
||||
|
||||
One level above you'll now find a deb package matching the architecture of the build host:
|
||||
::
|
||||
|
||||
root@host:~# ls -1 ~/zoneminder*;
|
||||
/root/zoneminder_1.26.4-1_amd64.changes
|
||||
/root/zoneminder_1.26.4-1_amd64.deb
|
||||
/root/zoneminder_1.26.4-1.dsc
|
||||
/root/zoneminder_1.26.4-1.tar.gz
|
||||
|
||||
The dpkg command itself does not resolve dependencies. That's what high-level interfaces like aptitude and apt-get are normally for. Unfortunately, unlike RPM, there's no easy way to install a separate deb package not contained with any repository.
|
||||
|
||||
To overcome this "limitation" we'll use dpkg only to install the zoneminder package and apt-get to fetch all needed dependencies afterwards. Running dpkg-reconfigure in the end will ensure that the setup scripts e.g. for database provisioning were executed.
|
||||
::
|
||||
|
||||
root@host:~# dpkg -i /root/zoneminder_1.26.4-1_amd64.deb; apt-get install -f;
|
||||
root@host:~# dpkg-reconfigure zoneminder;
|
||||
|
||||
Alternatively you may also use gdebi to automatically resolve dependencies during installation:
|
||||
::
|
||||
|
||||
root@host:~# aptitude install -y gdebi;
|
||||
root@host:~# gdebi /root/zoneminder_1.26.4-1_amd64.deb;
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
Fedora
|
||||
======
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
Installation Guide
|
||||
======================================
|
||||
|
||||
Contents:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
ubuntu
|
||||
debian
|
||||
fedora
|
||||
centos
|
|
@ -0,0 +1,56 @@
|
|||
Ubuntu
|
||||
======
|
||||
|
||||
PPA Install
|
||||
-----------
|
||||
Follow these instructions to install current release version on Ubuntu 13.04 or under.:
|
||||
|
||||
sudo apt-add-repository ppa:iconnor/zoneminder
|
||||
|
||||
Or Ubuntu 14.10 you will need to install the Snapshot PPA from the master branch instead.:
|
||||
|
||||
sudo apt-add-repository ppa:iconnor/zoneminder-master
|
||||
|
||||
Once you have updated the repository then update and install the package.:
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install zoneminder
|
||||
|
||||
|
||||
|
||||
Build Package From Source
|
||||
-------------------------
|
||||
|
||||
A fresh build based on master branch running Ubuntu 1204 LTS. Will likely work for other versions as well.::
|
||||
|
||||
root@host:~# aptitude install -y apache2 mysql-server php5 php5-mysql build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libpcre3 libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm automake autoconf libjpeg8-dev libjpeg8 apache2-mpm-prefork libapache2-mod-php5 php5-cli libphp-serialization-perl libgnutls-dev libjpeg8-dev libavcodec-dev libavformat-dev libswscale-dev libavutil-dev libv4l-dev libtool ffmpeg libnetpbm10-dev libavdevice-dev libmime-lite-perl dh-autoreconf dpatch;
|
||||
|
||||
root@host:~# git clone https://github.com/ZoneMinder/ZoneMinder.git zoneminder;
|
||||
root@host:~# cd zoneminder;
|
||||
root@host:~# ln -s distros/ubuntu1204 debian;
|
||||
root@host:~# dpkg-checkbuilddeps;
|
||||
root@host:~# dpkg-buildpackage;
|
||||
|
||||
|
||||
One level above you'll now find a deb package matching the architecture of the build host\:::
|
||||
|
||||
root@host:~# ls -1 ~/zoneminder\*;
|
||||
/root/zoneminder_1.26.4-1_amd64.changes
|
||||
/root/zoneminder_1.26.4-1_amd64.deb
|
||||
/root/zoneminder_1.26.4-1.dsc
|
||||
/root/zoneminder_1.26.4-1.tar.gz
|
||||
|
||||
|
||||
The dpkg command itself does not resolve dependencies. That's what high-level interfaces like aptitude and apt-get are normally for. Unfortunately, unlike RPM, there's no easy way to install a separate deb package not contained with any repository.
|
||||
|
||||
To overcome this "limitation" we'll use dpkg only to install the zoneminder package and apt-get to fetch all needed dependencies afterwards. Running dpkg-reconfigure in the end will ensure that the setup scripts e.g. for database provisioning were executed.::
|
||||
|
||||
root@host:~# dpkg -i /root/zoneminder_1.26.4-1_amd64.deb; apt-get install -f;
|
||||
root@host:~# dpkg-reconfigure zoneminder;
|
||||
|
||||
Alternatively you may also use gdebi to automatically resolve dependencies during installation\:::
|
||||
|
||||
root@host:~# aptitude install -y gdebi;
|
||||
root@host:~# gdebi /root/zoneminder_1.26.4-1_amd64.deb;
|
||||
|
||||
sudo apt-get install apache2 mysql-server php5 php5-mysql build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libpcre3 libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm automake autoconf libjpeg-turbo8-dev libjpeg-turbo8 apache2-mpm-prefork libapache2-mod-php5 php5-cli
|
|
@ -0,0 +1,195 @@
|
|||
Camera Control
|
||||
==============
|
||||
|
||||
ZoneMinder provides the facility to control cameras from the web interface and to some extent automatically. Pan/Tilt/Zoom (PTZ) cameras have a wide range of capabilities and use a large number of different protocols making any kind of generic control solution potentially very difficult. To address this ZoneMinder uses two key approaches to get around this problem.
|
||||
|
||||
Definition of Capabilities
|
||||
For each camera model you use, an entry in the camera capabilities table must be created. These indicate what functions the camera supports and ensure that the interface presents only those capabilities that the camera supports. There are a very large number of capabilities that may be supported and it is very important that the entries in this table reflect the actual abilities of the camera. A small number of example capabilities are included in ZoneMinder, these can be used ‘as is’ or modified.
|
||||
|
||||
Control Scripts
|
||||
ZoneMinder itself does not generally provide the ability to send commands to cameras or receive responses. What it does is mediate motion requests from the web interface into a standard set of commands which are passed to a script defined in the control capability. Example scripts are provided in ZoneMinder which support a number of serial or network protocols but it is likely that for many cameras new scripts will have to be created. These can be modelled on the example ones, or if control commands already exist from other applications, then the script can just act as a ‘glue’ layer between ZoneMinder and those commands.
|
||||
|
||||
It should be emphasised that the control and capability elements of ZoneMinder are not intended to be able to support every camera out of the box. Some degree of development is likely to be required for many cameras.
|
||||
|
||||
Control Capabilities
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
If you have a camera that supports PTZ controls and wish to use it with ZoneMinder then the first thing you need to do is ensure that it has an accurate entry in the capabilities table. To do this you need to go to the Control tab of the Monitor configuration dialog and select ‘Edit’ where it is listed by the Control Type selection box. This will bring up a new window which lists, with a brief summary, the existing capabilities. To edit an existing capability to modify select the Id or Name of the capability in question, or click on the Add button to add a new control capability. Either of these approaches will create a new window, in familiar style, with tabs along the top and forms fields below. In the case of the capabilities table there are a large number of settings and tabs, the mean and use of these are briefly explained below.
|
||||
|
||||
Main Tab
|
||||
--------
|
||||
Name
|
||||
This is the name of the control capability, it will usually make sense to name capabilities after the camera model or protocol being used.
|
||||
Type
|
||||
Whether the capability uses a local (usually serial) or network control protocol.
|
||||
Command
|
||||
This is the full path to a script or application that will map the standard set of ZoneMinder control commands to equivalent control protocol command. This may be one of the shipped example zmcontrol-\*.pl scripts or something else entirely.
|
||||
Can Wake
|
||||
This is the first of the actual capability definitions. Checking this box indicates that a protocol command exists to wake up the camera from a sleeping state.
|
||||
Can Sleep
|
||||
The camera can be put to sleep.
|
||||
Can Reset
|
||||
The camera can be reset to a previously defined state.
|
||||
|
||||
Move Tab
|
||||
--------
|
||||
Can Move
|
||||
The camera is able move, i.e. pan or tilt.
|
||||
Can Move Diagonally
|
||||
The camera can move diagonally. Some devices can move only vertically or horizontally at a time.
|
||||
Can Move Mapped
|
||||
The camera is able internally map a point on an image to a precise degree of motion to centre that point in the image.
|
||||
Can Move Absolute
|
||||
The camera can move to an absolute location.
|
||||
Can Move Relative
|
||||
The camera can more to a relative location, e.g. 7 point left or up.
|
||||
Can Move Continuous
|
||||
The camera can move continuously in a defined direction until told to stop or the movement limits are reached, e.g. left.
|
||||
|
||||
Pan Tab
|
||||
-------
|
||||
Can Pan
|
||||
The camera can pan, or move horizontally.
|
||||
Min/Max Pan Range
|
||||
If the camera supports absolute motion this is the minimum and maximum pan co-ordinates that may be specified, e.g. -100 to 100.
|
||||
Min/Man Pan Step
|
||||
If the camera supports relative motion, this is the minimum and maximum amount of movement that can be specified.
|
||||
Has Pan Speed
|
||||
The camera supports specification of pan speeds.
|
||||
Min/Max Pan Speed
|
||||
The minimum and maximum pan speed supported.
|
||||
Has Turbo Pan
|
||||
The camera supports an additional turbo pan speed.
|
||||
Turbo Pan Speed
|
||||
The actual turbo pan speed.
|
||||
|
||||
Tilt Tab
|
||||
--------
|
||||
Definition of Tilt capabilities, fields as for ‘Pan’ tab.
|
||||
|
||||
Zoom Tab
|
||||
--------
|
||||
Can Zoom
|
||||
The camera can zoom.
|
||||
Can Zoom Absolute
|
||||
The camera can zoom to an absolute position.
|
||||
Can Zoom Relative
|
||||
The camera can zoom to a relative position.
|
||||
Can Zoom Continuous
|
||||
The camera can zoom continuously in or out until told to stop or the zoom limits are reached.
|
||||
Min/Max Zoom Range
|
||||
If the camera supports absolute zoom this is the minimum and maximum zoom amounts that may be specified.
|
||||
Min/Man Zoom Step
|
||||
If the camera supports relative zoom, this is the minimum and maximum amount of zoom change that can be specified.
|
||||
Has Zoom Speed
|
||||
The camera supports specification of zoom speed.
|
||||
Min/Max Zoom Speed
|
||||
The minimum and maximum zoom speed supported.
|
||||
|
||||
Focus Tab
|
||||
---------
|
||||
Definition of Focus capabilities, fields as for ‘Zoom’ tab, but with the following additional capability.
|
||||
|
||||
Can Auto Focus
|
||||
The camera can focus automatically.
|
||||
|
||||
White Tab
|
||||
---------
|
||||
Definition of White Balance capabilities, fields as for ‘Focus’ tab.
|
||||
|
||||
Iris Tab
|
||||
--------
|
||||
Definition of Iris Control capabilities, fields as for ‘Focus’ tab.
|
||||
|
||||
Presets Tab
|
||||
-----------
|
||||
|
||||
Has Presets
|
||||
The camera supports preset positions.
|
||||
Num Presets
|
||||
How many presets the camera supports. If the camera supports a huge number of presets then it makes sense to specify a more reasonable number here, 20 or less is recommended.
|
||||
Has Home Preset
|
||||
The camera has a defined ‘home’ position, usually in the mid point of its range.
|
||||
Can Set Presets
|
||||
The camera supports setting preset locations via its control protocol.
|
||||
|
||||
Control Scripts
|
||||
^^^^^^^^^^^^^^^
|
||||
The second key element to controlling cameras with ZoneMinder is ensuring that an appropriate control script or application is present. A small number of sample scripts are included with ZoneMinder and can be used directly or as the basis for development. Control scripts are run atomically, that is to say that one requested action from the web interface results in one execution of the script and no state information is maintained. If your protocol requires state information to be preserved then you should ensure that your scripts do this as ZoneMinder has no concept of the state of the camera in control terms.
|
||||
|
||||
If you are writing a new control script then you need to ensure that it supports the parameters that ZoneMinder will pass to it. If you already have scripts or applications that control your cameras, the ZoneMinder control script will just act as glue to convert the parameters passed into a form that your existing application understands. If you are writing a script to support a new protocol then you will need to convert the parameters passed into the script to equivalent protocol commands. If you have carefully defined your control capabilities above then you should only expect commands that correspond to those capabilities.
|
||||
|
||||
The standard set of parameters passed to control scripts is defined below,
|
||||
|
||||
--device=<device> : This is the control device from the monitor definition. Absent if no device is specified.
|
||||
|
||||
--address=<address> : This is the control address from the monitor definition. This will usually be a hostname or ip address for network cameras or a simple numeric camera id for other cameras.
|
||||
|
||||
--autostop=<timeout> : This indicates whether an automatic timeout should be applied to '''stop''' the given command. It will only be included for '''continuous''' commands, as listed below, and will be a timeout in decimal seconds, probably fractional.
|
||||
|
||||
--command=<command> : This specifies the command that the script should execute. Valid commands are given below.
|
||||
|
||||
--xcoord=<x>, --ycoord=<y> : This specifies the x and/or y coordinates for commands which require them. These will normally be absolute or mapped commands.
|
||||
|
||||
--width=<width>'', ''--height=<height> : This specifies the width and height of the current image, for mapped motion commands where the coordinates values passed must have a context.
|
||||
|
||||
--speed=<speed> : This specifies the speed that the command should use, if appropriate.
|
||||
|
||||
--panspeed=<speed>'', ''--tiltspeed=<speed> : This indicates the specific pan and tilt speeds for diagonal movements which may allow a different motion rate for horizontal and vertical components.
|
||||
|
||||
--step=<step> : This specifies the amount of motion that the command should use, if appropriate. Normally used for relative commands only.
|
||||
|
||||
--panstep=<step>'', ''--tiltstep=<step> : This indicates the specific pan and tilt steps for diagonal movements which may allow a different amount of motion for horizontal and vertical components.
|
||||
|
||||
--preset=<preset> : This specifies the particular preset that relevant commands should operate on.
|
||||
|
||||
The *command* option listed above may take one of the following commands as a parameter.
|
||||
|
||||
wake
|
||||
Wake the camera.
|
||||
sleep
|
||||
Send the camera to sleep.
|
||||
reset
|
||||
Reset the camera.
|
||||
move_map
|
||||
Move mapped to a specified location on the image.
|
||||
move_pseudo_map
|
||||
As move_map above. Pseudo-mapped motion can be used when mapped motion is not supported but relative motion is in which case mapped motion can be roughly approximated by careful calibration.
|
||||
move_abs_<direction>
|
||||
Move to a specified absolute location. The direction element gives a hint to the direction to go but can be omitted. If present it will be one of "up", "down", "left", "right", "upleft", "upright", "downleft" or "downright".
|
||||
move_rel_<direction>
|
||||
Move a specified amount in the given direction.
|
||||
move_con_<direction>
|
||||
Move continuously in the given direction until told to stop.
|
||||
move_stop
|
||||
Stop any motion which may be in progress.
|
||||
zoom_abs_<direction>
|
||||
Zoom to a specified absolute zoom position. The direction element gives a hint to the direction to go but can be omitted. If present it will be one of "tele" or "wide".
|
||||
zoom_rel_<direction>
|
||||
Zoom a specified amount in the given direction.
|
||||
zoom_con_<direction>
|
||||
Zoom continuously in the given direction until told to stop.
|
||||
zoom_stop
|
||||
Stop any zooming which may be in progress.
|
||||
focus_auto
|
||||
Set focusing to be automatic.
|
||||
focus_man
|
||||
Set focusing to be manual.
|
||||
focus_abs_<direction>
|
||||
Focus to a specified absolute focus position. The direction element gives a hint to the direction to go but can be omitted. If present it will be one of "near" or "far".
|
||||
focus_rel_<direction>
|
||||
Focus a specified amount in the given direction.
|
||||
focus_con_<direction>
|
||||
Focus continuously in the given direction until told to stop.
|
||||
focus_stop
|
||||
Stop any focusing which may be in progress.
|
||||
white_<subcommand>
|
||||
As per the focus commands, except that direction may be "in" or "out".
|
||||
iris_<subcommand>
|
||||
As per the focus commands, except that direction may be "open" or "close".
|
||||
preset_set
|
||||
Set the given preset to the current location.
|
||||
preset_goto
|
||||
Move to the given preset.
|
||||
preset_home
|
||||
Move to the "home" preset.
|
|
@ -0,0 +1,91 @@
|
|||
Components
|
||||
==========
|
||||
|
||||
ZoneMinder is not a single monolithic application but is formed from several components. These components primarily include executable compiled binaries which do the main video processing work, perl scripts which usually perform helper and/or external interface tasks and php web scripts which are used for the web interface.
|
||||
|
||||
A brief description of each of the principle components follows.
|
||||
|
||||
Binaries
|
||||
--------
|
||||
**zmc**
|
||||
This is the ZoneMinder Capture daemon. This binary's job is to sit on a video device and suck frames off it as fast as possible, this should run at more or less constant speed.
|
||||
**zma**
|
||||
This is the ZoneMinder Analysis daemon. This is the component that goes through the captured frames and checks them for motion which might generate an alarm or event. It generally keeps up with the Capture daemon but if very busy may skip some frames to prevent it falling behind.
|
||||
**zmf**
|
||||
This is the ZoneMinder Frame daemon. This is an optional daemon that can run in concert with the Analysis daemon and whose function it is to actually write captured frames to disk. This frees up the Analysis daemon to do more analysis (!) and so keep up with the Capture daemon better. If it isn’t running or dies then the Analysis daemon just writes them itself.
|
||||
**zms**
|
||||
This is the ZoneMinder Streaming server. The web interface connects with this to get real-time or historical streamed images. It runs only when a live monitor stream or event stream is actually being viewed and dies when the event finishes or the associate web page is closed. If you find you have several zms processes running when nothing is being viewed then it is likely you need a patch for apache (see the Troubleshooting section). A non-parsed header version of zms, called nph-zms, is also installed and may be used instead depending on your web server configuration.
|
||||
**zmu**
|
||||
This is the ZoneMinder Utility. It's basically a handy command line interface to several useful functions. It’s not really meant to be used by anyone except the web page (there's only limited 'help' in it so far) but can be if necessary, especially for debugging video problems.
|
||||
|
||||
PHP
|
||||
---
|
||||
As well as this there are the web PHP files in the web directory. Currently these consist of 4 possible skins.
|
||||
|
||||
**Classic**
|
||||
Original ZoneMinder skin
|
||||
**Flat**
|
||||
An updated version of classic skin, retaining the same layout with a more modern style
|
||||
**XMl**
|
||||
Used by eyeZM as an interfacing skin
|
||||
**Mobile**
|
||||
[Check status and purpose]
|
||||
|
||||
Perl
|
||||
----
|
||||
Finally some perl scripts in the scripts directory. These scripts all have some configuration at the top of the files which should be viewed and amended if necessary and are as follows.
|
||||
|
||||
**zmpkg.pl**
|
||||
This is the ZoneMinder Package Control script. This is used by the web interface and service scripts to control the execution of the system as a whole.
|
||||
**zmdc.pl**
|
||||
This is the ZoneMinder Daemon Control script. This is used by the web interface and the zmpkg.pl script to control and maintain the execution of the capture and analysis daemons, amongst others. You should not need to run this script yourself.
|
||||
**zmfilter.pl**
|
||||
This script controls the execution of saved filters and will be started and stopped by the web interface based on whether there are filters that have been defined to be autonomous. This script is also responsible for the automatic uploading of events to a 3rd party server.
|
||||
**zmaudit.pl**
|
||||
This script is used to check the consistency of the event file system and database. It can delete orphaned events, i.e. ones that appear in one location and not the other as well as checking that all the various event related tables are in line. It can be run interactively or in batch mode either from the command line or a cron job or similar. In the zmconfig.pl there is an option to specify fast event deletes where the web interface only deletes the event entry from the database itself. If this is set then it is this script that tidies up the rest.
|
||||
**zmwatch.pl**
|
||||
This is a simple script purely designed to keep an eye on the capture daemons and restart them if they lockup. It has been known for sync problems in the video drivers to cause this so this script makes sure that nothing important gets missed.
|
||||
**zmupdate.pl**
|
||||
Currently this script is responsible for checking whether a new version of ZoneMinder is available and other miscellaneous actions related to upgrades and migrations. It is also intended to be a ‘one stop shop’ for any upgrades and will execute everything necessary to update your installation to a new version.
|
||||
**zmvideo.pl**
|
||||
This script is used from the web interface to generate video files in various formats in a common way. You can also use it from the command line in certain circumstances but this is not usually necessary.
|
||||
**zmx10.pl**
|
||||
This is an optional script that can be used to initiate and monitor X10 Home Automation style events and interface with an alarm system either by the generation of X10 signals on ZoneMinder events or by initiating ZoneMinder monitoring and capture on receipt of X10 signals from elsewhere, for instance the triggering of an X10 PIR. For example I have several cameras that don’t do motion detection until I arm my alarm system whereupon they switch to active mode when an X10 signal is generated by the alarm system and received by ZoneMinder.
|
||||
**zmtrigger.pl**
|
||||
This is an optional script that is a more generic solution to external triggering of alarms. It can handle external connections via either internet socket, unix socket or file/device interfaces. You can either use it ‘as is’ if you can interface with the existing format, or override connections and channels to customise it to your needs. The format of triggers used by zmtrigger.pl is as follows "<id>|<action>|<score>|<cause>|<text>|<showtext>" where
|
||||
|
||||
* 'id' is the id number or name of the ZM monitor.
|
||||
* 'action' is 'on', 'off', 'cancel' or ‘show’ where 'on' forces an alarm condition on, 'off' forces an alarm condition off and 'cancel' negates the previous 'on' or 'off'. The ‘show’ action merely updates some auxiliary text which can optionally be displayed in the images captured by the monitor. Ordinarily you would use 'on' and 'cancel', 'off' would tend to be used to suppress motion based events. Additionally 'on' and 'off' can take an additional time offset, e.g. on+20 which automatically 'cancel's the previous action after that number of seconds.
|
||||
* 'score' is the score given to the alarm, usually to indicate it's importance. For 'on' triggers it should be non-zero, otherwise it should be zero.
|
||||
* 'cause' is a 32 char max string indicating the reason for, or source of the alarm e.g. 'Relay 1 open'. This is saved in the ‘Cause’ field of the event. Ignored for 'off' or 'cancel' messages.
|
||||
* 'text' is a 256 char max additional info field, which is saved in the ‘Description’ field of an event. Ignored for 'off' or 'cancel' messages.
|
||||
* 'showtext' is up to 32 characters of text that can be displayed in the timestamp that is added to images. The ‘show’ action is designed to update this text without affecting alarms but the text is updated, if present, for any of the actions. This is designed to allow external input to appear on the images captured, for instance temperature or personnel identity etc.
|
||||
|
||||
Note that multiple messages can be sent at once and should be LF or CRLF delimited. This script is not necessarily intended to be a solution in itself, but is intended to be used as ‘glue’ to help ZoneMinder interface with other systems. It will almost certainly require some customisation before you can make any use of it. If all you want to do is generate alarms from external sources then using the ZoneMinder::SharedMem perl module is likely to be easier.
|
||||
**zmcamtool.pl**
|
||||
This optional script is new for the upcoming 1.27 release of ZoneMinder. It is intended to make it easy to do the following: bring in new ptz controls and camera presets, convert existing monitors into presets, and export custom ptz controls and presets. For the initial release, this script is not integrated into the UI and must be called from the command line. Type ''zmcamtool.pl --help'' from the command line to get an explanation of the different arguments one can pass to the script.
|
||||
**zmcontrol-\*.pl**
|
||||
These are a set of example scripts which can be used to control Pan/Tilt/Zoom class cameras. Each script converts a set of standard parameters used for camera control into the actual protocol commands sent to the camera. If you are using a camera control protocol that is not in the shipped list then you will have to create a similar script though it can be created entirely separately from ZoneMinder and does not need to named as these scripts are. Although the scripts are used to action commands originated from the web interface they can also be used directly or from other programs or scripts, for instance to implement periodic scanning to different presets.
|
||||
**zmtrack.pl**
|
||||
This script is used to manage the experimental motion tracking feature. It is responsible for detecting that an alarm is taking place and moving the camera to point to the alarmed location, and then subsequently returning it to a defined standby location. As well as moving the camera it also controls when motion detection is suspended and restored so that the action of the camera tracking does not trigger endless further alarms which are not justified.
|
||||
**zm**
|
||||
This is the (optional) ZoneMinder init script, see below for details.
|
||||
|
||||
Finally, there are also a number of ZoneMinder perl modules included. These are used by the scripts above, but can also be used by your own or 3rd party scripts. Full documentation for most modules is available in ‘pod’ form via ‘perldoc’ but the general purpose of each module is as follows.
|
||||
|
||||
**ZoneMinder.pm**
|
||||
This is a general ZoneMinder container module. It includes the Base.pm, Config.pm Debug.pm, Database.pm, and SharedMem.pm modules described below. It also exports all of their symbols by default. If you use the other modules directly you have request which symbol tags to import.
|
||||
**ZoneMinder/Base.pm**
|
||||
This is the base ZoneMinder perl module. It contains only simple data such as version information. It is included by all other ZoneMinder perl modules
|
||||
**ZoneMinder/Config.pm**
|
||||
This module imports the ZoneMinder configuration from the database.
|
||||
**ZoneMinder/Debug.pm**
|
||||
This module contains the defined Debug and Error functions etc, that are used by scripts to produce diagnostic information in a standard format.
|
||||
**ZoneMinder/Database.pm**
|
||||
This module contains database access definitions and functions. Currently not a lot is in this module but it is included as a placeholder for future development.
|
||||
**ZoneMinder/SharedMem.pm**
|
||||
This module contains standard shared memory access functions. These can be used to access the current state of monitors etc as well as issuing commands to the monitors to switch things on and off. This module effectively provides a ZoneMinder API.
|
||||
**ZoneMinder/ConfigAdmin.pm**
|
||||
This module is a specialised module that contains the definition, and other information, about the various configuration options. It is not intended for use by 3rd parties.
|
||||
**ZoneMinder/Trigger/\*.pm**
|
||||
These modules contain definitions of trigger channels and connections used by the zmtrigger.pl script. Although they can be used ‘as is’, they are really intended as examples that can be customised or specialised for different interfaces. Contributed modules for new channels or connections will be welcomed and included in future versions of ZoneMinder.
|
|
@ -0,0 +1,8 @@
|
|||
Controlling Monitors
|
||||
====================
|
||||
|
||||
If you have defined your system as having controllable monitors and you are looking at a monitor that is configured for control, then clicking on the ‘Control’ link along the top of the window will change the short event listing area to a control area. The capabilities you have defined earlier determine exactly what is displayed in this window. Generally you will have a Pan/Tilt control area along with one or subsidiary areas such as zoom or focus control to the side. If you have preset support then these will be near the bottom of the window. The normal method of controlling the monitor is by clicking on the appropriate graphics which then send a command via the control script to the camera itself. This may sometimes take a noticeable delay before the camera responds.
|
||||
|
||||
It is usually the case that the control arrows are sensitive to where you click on them. If you have a camera that allows different speeds to be used for panning or zooming etc then clicking near the point of the arrow will invoke the faster speed whilst clicking near the base of the arrow will be slower. If you have defined continuous motion then ongoing activities can be stopped by clicking on the area between the arrows, which will either be a graphic in the case of pan/tilt controls or a word in the case of zoom and focus controls etc.
|
||||
|
||||
Certain control capabilities such as mapped motion allow direct control by clicking on the image itself when used in browsers which support streamed images directly. Used in this way you can just click on the area of the image that interests you and the camera will centre on that spot. You can also use direct image control for relative motion when the area of the image you click on defines the direction and the distance away from the centre of the image determines the speed. As it is not always very easy to estimate direction near the centre of the image, the active area does not start until a short distance away from the centre, resulting in a ‘dead’ zone in the middle of the image.
|
|
@ -0,0 +1,200 @@
|
|||
Defining Monitors
|
||||
=================
|
||||
|
||||
To use ZoneMinder properly you need to define at least one Monitor. Essentially, a monitor is associated with a camera and can continually check it for motion detection and such like.
|
||||
|
||||
There are a small number of camera setups that ZoneMinder knows about and which can be accessed by clicking on the ‘Presets’ link. Selecting one of the presets will fill in the monitor configuration with appropriate values but you will still need to enter others and confirm the preset settings.
|
||||
|
||||
The options are divided into a set of tabs to make it easier to edit. You do not have to ‘save’ to change to different tab so you can make all the changes you require and then click ‘Save’ at the end. The individual options are explained in a little more detail below,
|
||||
|
||||
Monitor Tab
|
||||
-----------
|
||||
|
||||
Name
|
||||
The name for your monitor. This should be made up of alphanumeric characters (a-z,A-Z,0-9) and hyphen (-) and underscore(_) only. Whitespace is not allowed.
|
||||
|
||||
Source Type
|
||||
This determines whether the camera is a local one attached to a physical video or USB port on your machine, a remote network camera or an image source that is represented by a file (for instance periodically downloaded from a alternate location). Choosing one or the other affects which set of options are shown in the Source tab.
|
||||
|
||||
Function
|
||||
This essentially defines what the monitor is doing. This can be one of the following;
|
||||
|
||||
None – The monitor is currently disabled. No streams can be viewed or events generated. Nothing is recorded.
|
||||
Monitor – The monitor is only available for live streaming. No image analysis is done so no alarms or events will be generated, and nothing will be recorded.
|
||||
Modect – or MOtion DEteCTtion. All captured images will be analysed and events generated with recorded video where motion is detected.
|
||||
Record – The monitor will be continuously recorded. Events of a fixed-length will be generated regardless of motion, analogous to a conventional time-lapse video recorder. No motion detection takes place in this mode.
|
||||
Mocord – The monitor will be continuously recorded, with any motion being highlighted within those events.
|
||||
Nodect – or No DEteCTtion. This is a special mode designed to be used with external triggers. In Nodect no motion detection takes place but events are recorded if external triggers require it.
|
||||
|
||||
Generally speaking it is best to choose ‘Monitor’ as an initial setting here.
|
||||
|
||||
Enabled
|
||||
The enabled field indicates whether the monitor should be started in an active mode or in a more passive state. You will nearly always want to check this box, the only exceptions being when you want the camera to be enabled or disabled by external triggers or scripts. If not enabled then the monitor will not create any events in response to motion or any other triggers.
|
||||
|
||||
Linked Monitors
|
||||
This field allows you to select other monitors on your system that act as triggers for this monitor. So if you have a camera covering one aspect of your property you can force all cameras to record while that camera detects motion or other events. You can either directly enter a comma separated list of monitor ids or click on ‘Select’ to choose a selection. Be very careful not to create circular dependencies with this feature however you will have infinitely persisting alarms which is almost certainly not what you want! To unlink monitors you can ctrl-click.
|
||||
|
||||
Maximum FPS
|
||||
On some occasions you may have one or more cameras capable of high capture rates but find that you generally do not require this performance at all times and would prefer to lighten the load on your server. This option permits you to limit the maximum capture rate to a specified value. This may allow you to have more cameras supported on your system by reducing the CPU load or to allocate video bandwidth unevenly between cameras sharing the same video device. This value is only a rough guide and the lower the value you set the less close the actual FPS may approach it especially on shared devices where it can be difficult to synchronise two or more different capture rates precisely. This option controls the maximum FPS in the circumstance where no alarm is occurring only. (Note for IP cameras: ZoneMinder has no way to set or limit the mjpeg stream the camera passes, some cams you can set this through the url string, others do not. So if you're using mjpeg feeds you must NOT throttle here at the server end, only the cam end. If you want to use this feature, the server to throttle, then you MUST use jpeg instead of mjpeg method to get picture from the camera)
|
||||
|
||||
Alarm Maximum FPS
|
||||
If you have specified a Maximum FPS it may be that you don’t want this limitation to apply when your monitor is recording motion or other event. This setting allows you to override the Maximum FPS value if this circumstance occurs. As with the Maximum FPS setting leaving this blank implies no limit so if you have set a maximum fps in the previous option then when an alarm occurs this limit would be ignored and ZoneMinder would capture as fast as possible for the duration of the alarm, returning to the limited value after the alarm has concluded. Equally you could set this to the same, or higher (or even lower) value than Maximum FPS for more precise control over the capture rate in the event of an alarm.
|
||||
|
||||
Reference Image Blend %ge
|
||||
Each analysed image in ZoneMinder is a composite of previous images and is formed by applying the current image as a certain percentage of the previous reference image. Thus, if we entered the value of 10 here, each image’s part in the reference image will diminish by a factor of 0.9 each time round. So a typical reference image will be 10% the previous image, 9% the one before that and then 8.1%, 7.2%, 6.5% and so on of the rest of the way. An image will effectively vanish around 25 images later than when it was added. This blend value is what is specified here and if higher will make slower progressing events less detectable as the reference image would change more quickly. Similarly events will be deemed to be over much sooner as the reference image adapts to the new images more quickly. In signal processing terms the higher this value the steeper the event attack and decay of the signal. It depends on your particular requirements what the appropriate value would be for you but start with 10 here and adjust it (usually down) later if necessary.
|
||||
|
||||
Triggers
|
||||
This small section lets you select which triggers will apply if the run mode has been set to ‘triggered’ above. The most common trigger is X10 and this will appear here if you indicated that your system supported it during installation. Only X10 is supported as a shipped trigger with ZoneMinder at present but it is possible that other triggers will become available as necessary. You can also just use ‘cron’ jobs or other mechanisms to actually control the camera and keep them completely outside of the ZoneMinder settings. The zmtrigger.pl script is also available to implement custom external triggering.
|
||||
|
||||
Source Tab
|
||||
----------
|
||||
|
||||
FFmpeg
|
||||
^^^^^^
|
||||
|
||||
Source Path
|
||||
Use this field to enter the full URL of the stream or file. Look in Supported Hardware > Network Cameras section, how to obtain these strings that may apply to your camera. RTSP streams may be specified here.
|
||||
Source Colours
|
||||
Specify the amount of colours in the captured image. Unlike with local cameras changing this has no controlling effect on the remote camera itself so ensure that your camera is actually capturing to this palette beforehand.
|
||||
Capture Width/Height
|
||||
Make sure you enter here the same values as they are in the remote camera's internal setting.
|
||||
Keep aspect ratio
|
||||
As per local devices.
|
||||
Orientation
|
||||
As per local devices.
|
||||
|
||||
LibVLC
|
||||
^^^^^^
|
||||
|
||||
cURL
|
||||
^^^^
|
||||
|
||||
Local
|
||||
^^^^^
|
||||
|
||||
Device Path/Channel
|
||||
Enter the full path to the device file that your camera is attached to, e.g. /dev/video0. Some video devices, e.g. BTTV cards support multiple cameras on one device so in this case enter the channel number in the Channel box or leave it at zero if you're using a USB camera or one with just one channel. Look in Supported Hardware section, how to see if your capture card or USB webcam is supported or not, and what extra settings you may have to do, to make it work.
|
||||
Device Format
|
||||
Enter the video format of the video stream. This is defined in various system files (e.g. /usr/include/linux/videodev.h) but the two most common are 0 for PAL and 1 for NTSC.
|
||||
Capture Palette
|
||||
Finally for the video part of the configuration enter the colour depth. ZoneMinder supports a handful of the most common palettes, so choose one here. If in doubt try grey first, and then 24 bit colour. If neither of these work very well then YUV420P or one of the others probably will. There is a slight performance penalty when using palettes other than grey or 24 bit colour as an internal conversion is involved. These other formats are intended to be supported natively in a future version but for now if you have the choice choose one of grey or 24 bit colour.
|
||||
Capture Width/Height
|
||||
The dimensions of the video stream your camera will supply. If your camera supports several just enter the one you'll want to use for this application, you can always change it later. However I would recommend starting with no larger than 320x240 or 384x288 and then perhaps increasing and seeing how performance is affected. This size should be adequate in most cases. Some cameras are quite choosy about the sizes you can use here so unusual sizes such as 197x333 should be avoided initially.
|
||||
Keep aspect ratio
|
||||
When typing in the dimensions of monitors you can click this checkbox to ensure that the width stays in the correct ratio to the height, or vice versa. It allows height to be calculated automatically from width (or vice versa) according to preset aspect ratio. This is preset to 4:3 but can be amended globally via the Options->Config->ZM_DEFAULT_ASPECT_RATIO setting. Aside from 4:3 which is the usual for network and analog cameras another common setting is 11:9 for CIF (352x288) based sources.
|
||||
Orientation
|
||||
If your camera is mounted upside down or at right angles you can use this field to specify a rotation that is applied to the image as it is captured. This incurs an additional processing overhead so if possible it is better to mount your camera the right way round if you can. If you choose one of the rotation options remember to switch the height and width fields so that they apply, e.g. if your camera captures at 352x288 and you choose ‘Rotate Right’ here then set the height to be 352 and width to be 288. You can also choose to ‘flip’ the image if your camera provides mirrored input.
|
||||
|
||||
Remote
|
||||
^^^^^^
|
||||
|
||||
Remote Host/Port/Path
|
||||
Use these fields to enter the full URL of the camera. Basically if your camera is at http://camserver.home.net:8192/cameras/camera1.jpg then these fields will be camserver.home.net, 8192 and /cameras/camera1.jpg respectively. Leave the port at 80 if there is no special port required. If you require authentication to access your camera then add this onto the host name in the form <username>:<password>@<hostname>.com. This will usually be 24 bit colour even if the image looks black and white. Look in Supported Hardware > Network Cameras section, how to obtain these strings that may apply to your camera.
|
||||
Remote Image Colours
|
||||
Specify the amount of colours in the captured image. Unlike with local cameras changing this has no controlling effect on the remote camera itself so ensure that your camera is actually capturing to this palette beforehand.
|
||||
Capture Width/Height
|
||||
Make sure you enter here the same values as they are in the remote camera's internal setting.
|
||||
Keep aspect ratio
|
||||
As per local devices.
|
||||
Orientation
|
||||
As per local devices.
|
||||
|
||||
For an example to setup a MPEG-4 camera see: How_to_Setup_an_Axis211A_with_MPEG-4_streaming
|
||||
|
||||
File
|
||||
^^^^
|
||||
|
||||
File Path
|
||||
Enter the full path to the file to be used as the image source.
|
||||
File Colours
|
||||
Specify the amount of colours in the image. Usually 24 bit colour.
|
||||
Capture Width/Height
|
||||
As per local devices.
|
||||
Keep aspect ratio
|
||||
As per local devices.
|
||||
Orientation
|
||||
As per local devices.
|
||||
|
||||
Timestamp Tab
|
||||
-------------
|
||||
|
||||
Timestamp Label Format
|
||||
This relates to the timestamp that is applied to each frame. It is a ‘strftime’ style string with a few extra tokens. You can add %f to add the decimal hundredths of a second to the frame timestamp, so %H:%M:%S.%f will output time like 10:45:37.45. You can also use %N for the name of the monitor and %Qwhich will be filled by any of the ‘show text’ detailed in the zmtriggers.pl section.
|
||||
Timestamp Label X/Y
|
||||
The X and Y values determine where to put the timestamp. A value of 0 for the X value will put it on the left side of the image and a Y value of 0 will place it at the top of the image. To place the timestamp at the bottom of the image use a value eight less than the image height.
|
||||
|
||||
Buffers Tab
|
||||
-----------
|
||||
|
||||
Image Buffer Size
|
||||
This option determines how many frames are held in the ring buffer at any one time. The ring buffer is the storage space where the last ‘n’ images are kept, ready to be resurrected on an alarm or just kept waiting to be analysed. It can be any value you like with a couple of provisos, (see next options). However it is stored in shared memory and making it too large especially for large images with a high colour depth can use a lot of memory. A value of no more than 50 is usually ok. If you find that your system will not let you use the value you want it is probably because your system has an arbitrary limit on the size of shared memory that may be used even though you may have plenty of free memory available. This limit is usually fairly easy to change, see the Troubleshooting section for details.
|
||||
Warm-up Frames
|
||||
This specifies how many frames the analysis daemon should process but not examine when it starts. This allows it to generate an accurate reference image from a series of images before looking too carefully for any changes. I use a value of 25 here, too high and it will take a long time to start, too low and you will get false alarms when the analysis daemon starts up.
|
||||
Pre/Post Event Image Buffer
|
||||
These options determine how many frames from before and after an event should be preserved with it. This allows you to view what happened immediately prior and subsequent to the event. A value of 10 for both of these will get you started but if you get a lot of short events and would prefer them to run together to form fewer longer ones then increase the Post Event buffer size. The pre-event buffer is a true buffer and should not really exceed half the ring buffer size. However the post-event buffer is just a count that is applied to captured frames and so can be managed more flexibly. You should also bear in mind the frame rate of the camera when choosing these values. For instance a network camera capturing at 1FPS will give you 10 seconds before and after each event if you chose 10 here. This may well be too much and pad out events more than necessary. However a fast video card may capture at 25FPS and you will want to ensure that this setting enables you to view a reasonable time frame pre and post event.
|
||||
Stream Replay Image Buffer
|
||||
This option ...
|
||||
Alarm Frame Count
|
||||
This option allows you to specify how many consecutive alarm frames must occur before an alarm event is generated. The usual, and default, value is 1 which implies that any alarm frame will cause or participate in an event. You can enter any value up to 16 here to eliminate bogus events caused perhaps by screen flickers or other transients. Values over 3 or 4 are unlikely to be useful however. Please note that if you have statistics recording enabled then currently statistics are not recorded for the first ‘Alarm Frame Count’-1 frames of an event. So if you set this value to 5 then the first 4 frames will be missing statistics whereas the more usual value of 1 will ensure that all alarm frames have statistics recorded.
|
||||
|
||||
Control Tab
|
||||
-----------
|
||||
|
||||
Note: This tab and its options will only appear if you have selected the ZM_OPT_CONTROL option to indicate that your system contains cameras which are able to be controlled via Pan/Tilt/Zoom or other mechanisms. See the Camera Control section elsewhere in this document for further details on camera control protocols and methods.
|
||||
|
||||
Controllable
|
||||
Check this box to indicate your camera can be controlled.
|
||||
Control Type
|
||||
Select the control type that is appropriate for your camera. ZoneMinder ships with a small number of predefined control protocols which will works with some cameras without modification but which may have to amended to function with others, Choose the edit link to create new control types or to edit the existing ones.
|
||||
Control Device
|
||||
This is the device that is used to control your camera. This will normally be a serial or similar port. If your camera is a network camera, you will generally not need to specify a control device.
|
||||
Control Address
|
||||
This is the address of your camera. Some control protocols require that each camera is identified by a particular, usually numeric, id. If your camera uses addressing then enter the id of your camera here. If your camera is a network camera then you will usually need to enter the hostname or IP address of it here. This is ordinarily the same as that given for the camera itself.
|
||||
Auto Stop Timeout
|
||||
Some cameras only support a continuous mode of movement. For instance you tell the camera to pan right and then when it is aligned correctly you tell it to stop. In some cases it is difficult to time this precisely over a web interface so this option allows you to specify an automatic timeout where the command will be automatically stopped. So a value of 0.25 here can tell the script to stop moving a quarter of a second after starting. This allows a more precise method of fine control. If this value is left blank or at zero it will be ignored, if set then it will be used as the timeout however it will only be applied for the lower 25% of possible speed ranges. In other words if your camera has a pan speed range of 1 to 100 then selecting to move at 26 or over will be assumed to imply that you want a larger movement that you can control yourself and no timeout will be applied. Selecting motion at lower speeds will be interpreted as requiring finer control and the automatic timeout will be invoked.
|
||||
Track Motion
|
||||
This and the following four options are used with the experimental motion function. This will only work if your camera supports mapped movement modes where a point on an image can be mapped to a control command. This is generally most common on network cameras but can be replicated to some degree on other cameras that support relative movement modes. See the Camera Control section for more details. Check this box to enable motion tracking.
|
||||
Track Delay
|
||||
This is the number of seconds to suspend motion detection for following any movement that the camera may make to track motion.
|
||||
Return Location
|
||||
If you camera supports a ‘home’ position or presets you can choose which preset the camera should return to after tracking motion.
|
||||
Return Delay
|
||||
This is the delay, in seconds, once motion has stopped being detected, before the camera returns to any defined return location.
|
||||
|
||||
X10 Tab
|
||||
-------
|
||||
|
||||
Note: This tab and its options will only appear if you have indicated that your system supports the X10 home automation protocol during initial system configuration.
|
||||
|
||||
X10 Activation String
|
||||
The contents of this field determine when a monitor starts and/or stops being active when running in ‘Triggered; mode and with X10 triggers. The format of this string is as follows,
|
||||
|
||||
n : If you simply enter a number then the monitor will be activated when an X10 ON signal for that unit code is detected and will be deactivated when an OFF signal is detected.
|
||||
!n : This inverts the previous mode, e.g. !5 means that the monitor is activated when an OFF signal for unit code 5 is detected and deactivated by an ON.
|
||||
n+ : Entering a unit code followed by + means that the monitor is activated on receipt of a ON signal for that unit code but will ignore the OFF signal and as such will not be deactivated by this instruction. If you prepend a '!' as per the previous definition it similarly inverts the mode, i.e. the ON signal deactivates the monitor.
|
||||
n+<seconds> : As per the previous mode except that the monitor will deactivate itself after the given number of seconds.
|
||||
n- : Entering a unit code followed by - means that the monitor is deactivated on receipt of a OFF signal for that unit code but will ignore the ON signal and as such will not be activated by this instruction. If you prepend a '!' as per the previous definition it similarly inverts the mode, i.e. the OFF signal activates the monitor.
|
||||
n-<seconds> : As per the previous mode except that the monitor will activate itself after the given number of seconds.
|
||||
|
||||
You can also combine several of these expressions to by separating them with a comma to create multiple circumstances of activation. However for now leave this blank.
|
||||
|
||||
X10 Input Alarm String
|
||||
This has the same format as the previous field but instead of activating the monitor with will cause a forced alarm to be generated and an event recorded if the monitor is Active. The same definition as above applies except that for activated read alarmed and for deactivated read unalarmed(!). Again leave this blank for now.
|
||||
X10 Output Alarm String
|
||||
This X10 string also has the same format as the two above options. However it works in a slightly different way. Instead of ZoneMinder reacting to X10 events this option controls how ZoneMinder emits X10 signals when the current monitor goes into or comes out of the alarm state. Thus just entering a number will cause the ON signal for that unit code to be sent when going into alarm state and the OFF signal when coming out of alarm state. Similarly 7+30 will send the unit code 7 ON signal when going into alarm state and the OFF signal 30 seconds later regardless of state. The combination of the X10 instruction allows ZoneMinder to react intelligently to, and also assume control of, other devices when necessary. However the indiscriminate use of the Input Alarm and Output Alarm signals can cause some horrendous race conditions such as a light going on in response to an alarm which then causes an alarm itself and so on. Thus some circumspection is required here. Leave this blank for now anyway.
|
||||
|
||||
Misc Tab
|
||||
--------
|
||||
|
||||
Event Prefix
|
||||
By default events are named ‘Event-<event id>’, however you are free to rename them individually as you wish. This option lets you modify the event prefix, the ‘Event-‘ part, to be a value of your choice so that events are named differently as they are generated. This allows you to name events according to which monitor generated them.
|
||||
Section Length
|
||||
This specifies the length (in seconds) of any fixed length events produced when the monitor function is ‘Record’ or ‘Mocord’. Otherwise it is ignored. This should not be so long that events are difficult to navigate nor so short that too many events are generated. A length of between 300 and 900 seconds I recommended.
|
||||
Frame Skip
|
||||
This setting also applies only to the ‘Record’ or ‘Mocord’ functions and specifies how many frames should be skipped in the recorded events. The default setting of zero results in every captured frame being saved. Using a value of one would mean that one frame is skipped between each saved, two means that two frames are skipped between each saved frame etc. An alternate way of thinking is that one in every ‘Frame Skip + 1’ frames is saved. The point of this is to ensure that saved events do not take up too much space unnecessarily whilst still allowing the camera to capture at a fairly high frame rate. The alternate approach is to limit the capture frame rate which will obviously affect the rate at which frames are saved.
|
||||
FPS Report Interval
|
||||
How often the current performance in terms of Frames Per Second is output to the system log. Not used in any functional way so set it to maybe 1000 for now. If you watch /var/log/messages (normally) you will see this value being emitted at the frequency you specify both for video capture and processing.
|
||||
Default Scale
|
||||
If your monitor has been defined with a particularly large or small image size then you can choose a default scale here with which to view the monitor so it is easier or more visible from the web interface.
|
||||
Web Colour
|
||||
Some elements of ZoneMinder now use colours to identify monitors on certain views. You can select which colour is used for each monitor here. Any specification that is valid for HTML colours is valid here, e.g. ‘red’ or ‘#ff0000’. A small swatch next to the input box displays the colour you have chosen.
|
|
@ -0,0 +1,90 @@
|
|||
Defining Zones
|
||||
==============
|
||||
|
||||
The next important thing to do with a new monitor is set up Zones for it to use. By default you'll already have one generated for you when you created your monitor but you might want to modify it or add others. Click on the Zones column for your monitor and you should see a small popup window appear which contains an image from your camera overlain with a stippled pattern representing your zone. In the default case this will cover the whole image. The colour of the zones appearing here is determined by what type they are. The default zone is Active and so will be red, Inclusive zones are orange, exclusive zones are purple, preclusive zones are blue and inactive zones are white.
|
||||
|
||||
Beneath the zones image will be a table containing a listing of your zones. Clicking on either the relevant bit of the image or on the Id or Name in the table will bring up another window where you can edit the particulars for your Zones. For more information on defining or editing a zone, see Defining Zones.
|
||||
|
||||
Zone configuration and tuning are important when running in the motion detection modes to avoid storing, sorting through, or being alerted on uninteresting video data. Configuring a zone involves setting some basic parameters, as well as choosing an alarm check method and tuning their associated detection parameters.
|
||||
|
||||
The Zone view is split into two main areas, on the left is the options are area and on the right is the zone drawing area. A default or new zone will cover the whole drawing area and will overlay any other zones you already have on there. Unlike the previous zones image, the current zone is coloured green, other zones will be orange regardless of type. The smaller the zone, the less processing time it takes to examine it.
|
||||
|
||||
Basic parameters
|
||||
^^^^^^^^^^^^^^^^
|
||||
Name
|
||||
Each Zone can be named for reference purposes. It is used for logging and debugging. Choose a name that helps you identify your zones.
|
||||
|
||||
Type
|
||||
This is one of the more important concepts in ZoneMinder and there are five to choose from.
|
||||
|
||||
* Active
|
||||
Triggers an alarm when motion is detected within it. This is the zone type you'll use most often, and which will be set for your default zone. Only Active and Exclusive zones can trigger an alarm.
|
||||
|
||||
* Inclusive
|
||||
This zone type can be used for any zones that you want to trigger an alarm only if at least one other Active zone has already triggered one. This might be for example to cover an area of the image like a plant or tree which moves a lot and which would trigger lots of alarms. Perhaps this is behind an area you'd like to monitor though, in this case you'd create an active zone covering the non-moving parts and an inclusive zone covering the tree perhaps with less sensitive detection settings also. If something triggered an alarm in the Active zone and also in the Inclusive zone they would both be registered and the resulting alarm would be that much bigger than if you had blanked it out altogether.
|
||||
|
||||
* Exclusive
|
||||
Triggers an alarm when motion is detected within it, as long as no alarms have already been triggered in an Active zone. This is the most specialized of the zone types. For instance in the camera covering my garden I keep watch for a hedgehog that visits most nights and scoffs the food out of my cats bowls. By creating a sensitive Exclusive zone in that area I can ensure that a hedgehog alarm will only trigger if there is activity in that small area. If something much bigger occurs, like someone walking by it will trigger a regular alarm and not one from the Exclusive zone. Thus I can ensure I get alarms for big events and also special small events but not the noise in between.
|
||||
|
||||
* Preclusive
|
||||
This zone type is relatively recent. It is called a Preclusive zone because if it is triggered it actually precludes an alarm being generated for that image frame. So motion or other changes that occur in a Preclusive zone will have the effect of ensuring that no alarm occurs at all. The application for this zone type is primarily as a shortcut for detecting general large-scale lighting or other changes. Generally this may be achieved by limiting the maximum number of alarm pixels or other measure in an Active zone. However in some cases that zone may cover an area where the area of variable illumination occurs in different places as the sun and/or shadows move and it thus may be difficult to come up with general values. Additionally, if the sun comes out rapidly then although the initial change may be ignored in this way as the reference image catches up an alarm may ultimately be triggered as the image becomes less different. Using one or more Preclusive zones offers a different approach. Preclusive zones are designed to be fairly small, even just a few pixels across, with quite low alarm thresholds. They should be situated in areas of the image that are less likely to have motion occur such as high on a wall or in a corner. Should a general illumination change occur they would be triggered at least as early as any Active zones and prevent any other zones from generating an alarm. Obviously careful placement is required to ensure that they do not cancel any genuine alarms or that they are not so close together that any motion just hops from one Preclusive zone to another. Preclusive zones may also be used to reduce processing time by situating one over an Active zone. The Preclusive zone is processed first; if it is small, and is triggered, the rest of the zone/image will not be processed.
|
||||
|
||||
* Inactive
|
||||
Suppresses the detection of motion within it. This can be layered on top of any other zone type, preventing motion within the Inactive zone from being effective for any other zone type. Use inactive zones to cover areas in which nothing notable will ever happen or where you get false alarms that don't relate to what you are trying to monitor. Inactive zones may be overlaid on other zones to blank out areas, and are processed first. As a general practice, you should try and make zones abut each other instead of overlapping to avoid repeated duplicate processing of the same area.
|
||||
|
||||
Preset
|
||||
The preset chooser sets sensible default values based on computational needs (fast v. best) and sensitivity (low, medium, high.) It is not required that you select a preset, and you can alter any of the parameters after choosing a preset. For a small number of monitors with ZoneMinder running on modern equipment, Best, high sensitivity can be chosen as a good starting point.
|
||||
|
||||
Units
|
||||
* Pixels - Selecting this option will allow many of the following values to be entered (or viewed) in units of pixels.
|
||||
* Percentage - Selecting this option will allow may of the following values to be entered (or viewed) as a percentage. The sense of the percentage values refers to the area of the zone and not the image as a whole. This makes trying to work out necessary sizes rather easier.
|
||||
|
||||
Region points
|
||||
[[File:Zone - Region sample.jpg|frame|right|The sample region shown to the right shows a region defined by 6 control points. The shape of the region causes the check methods to ignore the sidewalk and areas of the porch wall that receive changing sunlight; two conditions that are not of interest in this zone.]]
|
||||
A region is a part of the captured image that is of interest for this zone. By default, a region is configured to cover the whole captured image. Depending on the selected type of this zone, the shape of the region can be adjusted to accommodate multiple effects. This can be done by dragging the control points in the reference image around, or by altering the coordinates found in the controls below the reference image. Clicking on a control point in the reference image highlights the coordinates in the table below. Clicking the + button in a point row adds a control point between this point and the next; clicking the - button removes this control point. It is possible to accidentally place a control point outside of the valid coordinates of the image. This will prevent the monitor from working properly. You can make zones almost any shape you like; except that zones may not self-intersect (i.e. edges crossing over each other).
|
||||
|
||||
Alarm Colour
|
||||
These parameters can be used to individually colorize the zone overlay pattern. Alarms in this zone will be highlighted in the alarm colour. This option is irrelevant for Preclusive and Inactive zones and will be disabled.
|
||||
|
||||
Alarm Check Methods
|
||||
There are 3 Alarm Check Methods. They are sequential, and are layered: In AlarmedPixels mode, only the AlarmedPixel analysis is performed. In FilteredPixels mode, the AlarmedPixel analysis is performed first, followed by the AlarmedPixel analysis. In the Blobs mode, all 3 analysis methods are performed in order. An alarm is only triggered if *all* of the enabled analysis modes are triggered. For performance reasons, as soon as the criteria for one of the analysis modes is not met, the alarm checking for the frame is complete. Since the subsequent modes each require progressively more computations, it is a good idea to tune the parameters in each of the activated layers.
|
||||
|
||||
For reference purposes, the Zone Area box shows the area of the entire region of interest. In percent mode, this is 100. In Pixels mode, this is the pixel count of the region. All 3 Min/Max Area parameter groups are based on the Zone Area as the maximum sensible value, and all 3 are interpreted in the units specified in the Units input.
|
||||
|
||||
AlarmedPixels
|
||||
Alarmed pixels is the first layer of analysis, and is always enabled. Its recommended that you start with this method and move on to the subsequent methods once the effects of the basic parameters are understood. In the AlarmedPixels mode, 2 parameter categories are available for tuning: Min/Max Pixel Threshold, and Min/Max Alarmed Area.
|
||||
|
||||
Min/Max Pixel Threshold (0-255)
|
||||
In the AlarmedPixel layer of analysis, each individual pixel of the image is compared to the current reference image. Pixels that are different from the reference image are considered alarmed pixels. However, small aberrations in lighting or auto exposure camera adjustments may cause the explicit value of a pixel to vary by small amounts from image to image. This parameter allows you to set the limits of what will be considered a changed pixel. For example, if your camera points to a blank white wall, and you raise a black colored item into view, then the change in any one pixel will be great, indeed, extreme. If however, you raise a white piece of paper, then the change in an individual pixel will be less.
|
||||
|
||||
The minimum pixel threshold setting should be high enough to cause minor lighting, imaging, or compression changes to be ignored. Setting the minimum value too high, may allow a white cat to walk undetected across the view of the white wall. A good starting point for the minimum pixel threshold is 40, meaning that the difference in pixel value from must be greater than 40. A good default for the maximum pixel threshold is 0 (indicating that all differences above the minimum threshold are considered a change.)
|
||||
|
||||
Min/Max Alarmed Area
|
||||
The count of alarmed pixels (or percentage of alarmed pixels relative to the pixel area of the region if in percent mode) is used in this first layer of analysis to determine if an alarm is triggered. If the count or percentage is above the minimum alarmed area, but less than the maximum alarmed area, an alarm is triggered. These settings depend on the size of the object you are trying to capture: a value too low may cause false alarms, while a value too high might not detect small objects. A good starting point for both the minimum and maximum are 0 and 0, indicating that any number of alarmed pixels (or any percentage) greater than 0 will trigger an alarm. The frame scores from logged events can then be used to bring the minimum up to a reasonable value. An alternative starting point for the minimum alarmed area (in percent) is 25% of the area that an object of interest takes up in the region. For example, if you approximate that a subject moving through the frame takes up 30% of the frame, then a good starting minimum area is about 7.5%.
|
||||
|
||||
FilteredPixels
|
||||
Selecting the FilteredPixels Alarm Check Method adds an additional layer of analysis to the AlarmedPixels check along with 2 additional parameter categories for tuning. This layer works by analyzing the alarmed pixels identified in the first layer. Alarmed pixels are disregarded, in this and future layers if enabled, if they are not in groups of a minimum small square size. Primarily, this filtering removes isolated alarmed pixels that may be artifacts of the camera, lens, or compression.
|
||||
|
||||
Filter Width/Height (pixels)
|
||||
This parameter is always specified in Pixels, even when Percentages are the selected units. It specifies the size of the group of pixels surrounding a given pixel that must be in alarmed pixels for the pixel itself to be considered an alarmed pixel. The width and height should always be an odd number. 3 x 3 is the default value, and 5 x 5 is also suggested as a sensible alternative. Avoid using large numbers for the width and height of the filter area. When using the Blobs Alarm Check Method, FilteredPixels can be effectively disabled by setting either the width or height to a value less than 1.
|
||||
Min/Max Filtered Area
|
||||
Applying the filtering analysis results in an area that is less than or equal to the alarmed area. Thus the minimum and maximum filtered area parameters for alarm should be equal to or less than the corresponding alarm area parameters, or the FilteredPixels analysis will never trigger an alarm. In particular, it is useful to raise the minimum alarmed area parameter until false events from image artifacts disappear, and setting a minimum filtered area parameter less the minimum alarmed area parameter by enough to capture small events of interest.
|
||||
|
||||
Blobs
|
||||
File:Zone - 1 blob example.jpg|frame|right|This captured frame shows an image with 1 identified blob. The blob is outlined in the Alarm Colour specified above.
|
||||
When two or more Filtered areas touch or share a boundary, it is sensible to evaluate the regions as one contiguous area instead of separate entities. A Blob is a contiguous area made up of multiple filtered areas. Whereas FilteredPixes is useful for excluding parts of the image that are not part of the actual scene, Blob filtering is better suited to disregarding areas of the actual scene that are not of interest.
|
||||
Selecting the Blobs Alarm Check Method opens up all of the available parameters. Enabling Blobs adds one more layer of analysis to the AlarmedPixel and FilteredPixel checks in the determination of a valid alarm along along with 2 additional parameter categories for tuning: the size of the blobs, and the number of blobs. A Blob is not necessarily the whole object that may be of interest. In the example image, the subject is moving, but only a portion of him is marked as a blob. This is because as the subject moves, many pixels of the image do not change in value beyond the set threshold. A pixel that is representing the subject's shoulder in one frame may be representing his back in the next, however, the value of the pixel remains nearly the same.
|
||||
|
||||
Min/Max Blob Area
|
||||
The blob area parameters control the smallest and largest contiguous areas that are to be considered a blob. A good value for the maximum area is the default of 0. (There is no upper bound for the size of a contiguous area that will still be considered a blob.)
|
||||
|
||||
Min/Max Blobs
|
||||
Normally, you would want any positive number of blobs to trigger an event, so the default value of 1 should suffice. In some circumstances, it may benefit to have only one blob NOT trigger an event, in which case, setting this value to 2 or higher may serve some special purpose. A good value for the maximum blobs is the default of 0. (There is no upper bound for the number of blobs that will trigger an event. Use the maximum blobs parameter can be used to tune out events that show a high number of blobs.
|
||||
|
||||
Overload Frame Ignore Count
|
||||
This setting specifies the number of frames to NOT raise an alarm after an overload. In this context, overload is defined as a detected change too big to raise an alarm. Depending on the alarm check method that could be
|
||||
* Number of alarmed pixels > Max Alarmed Area or
|
||||
* Number of filtered pixels > Max Filtered Area or
|
||||
* Number of Blobs > Max Blobs
|
||||
The idea is that after a change like a light going on that is considered too big to count as an alarm, it could take a couple of frames for things to settle down again.
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
Filtering Events
|
||||
================
|
||||
|
||||
The other columns on the main console window contain various event totals for your monitors over the last hour, day, week and month as well as a grand total and a total for events that you may have archived for safekeeping. Clicking on one of these totals or on the 'All' or 'Archive' links from the monitor window described above will present you with a new display. This is the full event window and contains a list of events selected according to a filter which will also pop up in its own window. Thus if you clicked on a 'day' total the filter will indicate that this is the period for which events are being filtered. The event listing window contains a similar listing to the recent events in the monitor window. The primary differences are that the frames and alarm frames and the score and maximum score are now broken out into their own columns, all of which can be sorted by clicking on the heading. Also this window will not refresh automatically, rather only on request. Other than that, you can choose to view events here or delete them as before.
|
||||
|
||||
The other window that appeared is a filter window. You can use this window to create your own filters or to modify existing ones. You can even save your favourite filters to re-use at a future date. Filtering itself is fairly simple; you first choose how many expressions you'd like your filter to contain. Changing this value will cause the window to redraw with a corresponding row for each expression. You then select what you want to filter on and how the expressions relate by choosing whether they are 'and' or 'or' relationships. For filters comprised of many expressions you will also get the option to bracket parts of the filter to ensure you can express it as desired. Then if you like choose how you want your results sorted and whether you want to limit the amount of events displayed.
|
||||
|
||||
There are several different elements to an event that you can filter on, some of which require further explanation. These are as follows, 'Date/Time' which must evaluate to a date and a time together, 'Date' and 'Time' which are variants which may only contain the relevant subsets of this, 'Weekday' which as expected is a day of the week.
|
||||
|
||||
All of the preceding elements take a very flexible free format of dates and time based on the PHP strtotime function (http://www.php.net/manual/en/function.strtotime.php). This allows values such as 'last Wednesday' etc to be entered. I recommend acquainting yourself with this function to see what the allowed formats are. However automated filters are run in perl and so are parsed by the Date::Manip package. Not all date formats are available in both so if you are saved your filter to do automatic deletions or other tasks you should make sure that the date and time format you use is compatible with both methods. The safest type of format to use is ‘-3 day’ or similar with easily parseable numbers and units are in English.
|
||||
|
||||
The other things you can filter on are all fairly self explanatory, except perhaps for 'Archived' which you can use to include or exclude Archived events. In general you'll probably do most filtering on un-archived events. There are also two elements, Disk Blocks and Disk Percent which don’t directly relate to the events themselves but to the disk partition on which the events are stored. These allow you to specify an amount of disk usage either in blocks or in percentage as returned by the ‘df’ command. They relate to the amount of disk space used and not the amount left free. Once your filter is specified, clicking 'submit' will filter the events according to your specification. As the disk based elements are not event related directly if you create a filter and include the term ‘DiskPercent > 95’ then if your current disk usage is over that amount when you submit the filter then all events will be listed whereas if it is less then none at all will. As such the disk related terms will tend to be used mostly for automatic filters (see below). If you have created a filter you want to keep, you can name it and save it by clicking 'Save'.
|
||||
|
||||
If you do this then the subsequent dialog will also allow you specify whether you want this filter automatically applied in order to delete events or upload events via ftp to another server and mail notifications of events to one or more email accounts. Emails and messages (essentially small emails intended for mobile phones or pagers) have a format defined in the Options screen, and may include a variety of tokens that can be substituted for various details of the event that caused them. This includes links to the event view or the filter as well as the option of attaching images or videos to the email itself. Be aware that tokens that represent links may require you to log in to access the actual page, and sometimes may function differently when viewed outside of the general ZoneMinder context. The tokens you can use are as follows.
|
||||
|
||||
: %EI% Id of the event
|
||||
: %EN% Name of the event
|
||||
: %EC% Cause of the event
|
||||
: %ED% Event description
|
||||
: %ET% Time of the event
|
||||
: %EL% Length of the event
|
||||
: %EF% Number of frames in the event
|
||||
: %EFA% Number of alarm frames in the event
|
||||
: %EST% Total score of the event
|
||||
: %ESA% Average score of the event
|
||||
: %ESM% Maximum score of the event
|
||||
: %EP% Path to the event
|
||||
: %EPS% Path to the event stream
|
||||
: %EPI% Path to the event images
|
||||
: %EPI1% Path to the first alarmed event image
|
||||
: %EPIM% Path to the (first) event image with the highest score
|
||||
: %EI1% Attach first alarmed event image
|
||||
: %EIM% Attach (first) event image with the highest score
|
||||
: %EV% Attach event mpeg video
|
||||
: %MN% Name of the monitor
|
||||
: %MET% Total number of events for the monitor
|
||||
: %MEH% Number of events for the monitor in the last hour
|
||||
: %MED% Number of events for the monitor in the last day
|
||||
: %MEW% Number of events for the monitor in the last week
|
||||
: %MEM% Number of events for the monitor in the last month
|
||||
: %MEA% Number of archived events for the monitor
|
||||
: %MP% Path to the monitor window
|
||||
: %MPS% Path to the monitor stream
|
||||
: %MPI% Path to the monitor recent image
|
||||
: %FN% Name of the current filter that matched
|
||||
: %FP% Path to the current filter that matched
|
||||
: %ZP% Path to your ZoneMinder console
|
||||
|
||||
Finally you can also specify a script which is run on each matched event. This script should be readable and executable by your web server user. It will get run once per event and the relative path to the directory containing the event in question. Normally this will be of the form <MonitorName>/<EventId> so from this path you can derive both the monitor name and event id and perform any action you wish. Note that arbitrary commands are not allowed to be specified in the filter, for security the only thing it may contain is the full path to an executable. What that contains is entirely up to you however.
|
||||
|
||||
Filtering is a powerful mechanism you can use to eliminate events that fit a certain pattern however in many cases modifying the zone settings will better address this. Where it really comes into its own is generally in applying time filters, so for instance events that happen during weekdays or at certain times of the day are highlighted, uploaded or deleted. Additionally using disk related terms in your filters means you can automatically create filters that delete the oldest events when your disk gets full. Be warned however that if you use this strategy then you should limit the returned results to the amount of events you want deleted in each pass until the disk usage is at an acceptable level. If you do not do this then the first pass when the disk usage is high will match, and then delete, all events unless you have used other criteria inside of limits. ZoneMinder ships with a sample filter already installed, though disabled. The PurgeWhenFull filter can be used to delete the oldest events when your disk starts filling up. To use it you should select and load it in the filter interface, modify it to your requirements, and then save it making you sure you check the ‘Delete all matches’ option. This will then run in the background and ensure that your disk does not fill up with events.
|
||||
|
||||
|
||||
Relative items in date strings
|
||||
------------------------------
|
||||
|
||||
Relative items adjust a date (or the current date if none) forward or backward. The effects of relative items accumulate. Here are some examples:
|
||||
|
||||
|
||||
1 year
|
||||
1 year ago
|
||||
3 years
|
||||
2 days
|
||||
|
||||
The unit of time displacement may be selected by the string ‘year’ or ‘month’ for moving by whole years or months. These are fuzzy units, as years and months are not all of equal duration. More precise units are ‘fortnight’ which is worth 14 days, ‘week’ worth 7 days, ‘day’ worth 24 hours, ‘hour’ worth 60 minutes, ‘minute’ or ‘min’ worth 60 seconds, and ‘second’ or ‘sec’ worth one second. An ‘s’ suffix on these units is accepted and ignored.
|
||||
|
||||
The unit of time may be preceded by a multiplier, given as an optionally signed number. Unsigned numbers are taken as positively signed. No number at all implies 1 for a multiplier. Following a relative item by the string ‘ago’ is equivalent to preceding the unit by a multiplier with value -1.
|
||||
|
||||
The string ‘tomorrow’ is worth one day in the future (equivalent to ‘day’), the string ‘yesterday’ is worth one day in the past (equivalent to ‘day ago’).
|
||||
|
||||
The strings ‘now’ or ‘today’ are relative items corresponding to zero-valued time displacement, these strings come from the fact a zero-valued time displacement represents the current time when not otherwise changed by previous items. They may be used to stress other items, like in ‘12:00 today’. The string ‘this’ also has the meaning of a zero-valued time displacement, but is preferred in date strings like ‘this thursday’.
|
||||
|
||||
When a relative item causes the resulting date to cross a boundary where the clocks were adjusted, typically for daylight saving time, the resulting date and time are adjusted accordingly.
|
||||
|
||||
The fuzz in units can cause problems with relative items. For example, ‘2003-07-31 -1 month’ might evaluate to 2003-07-01, because 2003-06-31 is an invalid date. To determine the previous month more reliably, you can ask for the month before the 15th of the current month. For example:
|
||||
|
||||
|
||||
$ date -R
|
||||
Thu, 31 Jul 2003 13:02:39 -0700
|
||||
$ date --date='-1 month' +'Last month was %B?'
|
||||
Last month was July?
|
||||
$ date --date="$(date +%Y-%m-15) -1 month" +'Last month was %B!'
|
||||
Last month was June!
|
||||
|
||||
|
||||
As this applies to ZoneMinder filters, you might want to search for events in a period of time, or maybe for example create a purge filter that removes events older than 30 days.
|
||||
For the later you would want at least two lines in your filter. The first line should be:
|
||||
|
||||
[<Archive Status> <equal to> <Unarchived Only>]
|
||||
|
||||
as you don't want to delete your archived events.
|
||||
|
||||
Your second line to find events older than 30 days would be:
|
||||
|
||||
[and <Date><less than> -30 days]
|
||||
|
||||
You use "less than" to indicate that you want to match events before the specified date, and you specify "-30 days" to indicate a date 30 days before the time the filter is run. Of course you could use 30 days ago as well(?).
|
||||
|
||||
You should always test your filters before enabling any actions based on them to make sure they consistently return the results you want. You can use the submit button to see what events are returned by your query.
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
Getting Started
|
||||
===============
|
||||
|
||||
Having followed the :doc:`/installationguide/index` for your distribution you should now be able to load the ZoneMinder web frontend. By default this will be with the Classic skin, below is an example of the page you should now see.
|
||||
|
||||
To add cameras to the system you need to create a Monitor for each camera. Click 'Add New Monitor' to bring up the dialog.
|
||||
|
||||
[To be completed, removing tutorial style documentation from wiki documentation and putting first time user guide here]
|
|
@ -0,0 +1,19 @@
|
|||
User Guide
|
||||
==========
|
||||
|
||||
.. toctree::
|
||||
|
||||
introduction
|
||||
components
|
||||
gettingstarted
|
||||
definemonitor
|
||||
definezone
|
||||
viewmonitors
|
||||
controlmonitor
|
||||
filterevents
|
||||
viewevents
|
||||
options
|
||||
cameracontrol
|
||||
mobile
|
||||
logging
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
Introduction
|
||||
============
|
||||
|
||||
Welcome to ZoneMinder, the all-in-one Linux GPL'd security camera solution.
|
||||
|
||||
Most commercial "security systems" are designed as a monitoring system that also records. Recording quality can vary from bad to unusable, locating the relevant video can range from challenging to impractical, and exporting can often only be done with the manual present. ZoneMinder was designed primarily to record, and allow easy searches and exporting. Recordings are of the best possible quality, easy to filter and find, and simple to export using any system with a web browser. It also monitors.
|
||||
|
||||
ZoneMinder is designed around a series of independent components that only function when necessary limiting any wasted resource and maximising the efficiency of your machine. A fairly ancient Pentium II PC should be able to track one camera per device at up to 25 frames per second with this dropping by half approximately for each additional camera on the same device. Additional cameras on other devices do not interact so can maintain this frame rate. Even monitoring several cameras still will not overload the CPU as frame processing is designed to synchronise with capture and not stall it.
|
||||
|
||||
As well as being fast ZoneMinder is designed to be friendly and even more than that, actually useful. As well as the fast video interface core it also comes with a user friendly and comprehensive PHP based web interface allowing you to control and monitor your cameras from home, at work, on the road, or even a web enabled cell phone. It supports variable web capabilities based on available bandwidth. The web interface also allows you to view events that your cameras have captured and archive them or review them time and again, or delete the ones you no longer wish to keep. The web pages directly interact with the core daemons ensuring full co-operation at all times. ZoneMinder can even be installed as a system service ensuring it is right there if your computer has to reboot for any reason.
|
||||
|
||||
The core of ZoneMinder is the capture and analysis of images and there is a highly configurable set of parameters that allow you to ensure that you can eliminate false positives whilst ensuring that anything you don't want to miss will be captured and saved. ZoneMinder allows you to define a set of 'zones' for each camera of varying sensitivity and functionality. This allows you to eliminate regions that you don't wish to track or define areas that will alarm if various thresholds are exceeded in conjunction with other zones.
|
||||
|
||||
ZoneMinder is free, but if you do find it useful then please feel free to visit http://www.zoneminder.com/donate.html and help to fund future improvements to ZoneMinder.
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
Logging
|
||||
=======
|
||||
|
||||
Most components of ZoneMinder can emit informational, warning, error and debug messages in a standard format. These messages can be logged in one or more locations. By default all messages produced by scripts are logged in <script name>.log files which are placed in the directory defined by the ZM_PATH_LOGS configuration variable. This is initially defined as ‘/tmp’ though it can be overridden (see the Options and Users section above). So for example, the zmpkg.pl script will output messages to /tmp/zmpkg.pl, an example of these messages is::
|
||||
|
||||
03/01/06 13:46:00.166046 zmpkg[11148].INF [Command: start]
|
||||
|
||||
where the first part refers to the date and time of the entry, the next section is the name (or an abbreviated version) of the script, followed by the process id in square brackets, a severity code (INF, WAR, ERR or DBG) and the debug text. If you change the location of the log directory, ensure it refers to an existing directory which the web user has permissions to write to. Also ensure that no logs are present in that directory the web user does not have permission to open. This can happen if you run commands or scripts as the root user for testing at some point. If this occurs then subsequent non-privileged runs will fails due to being unable to open the log files.
|
||||
|
||||
As well as specific script logging above, information, warning and error messages are logged via the system syslog service. This is a standard component on Linux systems and allows logging of all sorts of messages in a standard way and using a standard format. On most systems, unless otherwise configured, messages produced by ZoneMinder will go to the /var/log/messages file. On some distributions they may end up in another file, but usually still in /var/log. Messages in this file are similar to those in the script log files but differ slightly. For example the above event in the system log file looks like::
|
||||
|
||||
Jan 3 13:46:00 shuttle52 zmpkg[11148]: INF [Command: start]
|
||||
|
||||
where you can see that the date is formatted differently (and only to 1 second precision) and there is an additional field for the hostname (as syslog can operate over a network). As well as ZoneMinder entries in this file you may also see entries from various other system components. You should ensure that your syslogd daemon is running for syslog messages to be correctly handled.
|
||||
|
||||
A number of users have asked how to suppress or redirect ZoneMinder messages that are written to this file. This most often occurs due to not wanting other system messages to be overwhelmed and obscured by the ZoneMinder produced ones (which can be quite frequent by default). In order to control syslog messages you need to locate and edit the syslog.conf file on your system. This will often be in the /etc directory. This file allows configuration of syslog so that certain classes and categories of messages are routed to different files or highlighted to a console, or just ignored. Full details of the format of this file is outside the scope of this document (typing ‘man syslog.conf’ will give you more information) but the most often requested changes are easy to implement.
|
||||
|
||||
The syslog service uses the concept of priorities and facilities where the former refers to the importance of the message and the latter refers to that part of the system from which it originated. Standard priorities include ‘info’, ‘warning’, ‘err’ and ‘debug’ and ZoneMinder uses these priorities when generating the corresponding class of message. Standard facilities include ‘mail’, ‘cron’ and ‘security’ etc but as well this, there are eight ‘local’ facilities that can be used by machine specific message generators. ZoneMinder produces it’s messages via the ‘local1’ facility.
|
||||
|
||||
So armed with the knowledge of the priority and facility of a message, the syslog.conf file can be amended to handle messages however you like.
|
||||
|
||||
So to ensure that all ZoneMinder messages go to a specific log file you can add the following line near the top of your syslog.conf file::
|
||||
|
||||
<pre># Save ZoneMinder messages to zm.log
|
||||
local1.* /var/log/zm/zm.log</pre>
|
||||
|
||||
which will ensure that all messages produced with the local1 facility are routed to fhe /var/log/zm/zm.log file. However this does not necessarily prevent them also going into the standard system log. To do this you will need to modify the line that determines which messages are logged to this file. This may look something like::
|
||||
|
||||
<pre># Log anything (except mail) of level info or higher.
|
||||
# Don't log private authentication messages!
|
||||
*.info;mail.none;news.none;authpriv.none;cron.none /var/log/messages</pre>
|
||||
|
||||
by default. To remove ZoneMinder messages altogether from this file you can modify this line to look like::
|
||||
|
||||
<pre>*.info;local1.!*;mail.none;news.none;authpriv.none;cron.none /var/log/messages</pre>
|
||||
|
||||
which instructs syslog to ignore any messages from the local1 facility. If however you still want warnings and errors to occur in the system log file, you could change it to::
|
||||
|
||||
<pre>*.info;local1.!*;local1.warning;mail.none;news.none;authpriv.none;cron.none /var/log/messages</pre>
|
||||
|
||||
which follows the ignore instruction with a further one to indicate that any messages with a facility of local1 and a priority of warning or above should still go into the file.
|
||||
|
||||
These recipes are just examples of how you can modify the logging to suit your system, there are a lot of other modifications you could make. If you do make any changes to syslog.conf you should ensure you restart the syslogd process or send it a HUP signal to force it to reread its configuration file otherwise your changes will be ignored.
|
||||
|
||||
The discussion of logging above began by describing how scripts produce error and debug messages. The way that the binaries work is slightly different. Binaries generate information, warning and error messages using syslog in exactly the same way as scripts and these messages will be handled identically. However debug output is somewhat different. For the scripts, if you want to enable debug you will need to edit the script file itself and change the DBG_LEVEL constant to have a value of 1. This will then cause debug messages to be written to the <script>.log file as well as the more important messages. Debug messages however are not routed via syslog. Scripts currently only have one level of debug so this will cause any and all debug messages to be generated. Binaries work slightly differently and while you can edit the call to zmDbgInit that is present in every binary’s ‘main’ function to update the initial value of the debug level, there are easier ways.
|
||||
|
||||
The simplest way of collecting debug output is to click on the Options link from the main ZoneMinder console view and then go to the Debug tab. There you will find a number of debug options. The first thing you should do is ensure that the ZM_EXTRA_DEBUG setting is switched on. This enables debug generally. The next thing you need to do is select the debug target, level and destination file using the relevant options. Click on the ‘?’ by each option for more information about valid settings. You will need to restart ZoneMinder as a whole or at least the component in question for logging to take effect. When you have finished debugging you should ensure you switch debug off by unchecking the ZM_EXTRA_DEBUG option and restarting ZoneMinder. You can leave the other options as you like as they are ignored if the master debug option is off.
|
||||
|
||||
Once you have debug being logged you can modify the level by sending USR1 and USR2 signals to the relevant binary (or binaries) to increase or decrease the level of debug being emitted with immediate effect. This modification will not persist if the binary gets restarted however.
|
||||
|
||||
If you wish to run a binary directly from the command line to test specific functionality or scenarios, you can set the ZM_DBG_LEVEL and ZM_DBG_LOG environment variables to set the level and log file of the debug you wish to see, and the ZM_DBG_PRINT environment variable to 1 to output the debug directly to your terminal.
|
||||
|
||||
All ZoneMinder logs can now be rotated by logrotate. A sample logrotate config file is shown below.::
|
||||
|
||||
<pre>/var/log/zm/*.log {
|
||||
missingok
|
||||
notifempty
|
||||
sharedscripts
|
||||
postrotate
|
||||
/usr/local/bin/zmpkg.pl logrot 2> /dev/null > /dev/null || true
|
||||
endscript
|
||||
}</pre>
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
Mobile Devices
|
||||
==============
|
||||
|
||||
* After 1.24.x, access to the "light" interface changed to http://xxx.xxx.xxx.xxx/zm/index.php?skin=mobile ; You may find that you have a directory named "skins" under ZoneMinder base dir, so you may use one of the existent skins as a base to adapt to your needs;
|
||||
|
||||
Type this in your mobile browser: http://xxx.xxx.xxx.xxx/zm/index.php?format=xhtml (deprecated)
|
||||
|
||||
ZoneMinder has always had a minimal WML (Wireless Markup Language) capability to allow it to function on mobile phones and similar devices. However as of 1.20.0 this is now deprecated and has been replaced with a new XHTML – Mobile Profile mode as well as the default HTML4. XHTML-MP is a small, and limited, version of XHTML intended for mobile devices and is based on XHTML Basic. It does not contain scripting or other dynamic elements and essentially is a subset of HTML as most people know it.
|
||||
|
||||
The ZoneMinder XHTML-MP interface allows you to log into your installation via your phone or mobile devices and perform a limited number of tasks. These include viewing recent events, and monitoring live streams. However unlike the full interfaces these elements are presented as still images requiring manual refreshing. For now the XHTML-MP interface is presented as a prototype interface; rather than one offering full capabilities. As such, please feel free to make comments or offer suggestions via the forums on http://www.zoneminder.com.
|
||||
|
||||
As well as XHTML-MP, ideally I’d like to be able to offer a WML2.0 interface. WML2.0 is a blending of WML1.3, which is traditional WAP, and XHTML. As such it offers the scripting that WML has traditionally included plus the better control of mark-up that is the realm of XHTML. Unfortunately so far I’m unaware of any devices that support WML2.0 even if they say they are WAP2 compliant; certainly I’ve never had a phone that does. If you find out that a particular phone does support this then please let me know (or better still send me the phone!).
|
||||
|
||||
If you wish to use the XHTML-MP interface to ZoneMinder there is no extra configuration required to enable it per se. However ZoneMinder needs to be able to figure out what kind of content to deliver to particular browsers, so you have two choices. You can edit zm.php and include a definition that corresponds to your phone, describing a small number of basic capabilities, you will see a couple of examples already there, or you can use the comprehensive open source WURFL package available from http://wurfl.sourceforge.net/. You will need to download both the WURFL php files and the wurfl.xml file itself. WURFL is a resource containing information on the capabilities of a huge number of mobile phones, devices and browsers. Thus once it has matched your phone it can determine various capabilities it may possess. This means that ZoneMinder itself only has to deal with these capabilities and not the individual phone types. If you prefer you can also add the format=xHTML url parameter when you load ZoneMinder to force the xHTML format and skip the automatic determination altoghether.
|
||||
|
||||
To use WURFL you should install the php files in the same directory as ZoneMinder and then create a ‘wurfl’ sub-directory and ensure it is readable and writeable (or preferably owned by) your web server user. You should put the wurfl.xml file in there. One other thing you may need to change, as the xml file is quite large, is the ‘memory_limit’ setting in php.ini as the default setting of 8Mb may be too small. Once you’ve done this you should find that your phone or device is recognised and if it can support XHTML-MP it will receive that interface. If your phone is very new, or you are using an old version of the XML file you might find that it is not present however. The WURFL library uses a caching strategy to avoid reloading the whole XML file each time so check if a sensible looking cache file has been created in the ‘wurfl’ sub-directory also check the wurfl.log in the same place.
|
||||
|
||||
The WURFL is a third party application and as such I am unable to offer support directly for it. If you feel your device is missing or incorrectly represented please contact the authors via their own channels. If on the other hand you have any comments on ZoneMinder on your device specifically please let me know and I would be pleased to hear about it.
|
||||
|
||||
As support for cookies in mobile devices is patchy at best, the groups feature is not fully implemented in the XHTML-MP views. Instead if there is a group called ‘Mobile’ already defined then that group will always be effective, if not then all monitors available to the logged in user will be visible,
|
|
@ -0,0 +1,17 @@
|
|||
Options
|
||||
=======
|
||||
The final area covered by the tutorial is the options and user section. If you are running in authenticated mode and don’t have system privileges then you will not see this section at all and if you are running in un-authenticated mode then no user section will be displayed.
|
||||
|
||||
The various options you can specify are displayed in a tabbed dialog with each group of options displayed under a different heading. Each option is displayed with its name, a short description and the current value. You can also click on the ‘?’ link following each description to get a fuller explanation about each option. This is the same as you would get from zmconfig.pl. A number of option groups have a master option near the top which enables or disables the whole group so you should be aware of the state of this before modifying options and expecting them to make any difference.
|
||||
|
||||
If you have changed the value of an option you should then ‘save’ it. A number of the option groups will then prompt you to let you know that the option(s) you have changed will require a system restart. This is not done automatically in case you will be changing many values in the same session, however once you have made all of your changes you should restart ZoneMinder as soon as possible. The reason for this is that web and some scripts will pick up the new changes immediately but some of the daemons will still be using the old values and this can lead to data inconsistency or loss.
|
||||
|
||||
One of the options you may notice in the ‘System’ tab allows you to specify the default language for your installation of ZoneMinder. Versions 1.17.0 and later support multiple languages but rely on users to assist in creating language files for specific languages. To specify a language you will have to give the applicable code, thus for UK English this is en_gb, and for US English it would be en_us, if no language is given then UK English is assumed. Most languages will be specified in this nn_mm format and to check which languages are available look for files named zm_lang_*.php in the ZoneMinder build directory where the parts represented by the ‘*’ would be what you would enter as a language. This is slightly unwieldy and will probably be improved in future to make it easier to determine language availability. On checking which languages are available it may be that your preferred language is not currently included and if this is the case please consider doing a translation and sending it back to it may be included in future releases. All the language elements are given in the zm_lang_en_gb.php file along with a few notes to help you understand the format.
|
||||
|
||||
As mentioned above, you may also see a ‘users’ tab in the Options area. In this section you will see a list of the current users defined on the system. You can also add or delete users from here. It is recommended you do not delete the admin user unless you have created another fully privileged user to take over the same role. Each user is defined with a name and password (which is hidden) as well as an enabled setting which you can use to temporarily enable or disable users, for example a guest user for limited time access. As well as that there is a language setting that allows you to define user specific languages. Setting a language here that is different than the system language will mean that when that user logs in they will have the web interface presented in their own language rather than the system default, if it is available. Specifying a language here is done in the same way as for the system default language described above.
|
||||
|
||||
There are also five values that define the user permissions, these are ‘Stream’, ‘Events’, ‘Control’, ‘Monitors’ and ‘System’ Each can have values of ‘None’, ‘View’ or ‘Edit’ apart from ‘Stream’ which has no ‘Edit’ setting. These values cover access to the following areas; ‘Stream’ defines whether a user is allowed to view the ‘live’ video feeds coming from the cameras. You may wish to allow a user to view historical events only in which case this setting should be ‘none’. The ‘Events’ setting determines whether a user can view and modify or delete any retained historical events. The ‘Control’ setting allows you to indicate whether the user is able to control any Pan/Tilt/Zoom type cameras you may have on your system. The ‘Monitors’ setting specifies whether a user can see the current monitor settings and change them. Finally the ‘System’ setting determines whether a user can view or modify the system settings as a whole, such as options and users or controlling the running of the system as a whole.
|
||||
|
||||
As well as these settings there is also a ‘Bandwidth’ setting which can be used to limit the maximum bandwidth that a user can view at and a ‘Monitor Ids’ setting that can be used for non-’System’ users to restrict them to only being able to access streams, events or monitors for the given monitors ids as a comma separated list with no spaces. If a user with ‘Monitors’ edit privileges is limited to specific monitors here they will not be able to add or delete monitors but only change the details of those they have access to. If a user has ‘System’ privileges then the ‘Monitors Ids’ setting is ignored and has no effect.’
|
||||
|
||||
That’s pretty much is it for the tour, though there is a lot more to ZoneMinder as you will discover. You should experiment with the various settings to get the results you think are right for your requirements.
|
|
@ -0,0 +1,13 @@
|
|||
Viewing Events
|
||||
==============
|
||||
From the monitor or filtered events listing you can now click on an event to view it in more detail. If you have streaming capability you will see a series of images that make up the event. Under that you should also see a progress bar. Depending on your configuration this will either be static or will be filled in to indicate how far through the event you are. By default this functionality is turned off for low bandwidth settings as the image delivery tends to not be able to keep up with real-time and the progress bar cannot take this into account. Regardless of whether the progress bar updates, you can click on it to navigate to particular points in the events.
|
||||
|
||||
You will also see a link to allow you to view the still images themselves. If you don't have streaming then you will be taken directly to this page. The images themselves are thumbnail size and depending on the configuration and bandwidth you have chosen will either be the full images scaled in your browser of actual scaled images. If it is the latter, if you have low bandwidth for example, it may take a few seconds to generate the images. If thumbnail images are required to be generated, they will be kept and not re-generated in future. Once the images appear you can mouse over them to get the image sequence number and the image score.
|
||||
|
||||
You will notice for the first time that alarm images now contain an overlay outlining the blobs that represent the alarmed area. This outline is in the colour defined for that zone and lets you see what it was that caused the alarm. Clicking on one of the thumbnails will take you to a full size window where you can see the image in all its detail and scroll through the various images that make up the event. If you have the ZM_RECORD_EVENT_STATS option on, you will be able to click the 'Stats' link here and get some analysis of the cause of the event. Should you determine that you don't wish to keep the event, clicking on Delete will erase it from the database and file system. Returning to the event window, other options here are renaming the event to something more meaningful, refreshing the window to replay the event stream, deleting the event, switching between streamed and still versions of the event (if supported) and generating an MPEG video of the event (if supported).
|
||||
|
||||
These last two options require further explanation. Archiving an event means that it is kept to one side and not displayed in the normal event listings unless you specifically ask to view the archived events. This is useful for keeping events that you think may be important or just wish to protect. Once an event is archived it can be deleted or unarchived but you cannot accidentally delete it when viewing normal unarchived events.
|
||||
|
||||
The final option of generating an MPEG video is still somewhat experimental and its usefulness may vary. It uses the open source ffmpeg encoder to generate short videos, which will be downloaded to your browsing machine or viewed in place. When using the ffmpeg encoder, ZoneMinder will attempt to match the duration of the video with the duration of the event. Ffmpeg has a particularly rich set of options and you can specify during configuration which additional options you may wish to include to suit your preferences. In particular you may need to specify additional, or different, options if you are creating videos of events with particularly slow frame rates as some codecs only support certain ranges of frame rates. A common value for FFMPEG_OUTPUT_OPTIONS under Options > Images might be '-r 25 -b 800k' for 25 fps and 800 kbps. Details of these options can be found in the [http://ffmpeg.org/ffmpeg-doc.html documentation] for the encoders and is outside the scope of this document.
|
||||
|
||||
Building an MPEG video, especially for a large event, can take some time and should not be undertaken lightly as the effect on your host box of many CPU intensive encoders will not be good. However once a video has been created for an event it will be kept so subsequent viewing will not incur the generation overhead. Videos can also be included in notification emails, however care should be taken when using this option as for many frequent events the penalty in CPU and disk space can quickly mount up.
|
|
@ -0,0 +1,16 @@
|
|||
Viewing Monitors
|
||||
================
|
||||
|
||||
As this point you should have one or more Monitors running with one or more Zones each. Returning to the main Console window you will see your monitors listed once more. The columns not explored so far are the Monitor name, and various event totals for certain periods of time. Clicking on any of the event totals will bring up a variation on the same window but click on the Monitor name for now. If it is not a link then this means that that monitor is not running so ensure that you have started ZoneMinder and that your Monitor function is not set to ‘None’. If the link works, clicking on it will pop another window up which should be scaled to contain a heading, an image from your monitor, a status and a list of recent events if any have been generated.
|
||||
|
||||
Depending on whether you are able to view a streamed image or not the image frame will either be this stream or a series of stills. You have the option to change from one to the other (if available) at the centre of the top heading. Also along the top are a handful of other links. These let you change the scale of the image stream, modify image settings (for local devices) or close the window. If you have cameras that can be controlled, a ‘Control’ link should also be present which is described below.
|
||||
|
||||
The image should be self-explanatory but if it looks like garbage it is possible that the video configuration is wrong so look in your system error log and check for or report anything unusual. The centre of the window will have a tiny frame that just contains a status; this will be 'Idle', 'Alarm' or 'Alert' depending on the function of the Monitor and what's going on in the field of view. Idle means nothing is happening, Alarm means there is an alarm in progress and Alert means that an alarm has happened and the monitor is ‘cooling down’, if another alarm is generated in this time it will just become part of the same event. These indicators are colour coded in green, red and amber.
|
||||
|
||||
By default if you have minimised this window or opened other windows in front it will pop up to the front if it goes to Alarm state. This behaviour can be turned off in ‘options’ if required. You can also specify a sound file in the configuration, which will be played when an alarm occurs to alert you to the fact if you are not in front of your computer. This should be a short sound of only a couple of seconds ideally. Note that as the status is refreshed every few seconds it is possible for this not to alert you to every event that takes place, so you shouldn't rely on it for this purpose if you expect very brief events. Alternatively you can decrease the refresh interval for this window in the configuration though having too frequent refreshing may impact on performance.
|
||||
|
||||
Below the status is a list of recent events that have occurred, by default this is a listing of just the last 10 but clicking on 'All' will give you a full list and 'Archive' will take you to the event archive for this monitor, more on this later. Clicking on any of the column headings will sort the events appropriately.
|
||||
|
||||
From here you can also delete events if you wish. The events themselves are listed with the event id, and event name (which you can change), the time that the event occurred, the length of the event including any preamble and postamble frames, the number of frames comprising the event with the number that actually contain an alarm in brackets and finally a score. This column lists the average score per alarm frame as well as the maximum score that any alarm frame had.
|
||||
|
||||
The score is an arbitrary value that essentially represents the percentage of pixels in the zone that are in blobs divided by the square root of the number of blobs and then divided by the size of the zone. This gives a nominal maximum of 100 for a zone and the totals for each zone are added together, Active zones scores are added unchanged, Inclusive zones are halved first and Exclusive zones are doubled. In reality values are likely to be much less than 100 but it does give a simple indication of how major the event was.
|
|
@ -1,10 +1,17 @@
|
|||
# CMakeLists.txt for the ZoneMinder misc files
|
||||
|
||||
# Create files from the .in files
|
||||
configure_file(apache.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/apache.conf @ONLY)
|
||||
configure_file(logrotate.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/logrotate.conf @ONLY)
|
||||
configure_file(syslog.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/syslog.conf @ONLY)
|
||||
configure_file(apache.conf.in "${CMAKE_CURRENT_BINARY_DIR}/apache.conf" @ONLY)
|
||||
configure_file(logrotate.conf.in "${CMAKE_CURRENT_BINARY_DIR}/logrotate.conf" @ONLY)
|
||||
configure_file(syslog.conf.in "${CMAKE_CURRENT_BINARY_DIR}/syslog.conf" @ONLY)
|
||||
configure_file(com.zoneminder.systemctl.policy.in "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.policy" @ONLY)
|
||||
configure_file(com.zoneminder.systemctl.rules.in "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.rules" @ONLY)
|
||||
configure_file(zoneminder.service.in "${CMAKE_CURRENT_BINARY_DIR}/zoneminder.service" @ONLY)
|
||||
|
||||
# Install the misc files
|
||||
install(FILES apache.conf logrotate.conf syslog.conf DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/misc")
|
||||
# Do not install the misc files by default
|
||||
#install(FILES "${CMAKE_CURRENT_BINARY_DIR}/apache.conf" "${CMAKE_CURRENT_BINARY_DIR}/logrotate.conf" "${CMAKE_CURRENT_BINARY_DIR}/syslog.conf" DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/misc")
|
||||
|
||||
# Install Policykit rules and actions into the proper folders
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.policy" DESTINATION "${PC_POLKIT_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/actions")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.rules" DESTINATION "${PC_POLKIT_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/rules.d")
|
||||
|
||||
|
|
|
@ -3,4 +3,14 @@ AUTOMAKE_OPTIONS = gnu
|
|||
EXTRA_DIST = \
|
||||
apache.conf.in \
|
||||
logrotate.conf.in \
|
||||
syslog.conf.in
|
||||
syslog.conf.in \
|
||||
zoneminder.service.in \
|
||||
com.zoneminder.systemctl.policy.in \
|
||||
com.zoneminder.systemctl.rules.in
|
||||
|
||||
polkit_actiondir = @POLKIT_PREFIX@/share/polkit-1/actions
|
||||
dist_polkit_action_DATA = com.zoneminder.systemctl.policy
|
||||
|
||||
polkit_rulesdir = @POLKIT_PREFIX@/share/polkit-1/rules.d
|
||||
dist_polkit_rules_DATA = com.zoneminder.systemctl.rules
|
||||
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE policyconfig PUBLIC
|
||||
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
|
||||
<policyconfig>
|
||||
|
||||
<vendor>The ZoneMinder Project</vendor>
|
||||
<vendor_url>http://www.zoneminder.com/</vendor_url>
|
||||
|
||||
<action id="com.zoneminder.policykit.pkexec.run-zmsystemctl">
|
||||
<description>Allow the ZoneMinder webuser to run zmsystemctl.pl</description>
|
||||
<message>The ZoneMinder webuser is trusted to run zmsystemctl.pl</message>
|
||||
<defaults>
|
||||
<allow_any>yes</allow_any>
|
||||
<allow_inactive>yes</allow_inactive>
|
||||
<allow_active>yes</allow_active>
|
||||
</defaults>
|
||||
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/perl</annotate>
|
||||
<annotate key="org.freedesktop.policykit.exec.argv1">@BINDIR@/zmsystemctl.pl</annotate>
|
||||
</action>
|
||||
|
||||
</policyconfig>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue