Merge branch 'master' into zms_no_crash
commit
3c5a9b796b
|
@ -1,5 +1,6 @@
|
||||||
configure
|
configure
|
||||||
config.h.in
|
config.h.in
|
||||||
|
config.h.in~
|
||||||
autom4te.cache
|
autom4te.cache
|
||||||
aclocal.m4
|
aclocal.m4
|
||||||
depcomp
|
depcomp
|
||||||
|
@ -12,7 +13,7 @@ scripts/ZoneMinder/blib
|
||||||
Makefile.in
|
Makefile.in
|
||||||
Makefile
|
Makefile
|
||||||
docs/_build
|
docs/_build
|
||||||
|
compile
|
||||||
config.guess
|
config.guess
|
||||||
config.h
|
config.h
|
||||||
config.log
|
config.log
|
||||||
|
@ -24,6 +25,12 @@ misc/com.zoneminder.systemctl.policy
|
||||||
misc/com.zoneminder.systemctl.rules
|
misc/com.zoneminder.systemctl.rules
|
||||||
misc/logrotate.conf
|
misc/logrotate.conf
|
||||||
misc/syslog.conf
|
misc/syslog.conf
|
||||||
|
onvif/modules/MYMETA.json
|
||||||
|
onvif/modules/MYMETA.yml
|
||||||
|
onvif/proxy/MYMETA.json
|
||||||
|
onvif/proxy/MYMETA.yml
|
||||||
|
scripts/ZoneMinder/Makefile.old
|
||||||
|
scripts/ZoneMinder/MYMETA.json
|
||||||
scripts/ZoneMinder/MYMETA.yml
|
scripts/ZoneMinder/MYMETA.yml
|
||||||
scripts/ZoneMinder/lib/ZoneMinder/Base.pm
|
scripts/ZoneMinder/lib/ZoneMinder/Base.pm
|
||||||
scripts/ZoneMinder/lib/ZoneMinder/Config.pm
|
scripts/ZoneMinder/lib/ZoneMinder/Config.pm
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
[submodule "web/api/app/Plugin/Crud"]
|
||||||
|
path = web/api/app/Plugin/Crud
|
||||||
|
url = https://github.com/FriendsOfCake/crud.git
|
|
@ -32,8 +32,8 @@ install:
|
||||||
- sudo make install-libs
|
- sudo make install-libs
|
||||||
before_script:
|
before_script:
|
||||||
- cd $TRAVIS_BUILD_DIR
|
- cd $TRAVIS_BUILD_DIR
|
||||||
- if [ "$ZM_BUILDMETHOD" = "autotools" ]; then libtoolize --force; fi
|
- if [ "$ZM_BUILDMETHOD" = "autotools" ]; then libtoolize -v --force; fi
|
||||||
- if [ "$ZM_BUILDMETHOD" = "autotools" ]; then aclocal; fi
|
- if [ "$ZM_BUILDMETHOD" = "autotools" ]; then aclocal -I m4; fi
|
||||||
- if [ "$ZM_BUILDMETHOD" = "autotools" ]; then autoheader; fi
|
- if [ "$ZM_BUILDMETHOD" = "autotools" ]; then autoheader; fi
|
||||||
- if [ "$ZM_BUILDMETHOD" = "autotools" ]; then automake --force-missing --add-missing; fi
|
- if [ "$ZM_BUILDMETHOD" = "autotools" ]; then automake --force-missing --add-missing; fi
|
||||||
- if [ "$ZM_BUILDMETHOD" = "autotools" ]; then autoconf; fi
|
- if [ "$ZM_BUILDMETHOD" = "autotools" ]; then autoconf; fi
|
||||||
|
|
275
CMakeLists.txt
275
CMakeLists.txt
|
@ -1,31 +1,57 @@
|
||||||
# Main CMake file for the ZoneMinder project.
|
# Main CMake file for the ZoneMinder project.
|
||||||
# Created by mastertheknife (Kfir Itzhak)
|
# Created by mastertheknife (Kfir Itzhak)
|
||||||
# The goal is to ease up the installation of zoneminder.
|
|
||||||
# Our current installation method (using autotools) is outdated, slow and breaks now and then.
|
|
||||||
# The CMake installation method will require no parameters at all, default should sufficient and reliable.
|
|
||||||
# It will be still possible to install ZoneMinder using autotools, they don't conflict with each other. The cmake way is a complete re-write (different syntax) and aims to be identical to the autotools way,
|
|
||||||
# by having options using the same name and leaving ZM totally unmodified, while providing exactly the same things that ZM expects (config.h, configuration in *.in files, etc).
|
|
||||||
#
|
|
||||||
# For more information and installation, see the INSTALL file
|
# For more information and installation, see the INSTALL file
|
||||||
#
|
#
|
||||||
cmake_minimum_required (VERSION 2.6)
|
cmake_minimum_required (VERSION 2.6)
|
||||||
project (zoneminder)
|
project (zoneminder)
|
||||||
set(zoneminder_VERSION "1.28.1")
|
set(zoneminder_VERSION "1.28.1")
|
||||||
|
# make API version a minor of ZM version
|
||||||
|
set(zoneminder_API_VERSION "${zoneminder_VERSION}.1")
|
||||||
|
|
||||||
# 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.
|
# CMake does not allow out-of-source build if CMakeCache.exists
|
||||||
if((NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)) AND (EXISTS "${CMAKE_SOURCE_DIR}/CMakeCache.txt"))
|
# in the source folder. Abort and notify the user
|
||||||
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.")
|
if(
|
||||||
endif((NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)) AND (EXISTS "${CMAKE_SOURCE_DIR}/CMakeCache.txt"))
|
(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.
|
# Default build type. To change the build type,
|
||||||
|
# use the CMAKE_BUILD_TYPE configuration option.
|
||||||
if(NOT CMAKE_BUILD_TYPE)
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type: Release or Debug" FORCE)
|
set(CMAKE_BUILD_TYPE
|
||||||
|
Release CACHE STRING "Build type: Release or Debug" FORCE)
|
||||||
endif(NOT CMAKE_BUILD_TYPE)
|
endif(NOT CMAKE_BUILD_TYPE)
|
||||||
|
|
||||||
# Can assist in troubleshooting
|
# Can assist in troubleshooting
|
||||||
#set(CMAKE_VERBOSE_MAKEFILE ON)
|
#set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||||
#set(CMAKE_INSTALL_ALWAYS ON)
|
#set(CMAKE_INSTALL_ALWAYS ON)
|
||||||
|
|
||||||
|
# Host OS Check
|
||||||
|
set(HOST_OS "")
|
||||||
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||||
|
set(HOST_OS "linux")
|
||||||
|
endif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||||
|
if(${CMAKE_SYSTEM_NAME} MATCHES ".*(SunOS|Solaris).*")
|
||||||
|
set(HOST_OS "solaris")
|
||||||
|
set(SOLARIS 1)
|
||||||
|
endif(${CMAKE_SYSTEM_NAME} MATCHES ".*(SunOS|Solaris).*")
|
||||||
|
if(${CMAKE_SYSTEM_NAME} MATCHES ".*BSD.*")
|
||||||
|
set(HOST_OS "BSD")
|
||||||
|
set(BSD 1)
|
||||||
|
endif(${CMAKE_SYSTEM_NAME} MATCHES ".*BSD.*")
|
||||||
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
|
||||||
|
set(HOST_OS "darwin")
|
||||||
|
endif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
|
||||||
|
if(NOT HOST_OS)
|
||||||
|
message(FATAL_ERROR
|
||||||
|
"ZoneMinder was unable to deterimine the host OS. Please report this. Value of CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}")
|
||||||
|
endif(NOT HOST_OS)
|
||||||
|
|
||||||
# Default CLFAGS and CXXFLAGS:
|
# Default CLFAGS and CXXFLAGS:
|
||||||
set(CMAKE_C_FLAGS_RELEASE "-Wall -D__STDC_CONSTANT_MACROS -O2")
|
set(CMAKE_C_FLAGS_RELEASE "-Wall -D__STDC_CONSTANT_MACROS -O2")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -D__STDC_CONSTANT_MACROS -O2")
|
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -D__STDC_CONSTANT_MACROS -O2")
|
||||||
|
@ -42,35 +68,80 @@ include (CheckFunctionExists)
|
||||||
include (CheckPrototypeDefinition_fixed)
|
include (CheckPrototypeDefinition_fixed)
|
||||||
include (CheckTypeSize)
|
include (CheckTypeSize)
|
||||||
include (CheckStructHasMember)
|
include (CheckStructHasMember)
|
||||||
|
include (CheckSendfile)
|
||||||
|
|
||||||
# Configuration options
|
# 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 ZM_CONFIG_DIR)
|
mark_as_advanced(
|
||||||
set(ZM_RUNDIR "/var/run/zm" CACHE PATH "Location of transient process files, default: /var/run/zm")
|
FORCE ZM_EXTRA_LIBS
|
||||||
set(ZM_SOCKDIR "/var/run/zm" CACHE PATH "Location of Unix domain socket files, default /var/run/zm")
|
ZM_MYSQL_ENGINE
|
||||||
set(ZM_TMPDIR "/var/tmp/zm" CACHE PATH "Location of temporary files, default: /tmp/zm")
|
ZM_NO_MMAP
|
||||||
set(ZM_LOGDIR "/var/log/zm" CACHE PATH "Location of generated log files, default: /var/log/zm")
|
CMAKE_INSTALL_FULL_BINDIR
|
||||||
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")
|
ZM_PERL_MM_PARMS
|
||||||
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")
|
ZM_PERL_SEARCH_PATH
|
||||||
set(ZM_CONTENTDIR "/var/lib/zoneminder" CACHE PATH "Location of dynamic content (events and images), default: /var/lib/zoneminder")
|
ZM_TARGET_DISTRO
|
||||||
set(ZM_DB_HOST "localhost" CACHE STRING "Hostname where ZoneMinder database located, default: localhost")
|
ZM_CONFIG_DIR)
|
||||||
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")
|
set(ZM_RUNDIR "/var/run/zm" CACHE PATH
|
||||||
set(ZM_DB_PASS "zmpass" CACHE STRING "Password of ZoneMinder database user, default: zmpass")
|
"Location of transient process files, default: /var/run/zm")
|
||||||
set(ZM_WEB_USER "" CACHE STRING "The user apache or the local web server runs on. Leave empty for automatic detection. If that fails, you can use this variable to force")
|
set(ZM_SOCKDIR "/var/run/zm" CACHE PATH
|
||||||
set(ZM_WEB_GROUP "" CACHE STRING "The group apache or the local web server runs on, Leave empty to be the same as the web user")
|
"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")
|
||||||
|
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")
|
||||||
|
set(ZM_DB_PASS "zmpass" CACHE STRING
|
||||||
|
"Password of ZoneMinder database user, default: zmpass")
|
||||||
|
set(ZM_WEB_USER "" CACHE STRING
|
||||||
|
"The user apache or the local web server runs on. Leave empty for automatic detection.
|
||||||
|
If that fails, you can use this variable to force")
|
||||||
|
set(ZM_WEB_GROUP "" CACHE STRING
|
||||||
|
"The group apache or the local web server runs on,
|
||||||
|
Leave empty to be the same as the web user")
|
||||||
# Advanced
|
# Advanced
|
||||||
set(ZM_CONFIG_DIR "/${CMAKE_INSTALL_SYSCONFDIR}" CACHE PATH "Location of ZoneMinder configuration, default system config directory")
|
set(ZM_CONFIG_DIR "/${CMAKE_INSTALL_SYSCONFDIR}" CACHE PATH
|
||||||
set(ZM_EXTRA_LIBS "" CACHE STRING "A list of optional libraries, separated by semicolons, e.g. ssl;theora")
|
"Location of ZoneMinder configuration, default system config directory")
|
||||||
set(ZM_MYSQL_ENGINE "InnoDB" CACHE STRING "MySQL engine to use with database, default: InnoDB")
|
set(ZM_EXTRA_LIBS "" CACHE STRING
|
||||||
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")
|
"A list of optional libraries, separated by semicolons, e.g. ssl;theora")
|
||||||
set(ZM_NO_FFMPEG "OFF" CACHE BOOL "Set to ON to skip ffmpeg checks and force building ZM without ffmpeg. default: OFF")
|
set(ZM_MYSQL_ENGINE "InnoDB" CACHE STRING
|
||||||
set(ZM_NO_LIBVLC "OFF" CACHE BOOL "Set to ON to skip libvlc checks and force building ZM without libvlc. default: OFF")
|
"MySQL engine to use with database, default: InnoDB")
|
||||||
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_MMAP "OFF" CACHE BOOL
|
||||||
set(ZM_NO_X10 "OFF" CACHE BOOL "Set to ON to build ZoneMinder without X10 support. default: OFF")
|
"Set to ON to not use mmap shared memory. Shouldn't be enabled unless you
|
||||||
set(ZM_ONVIF "OFF" CACHE BOOL "Set to ON to enable basic ONVIF support. This is EXPERIMENTAL and may not work with all cameras claiming to be ONVIF compliant. default: OFF")
|
experience problems with the shared memory. 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_NO_FFMPEG "OFF" CACHE BOOL
|
||||||
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 to ON to skip ffmpeg checks and force building ZM without ffmpeg. default: OFF")
|
||||||
set(ZM_TARGET_DISTRO "" CACHE STRING "Build ZoneMinder for a specific distribution. Currently, valid names are: f21, f20, el6, OS13")
|
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_ONVIF "OFF" CACHE BOOL
|
||||||
|
"Set to ON to enable basic ONVIF support. This is EXPERIMENTAL and may not
|
||||||
|
work with all cameras claiming to be ONVIF compliant. default: OFF")
|
||||||
|
set(ZM_PERL_MM_PARMS INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 CACHE STRING
|
||||||
|
"By default, ZoneMinder's Perl modules are installed into the Vendor folders,
|
||||||
|
as defined by your installation of Perl. You can change that here. Consult Perl's
|
||||||
|
MakeMaker documentation for a definition of acceptable parameters. If you set this
|
||||||
|
to something that causes the modules to be installed outside Perl's normal search
|
||||||
|
path, then you will also need to set ZM_PERL_SEARCH_PATH accordingly.")
|
||||||
|
set(ZM_PERL_SEARCH_PATH "" CACHE PATH
|
||||||
|
"Use to add a folder to your Perl's search path. This will need to be set in cases
|
||||||
|
where ZM_PERL_MM_PARMS has been modified such that ZoneMinder's Perl modules are
|
||||||
|
installed outside Perl's default search path.")
|
||||||
|
set(ZM_TARGET_DISTRO "" CACHE STRING
|
||||||
|
"Build ZoneMinder for a specific distribution. Currently, valid names are: f21, f20, el6, OS13")
|
||||||
|
|
||||||
# Reassign some variables if a target distro has been specified
|
# Reassign some variables if a target distro has been specified
|
||||||
if((ZM_TARGET_DISTRO STREQUAL "f21") OR (ZM_TARGET_DISTRO STREQUAL "f20"))
|
if((ZM_TARGET_DISTRO STREQUAL "f21") OR (ZM_TARGET_DISTRO STREQUAL "f20"))
|
||||||
|
@ -105,14 +176,19 @@ elseif(ZM_TARGET_DISTRO STREQUAL "OS13")
|
||||||
endif((ZM_TARGET_DISTRO STREQUAL "f21") OR (ZM_TARGET_DISTRO STREQUAL "f20"))
|
endif((ZM_TARGET_DISTRO STREQUAL "f21") OR (ZM_TARGET_DISTRO STREQUAL "f20"))
|
||||||
|
|
||||||
# Required for certain checks to work
|
# Required for certain checks to work
|
||||||
set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} stdio.h stdlib.h math.h signal.h)
|
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
|
# Required for including headers from the this folder
|
||||||
include_directories("${CMAKE_BINARY_DIR}")
|
include_directories("${CMAKE_BINARY_DIR}")
|
||||||
# This is required to enable searching in lib64 (if exists), do not change
|
# This is required to enable searching in lib64 (if exists), do not change
|
||||||
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)
|
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)
|
||||||
|
|
||||||
# System checks
|
# System checks
|
||||||
check_include_file("linux/videodev.h" HAVE_LINUX_VIDEODEV_H)
|
check_include_file("libv4l1-videodev.h" HAVE_LIBV4L1_VIDEODEV_H)
|
||||||
|
if(NOT HAVE_LIBV4L1_VIDEODEV_H)
|
||||||
|
check_include_file("linux/videodev.h" HAVE_LINUX_VIDEODEV_H)
|
||||||
|
endif(NOT HAVE_LIBV4L1_VIDEODEV_H)
|
||||||
check_include_file("linux/videodev2.h" HAVE_LINUX_VIDEODEV2_H)
|
check_include_file("linux/videodev2.h" HAVE_LINUX_VIDEODEV2_H)
|
||||||
check_include_file("execinfo.h" HAVE_EXECINFO_H)
|
check_include_file("execinfo.h" HAVE_EXECINFO_H)
|
||||||
check_include_file("ucontext.h" HAVE_UCONTEXT_H)
|
check_include_file("ucontext.h" HAVE_UCONTEXT_H)
|
||||||
|
@ -167,10 +243,12 @@ if(JPEG_FOUND)
|
||||||
set(CMAKE_REQUIRED_INCLUDES "${JPEG_INCLUDE_DIR}")
|
set(CMAKE_REQUIRED_INCLUDES "${JPEG_INCLUDE_DIR}")
|
||||||
check_include_files("stdio.h;jpeglib.h" HAVE_JPEGLIB_H)
|
check_include_files("stdio.h;jpeglib.h" HAVE_JPEGLIB_H)
|
||||||
if(NOT HAVE_JPEGLIB_H)
|
if(NOT HAVE_JPEGLIB_H)
|
||||||
message(FATAL_ERROR " zm requires libjpeg headers - check that libjpeg development packages are installed")
|
message(FATAL_ERROR
|
||||||
|
"ZoneMinder requires libjpeg headers - check that libjpeg development packages are installed")
|
||||||
endif(NOT HAVE_JPEGLIB_H)
|
endif(NOT HAVE_JPEGLIB_H)
|
||||||
else(JPEG_FOUND)
|
else(JPEG_FOUND)
|
||||||
message(FATAL_ERROR "zm requires jpeg but it was not found on your system")
|
message(FATAL_ERROR
|
||||||
|
"ZoneMinder requires jpeg but it was not found on your system")
|
||||||
endif(JPEG_FOUND)
|
endif(JPEG_FOUND)
|
||||||
|
|
||||||
# OpenSSL
|
# OpenSSL
|
||||||
|
@ -200,10 +278,12 @@ if(PTHREAD_LIBRARIES)
|
||||||
mark_as_advanced(FORCE PTHREAD_LIBRARIES PTHREAD_INCLUDE_DIR)
|
mark_as_advanced(FORCE PTHREAD_LIBRARIES PTHREAD_INCLUDE_DIR)
|
||||||
check_include_file("pthread.h" HAVE_PTHREAD_H)
|
check_include_file("pthread.h" HAVE_PTHREAD_H)
|
||||||
if(NOT HAVE_PTHREAD_H)
|
if(NOT HAVE_PTHREAD_H)
|
||||||
message(FATAL_ERROR " zm requires pthread headers - check that pthread development packages are installed")
|
message(FATAL_ERROR
|
||||||
|
"ZoneMinder requires pthread headers - check that pthread development packages are installed")
|
||||||
endif(NOT HAVE_PTHREAD_H)
|
endif(NOT HAVE_PTHREAD_H)
|
||||||
else(PTHREAD_LIBRARIES)
|
else(PTHREAD_LIBRARIES)
|
||||||
message(FATAL_ERROR "zm requires pthread but it was not found on your system")
|
message(FATAL_ERROR
|
||||||
|
"ZoneMinder requires pthread but it was not found on your system")
|
||||||
endif(PTHREAD_LIBRARIES)
|
endif(PTHREAD_LIBRARIES)
|
||||||
|
|
||||||
# pcre (using find_library and find_path)
|
# pcre (using find_library and find_path)
|
||||||
|
@ -275,10 +355,12 @@ if(MYSQLCLIENT_LIBRARIES)
|
||||||
mark_as_advanced(FORCE MYSQLCLIENT_LIBRARIES MYSQLCLIENT_INCLUDE_DIR)
|
mark_as_advanced(FORCE MYSQLCLIENT_LIBRARIES MYSQLCLIENT_INCLUDE_DIR)
|
||||||
check_include_file("mysql/mysql.h" HAVE_MYSQL_H)
|
check_include_file("mysql/mysql.h" HAVE_MYSQL_H)
|
||||||
if(NOT HAVE_MYSQL_H)
|
if(NOT HAVE_MYSQL_H)
|
||||||
message(FATAL_ERROR "zm requires MySQL headers - check that MySQL development packages are installed")
|
message(FATAL_ERROR
|
||||||
|
"ZoneMinder requires MySQL headers - check that MySQL development packages are installed")
|
||||||
endif(NOT HAVE_MYSQL_H)
|
endif(NOT HAVE_MYSQL_H)
|
||||||
else(MYSQLCLIENT_LIBRARIES)
|
else(MYSQLCLIENT_LIBRARIES)
|
||||||
message(FATAL_ERROR "zm requires mysqlclient but it was not found on your system")
|
message(FATAL_ERROR
|
||||||
|
"ZoneMinder requires mysqlclient but it was not found on your system")
|
||||||
endif(MYSQLCLIENT_LIBRARIES)
|
endif(MYSQLCLIENT_LIBRARIES)
|
||||||
|
|
||||||
set(PATH_FFMPEG "")
|
set(PATH_FFMPEG "")
|
||||||
|
@ -290,7 +372,7 @@ if(NOT ZM_NO_FFMPEG)
|
||||||
if(AVFORMAT_LIBRARIES)
|
if(AVFORMAT_LIBRARIES)
|
||||||
set(HAVE_LIBAVFORMAT 1)
|
set(HAVE_LIBAVFORMAT 1)
|
||||||
list(APPEND ZM_BIN_LIBS "${AVFORMAT_LIBRARIES}")
|
list(APPEND ZM_BIN_LIBS "${AVFORMAT_LIBRARIES}")
|
||||||
find_path(AVFORMAT_INCLUDE_DIR "libavformat/avformat.h")
|
find_path(AVFORMAT_INCLUDE_DIR "libavformat/avformat.h" /usr/include/ffmpeg)
|
||||||
if(AVFORMAT_INCLUDE_DIR)
|
if(AVFORMAT_INCLUDE_DIR)
|
||||||
include_directories("${AVFORMAT_INCLUDE_DIR}")
|
include_directories("${AVFORMAT_INCLUDE_DIR}")
|
||||||
set(CMAKE_REQUIRED_INCLUDES "${AVFORMAT_INCLUDE_DIR}")
|
set(CMAKE_REQUIRED_INCLUDES "${AVFORMAT_INCLUDE_DIR}")
|
||||||
|
@ -307,7 +389,7 @@ if(NOT ZM_NO_FFMPEG)
|
||||||
if(AVCODEC_LIBRARIES)
|
if(AVCODEC_LIBRARIES)
|
||||||
set(HAVE_LIBAVCODEC 1)
|
set(HAVE_LIBAVCODEC 1)
|
||||||
list(APPEND ZM_BIN_LIBS "${AVCODEC_LIBRARIES}")
|
list(APPEND ZM_BIN_LIBS "${AVCODEC_LIBRARIES}")
|
||||||
find_path(AVCODEC_INCLUDE_DIR "libavcodec/avcodec.h")
|
find_path(AVCODEC_INCLUDE_DIR "libavcodec/avcodec.h" /usr/include/ffmpeg)
|
||||||
if(AVCODEC_INCLUDE_DIR)
|
if(AVCODEC_INCLUDE_DIR)
|
||||||
include_directories("${AVCODEC_INCLUDE_DIR}")
|
include_directories("${AVCODEC_INCLUDE_DIR}")
|
||||||
set(CMAKE_REQUIRED_INCLUDES "${AVCODEC_INCLUDE_DIR}")
|
set(CMAKE_REQUIRED_INCLUDES "${AVCODEC_INCLUDE_DIR}")
|
||||||
|
@ -324,7 +406,7 @@ if(NOT ZM_NO_FFMPEG)
|
||||||
if(AVDEVICE_LIBRARIES)
|
if(AVDEVICE_LIBRARIES)
|
||||||
set(HAVE_LIBAVDEVICE 1)
|
set(HAVE_LIBAVDEVICE 1)
|
||||||
list(APPEND ZM_BIN_LIBS "${AVDEVICE_LIBRARIES}")
|
list(APPEND ZM_BIN_LIBS "${AVDEVICE_LIBRARIES}")
|
||||||
find_path(AVDEVICE_INCLUDE_DIR "libavdevice/avdevice.h")
|
find_path(AVDEVICE_INCLUDE_DIR "libavdevice/avdevice.h" /usr/include/ffmpeg)
|
||||||
if(AVDEVICE_INCLUDE_DIR)
|
if(AVDEVICE_INCLUDE_DIR)
|
||||||
include_directories("${AVDEVICE_INCLUDE_DIR}")
|
include_directories("${AVDEVICE_INCLUDE_DIR}")
|
||||||
set(CMAKE_REQUIRED_INCLUDES "${AVDEVICE_INCLUDE_DIR}")
|
set(CMAKE_REQUIRED_INCLUDES "${AVDEVICE_INCLUDE_DIR}")
|
||||||
|
@ -341,7 +423,7 @@ if(NOT ZM_NO_FFMPEG)
|
||||||
if(AVUTIL_LIBRARIES)
|
if(AVUTIL_LIBRARIES)
|
||||||
set(HAVE_LIBAVUTIL 1)
|
set(HAVE_LIBAVUTIL 1)
|
||||||
list(APPEND ZM_BIN_LIBS "${AVUTIL_LIBRARIES}")
|
list(APPEND ZM_BIN_LIBS "${AVUTIL_LIBRARIES}")
|
||||||
find_path(AVUTIL_INCLUDE_DIR "libavutil/avutil.h")
|
find_path(AVUTIL_INCLUDE_DIR "libavutil/avutil.h" /usr/include/ffmpeg)
|
||||||
if(AVUTIL_INCLUDE_DIR)
|
if(AVUTIL_INCLUDE_DIR)
|
||||||
include_directories("${AVUTIL_INCLUDE_DIR}")
|
include_directories("${AVUTIL_INCLUDE_DIR}")
|
||||||
set(CMAKE_REQUIRED_INCLUDES "${AVUTIL_INCLUDE_DIR}")
|
set(CMAKE_REQUIRED_INCLUDES "${AVUTIL_INCLUDE_DIR}")
|
||||||
|
@ -359,7 +441,7 @@ if(NOT ZM_NO_FFMPEG)
|
||||||
if(SWSCALE_LIBRARIES)
|
if(SWSCALE_LIBRARIES)
|
||||||
set(HAVE_LIBSWSCALE 1)
|
set(HAVE_LIBSWSCALE 1)
|
||||||
list(APPEND ZM_BIN_LIBS "${SWSCALE_LIBRARIES}")
|
list(APPEND ZM_BIN_LIBS "${SWSCALE_LIBRARIES}")
|
||||||
find_path(SWSCALE_INCLUDE_DIR "libswscale/swscale.h")
|
find_path(SWSCALE_INCLUDE_DIR "libswscale/swscale.h" /usr/include/ffmpeg)
|
||||||
if(SWSCALE_INCLUDE_DIR)
|
if(SWSCALE_INCLUDE_DIR)
|
||||||
include_directories("${SWSCALE_INCLUDE_DIR}")
|
include_directories("${SWSCALE_INCLUDE_DIR}")
|
||||||
set(CMAKE_REQUIRED_INCLUDES "${SWSCALE_INCLUDE_DIR}")
|
set(CMAKE_REQUIRED_INCLUDES "${SWSCALE_INCLUDE_DIR}")
|
||||||
|
@ -372,7 +454,9 @@ if(NOT ZM_NO_FFMPEG)
|
||||||
endif(SWSCALE_LIBRARIES)
|
endif(SWSCALE_LIBRARIES)
|
||||||
|
|
||||||
# Find the path to the ffmpeg executable
|
# Find the path to the ffmpeg executable
|
||||||
find_program(FFMPEG_EXECUTABLE ffmpeg PATH_SUFFIXES ffmpeg)
|
find_program(FFMPEG_EXECUTABLE
|
||||||
|
NAMES ffmpeg avconv
|
||||||
|
PATH_SUFFIXES ffmpeg)
|
||||||
if(FFMPEG_EXECUTABLE)
|
if(FFMPEG_EXECUTABLE)
|
||||||
set(PATH_FFMPEG "${FFMPEG_EXECUTABLE}")
|
set(PATH_FFMPEG "${FFMPEG_EXECUTABLE}")
|
||||||
set(OPT_FFMPEG "yes")
|
set(OPT_FFMPEG "yes")
|
||||||
|
@ -405,7 +489,8 @@ endif(NOT ZM_NO_LIBVLC)
|
||||||
|
|
||||||
# Check for gnutls or crypto
|
# Check for gnutls or crypto
|
||||||
if((NOT HAVE_LIBCRYPTO) AND (NOT HAVE_LIBGNUTLS))
|
if((NOT HAVE_LIBCRYPTO) AND (NOT HAVE_LIBGNUTLS))
|
||||||
message(FATAL_ERROR " zm requires crypto or gnutls but none were found on your system")
|
message(FATAL_ERROR
|
||||||
|
"ZoneMinder requires crypto or gnutls but none were found on your system")
|
||||||
endif((NOT HAVE_LIBCRYPTO) AND (NOT HAVE_LIBGNUTLS))
|
endif((NOT HAVE_LIBCRYPTO) AND (NOT HAVE_LIBGNUTLS))
|
||||||
|
|
||||||
# Check for V4L header files and enable ZM_HAS_V4L, ZM_HAS_V4L1, ZM_HAS_V4L2 accordingly
|
# Check for V4L header files and enable ZM_HAS_V4L, ZM_HAS_V4L1, ZM_HAS_V4L2 accordingly
|
||||||
|
@ -413,17 +498,22 @@ endif((NOT HAVE_LIBCRYPTO) AND (NOT HAVE_LIBGNUTLS))
|
||||||
set(ZM_HAS_V4L 0)
|
set(ZM_HAS_V4L 0)
|
||||||
set(ZM_HAS_V4L1 0)
|
set(ZM_HAS_V4L1 0)
|
||||||
set(ZM_HAS_V4L2 0)
|
set(ZM_HAS_V4L2 0)
|
||||||
if(HAVE_LINUX_VIDEODEV_H)
|
if(HAVE_LINUX_VIDEODEV_H OR HAVE_LIBV4L1_VIDEODEV_H)
|
||||||
set(ZM_HAS_V4L 1)
|
set(ZM_HAS_V4L 1)
|
||||||
set(ZM_HAS_V4L1 1)
|
set(ZM_HAS_V4L1 1)
|
||||||
endif(HAVE_LINUX_VIDEODEV_H)
|
endif(HAVE_LINUX_VIDEODEV_H OR HAVE_LIBV4L1_VIDEODEV_H)
|
||||||
if(HAVE_LINUX_VIDEODEV2_H)
|
if(HAVE_LINUX_VIDEODEV2_H)
|
||||||
set(ZM_HAS_V4L 1)
|
set(ZM_HAS_V4L 1)
|
||||||
set(ZM_HAS_V4L2 1)
|
set(ZM_HAS_V4L2 1)
|
||||||
endif(HAVE_LINUX_VIDEODEV2_H)
|
endif(HAVE_LINUX_VIDEODEV2_H)
|
||||||
if((NOT HAVE_LINUX_VIDEODEV_H) AND (NOT HAVE_LINUX_VIDEODEV2_H))
|
if((NOT HAVE_LINUX_VIDEODEV_H)
|
||||||
message(AUTHOR_WARNING " Video 4 Linux headers weren't found - Analog and USB camera support will not be available")
|
AND (NOT HAVE_LIBV4L1_VIDEODEV_H)
|
||||||
endif((NOT HAVE_LINUX_VIDEODEV_H) AND (NOT HAVE_LINUX_VIDEODEV2_H))
|
AND (NOT HAVE_LINUX_VIDEODEV2_H))
|
||||||
|
message(AUTHOR_WARNING
|
||||||
|
"Video 4 Linux headers weren't found - Analog and USB camera support will not be available")
|
||||||
|
endif((NOT HAVE_LINUX_VIDEODEV_H)
|
||||||
|
AND (NOT HAVE_LIBV4L1_VIDEODEV_H)
|
||||||
|
AND (NOT HAVE_LINUX_VIDEODEV2_H))
|
||||||
# Check for PCRE and enable ZM_PCRE accordingly
|
# Check for PCRE and enable ZM_PCRE accordingly
|
||||||
set(ZM_PCRE 0)
|
set(ZM_PCRE 0)
|
||||||
if(HAVE_LIBPCRE AND HAVE_PCRE_H)
|
if(HAVE_LIBPCRE AND HAVE_PCRE_H)
|
||||||
|
@ -444,26 +534,37 @@ if(ZM_ONVIF)
|
||||||
set(ZM_HAS_ONVIF 1)
|
set(ZM_HAS_ONVIF 1)
|
||||||
endif(ZM_ONVIF)
|
endif(ZM_ONVIF)
|
||||||
|
|
||||||
# Check for authenication functions
|
# Check for authentication functions
|
||||||
if(HAVE_OPENSSL_MD5_H)
|
if(HAVE_OPENSSL_MD5_H)
|
||||||
set(CMAKE_REQUIRED_LIBRARIES "${OPENSSL_LIBRARIES}")
|
set(CMAKE_REQUIRED_LIBRARIES "${OPENSSL_LIBRARIES}")
|
||||||
set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}")
|
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)
|
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)
|
endif(HAVE_OPENSSL_MD5_H)
|
||||||
if(HAVE_GNUTLS_OPENSSL_H)
|
if(HAVE_GNUTLS_OPENSSL_H)
|
||||||
set(CMAKE_REQUIRED_LIBRARIES "${GNUTLS_LIBRARIES}")
|
set(CMAKE_REQUIRED_LIBRARIES "${GNUTLS_LIBRARIES}")
|
||||||
set(CMAKE_REQUIRED_INCLUDES "${GNUTLS_INCLUDE_DIR}")
|
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)
|
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)
|
endif(HAVE_GNUTLS_OPENSSL_H)
|
||||||
if(HAVE_GNUTLS_GNUTLS_H)
|
if(HAVE_GNUTLS_GNUTLS_H)
|
||||||
set(CMAKE_REQUIRED_LIBRARIES "${GNUTLS_LIBRARIES}")
|
set(CMAKE_REQUIRED_LIBRARIES "${GNUTLS_LIBRARIES}")
|
||||||
set(CMAKE_REQUIRED_INCLUDES "${GNUTLS_INCLUDE_DIR}")
|
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)
|
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)
|
endif(HAVE_GNUTLS_GNUTLS_H)
|
||||||
if(HAVE_MD5_OPENSSL OR HAVE_MD5_GNUTLS)
|
if(HAVE_MD5_OPENSSL OR HAVE_MD5_GNUTLS)
|
||||||
set(HAVE_DECL_MD5 1)
|
set(HAVE_DECL_MD5 1)
|
||||||
else(HAVE_MD5_OPENSSL OR HAVE_MD5_GNUTLS)
|
else(HAVE_MD5_OPENSSL OR HAVE_MD5_GNUTLS)
|
||||||
message(AUTHOR_WARNING " ZM requires a working MD5 function for hashed authenication but none were found - hashed authenication will not be available")
|
message(AUTHOR_WARNING
|
||||||
|
"ZoneMinder requires a working MD5 function for hashed authenication but
|
||||||
|
none were found - hashed authenication will not be available")
|
||||||
endif(HAVE_MD5_OPENSSL OR HAVE_MD5_GNUTLS)
|
endif(HAVE_MD5_OPENSSL OR HAVE_MD5_GNUTLS)
|
||||||
# Dirty fix for zm_user only using openssl's md5 if gnutls and gcrypt are not available.
|
# Dirty fix for zm_user only using openssl's md5 if gnutls and gcrypt are not available.
|
||||||
# This needs to be fixed in zm_user.[h,cpp] but such fix will also require changes to configure.ac
|
# This needs to be fixed in zm_user.[h,cpp] but such fix will also require changes to configure.ac
|
||||||
|
@ -475,26 +576,40 @@ endif(HAVE_LIBCRYPTO AND HAVE_OPENSSL_MD5_H AND HAVE_MD5_OPENSSL)
|
||||||
# Check for Perl
|
# Check for Perl
|
||||||
find_package(Perl)
|
find_package(Perl)
|
||||||
if(NOT PERL_FOUND)
|
if(NOT PERL_FOUND)
|
||||||
message(FATAL_ERROR "zm requires Perl 5.6.0 or newer but it was not found on your system")
|
message(FATAL_ERROR
|
||||||
|
"ZoneMinder requires Perl 5.6.0 or newer but it was not found on your system")
|
||||||
endif(NOT PERL_FOUND)
|
endif(NOT PERL_FOUND)
|
||||||
|
|
||||||
# Checking for perl modules requires FindPerlModules.cmake
|
# Checking for perl modules requires FindPerlModules.cmake
|
||||||
# Check all required modules at once
|
# Check all required modules at once
|
||||||
# TODO: Add checking for the optional modules
|
# TODO: Add checking for the optional modules
|
||||||
find_package(PerlModules COMPONENTS Sys::Syslog DBI DBD::mysql Getopt::Long Time::HiRes Date::Manip LWP::UserAgent ExtUtils::MakeMaker ${ZM_MMAP_PERLPACKAGE})
|
find_package(
|
||||||
|
PerlModules COMPONENTS Sys::Syslog DBI DBD::mysql
|
||||||
|
Getopt::Long Time::HiRes Date::Manip LWP::UserAgent
|
||||||
|
ExtUtils::MakeMaker ${ZM_MMAP_PERLPACKAGE})
|
||||||
if(NOT PERLMODULES_FOUND)
|
if(NOT PERLMODULES_FOUND)
|
||||||
message(FATAL_ERROR "Not all required perl modules were found on your system")
|
message(FATAL_ERROR
|
||||||
|
"Not all required perl modules were found on your system")
|
||||||
endif(NOT PERLMODULES_FOUND)
|
endif(NOT PERLMODULES_FOUND)
|
||||||
|
|
||||||
# Attempt to check which user apache (or other web server) runs on by searching for a user beginning with apache or www and then cutting the user from the first matching user line
|
# Attempt to check which user apache (or other web server) runs on by
|
||||||
|
# searching for a user beginning with apache or www and then cutting the user
|
||||||
|
# from the first matching user line
|
||||||
if(ZM_WEB_USER STREQUAL "")
|
if(ZM_WEB_USER STREQUAL "")
|
||||||
# Check for a user matching ^apache and cut the username from the userline in the first match
|
# Check for a user matching ^apache and cut the username from the
|
||||||
|
# userline in the first match
|
||||||
file(STRINGS "/etc/passwd" userline_apache REGEX "^apache")
|
file(STRINGS "/etc/passwd" userline_apache REGEX "^apache")
|
||||||
file(STRINGS "/etc/passwd" userline_www REGEX "^www")
|
file(STRINGS "/etc/passwd" userline_www REGEX "^www")
|
||||||
if(NOT (userline_apache STREQUAL ""))
|
if(NOT (userline_apache STREQUAL ""))
|
||||||
execute_process(COMMAND echo ${userline_apache} COMMAND cut -d: -f1 OUTPUT_VARIABLE ZM_WEB_USER OUTPUT_STRIP_TRAILING_WHITESPACE)
|
execute_process(
|
||||||
|
COMMAND echo ${userline_apache}
|
||||||
|
COMMAND cut -d: -f1 OUTPUT_VARIABLE ZM_WEB_USER
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
elseif(NOT (userline_www STREQUAL ""))
|
elseif(NOT (userline_www STREQUAL ""))
|
||||||
execute_process(COMMAND echo ${userline_www} COMMAND cut -d: -f1 OUTPUT_VARIABLE ZM_WEB_USER OUTPUT_STRIP_TRAILING_WHITESPACE)
|
execute_process(
|
||||||
|
COMMAND echo ${userline_www}
|
||||||
|
COMMAND cut -d: -f1 OUTPUT_VARIABLE ZM_WEB_USER
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
endif(NOT (userline_apache STREQUAL ""))
|
endif(NOT (userline_apache STREQUAL ""))
|
||||||
message(STATUS "Detected web server user: ${ZM_WEB_USER}")
|
message(STATUS "Detected web server user: ${ZM_WEB_USER}")
|
||||||
endif(ZM_WEB_USER STREQUAL "")
|
endif(ZM_WEB_USER STREQUAL "")
|
||||||
|
@ -508,13 +623,15 @@ message(STATUS "Using web group: ${ZM_WEB_GROUP}")
|
||||||
# Check for polkit
|
# Check for polkit
|
||||||
find_package(Polkit)
|
find_package(Polkit)
|
||||||
if(NOT POLKIT_FOUND)
|
if(NOT POLKIT_FOUND)
|
||||||
message(FATAL_ERROR "Running ZoneMinder requires polkit. Building ZoneMinder requires the polkit development package.")
|
message(FATAL_ERROR
|
||||||
|
"Running ZoneMinder requires polkit. Building ZoneMinder requires the polkit development package.")
|
||||||
endif(NOT POLKIT_FOUND)
|
endif(NOT POLKIT_FOUND)
|
||||||
|
|
||||||
# Some variables that zm expects
|
# Some variables that zm expects
|
||||||
set(ZM_PID "${ZM_RUNDIR}/zm.pid")
|
set(ZM_PID "${ZM_RUNDIR}/zm.pid")
|
||||||
set(ZM_CONFIG "${ZM_CONFIG_DIR}/zm.conf")
|
set(ZM_CONFIG "${ZM_CONFIG_DIR}/zm.conf")
|
||||||
set(VERSION "${zoneminder_VERSION}")
|
set(VERSION "${zoneminder_VERSION}")
|
||||||
|
set(API_VERSION "${zoneminder_API_VERSION}")
|
||||||
set(PKGDATADIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/zoneminder")
|
set(PKGDATADIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/zoneminder")
|
||||||
set(BINDIR "${CMAKE_INSTALL_FULL_BINDIR}")
|
set(BINDIR "${CMAKE_INSTALL_FULL_BINDIR}")
|
||||||
set(LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
|
set(LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
|
||||||
|
@ -524,7 +641,11 @@ set(CGI_PREFIX "${ZM_CGIDIR}")
|
||||||
set(WEB_USER "${ZM_WEB_USER}")
|
set(WEB_USER "${ZM_WEB_USER}")
|
||||||
set(WEB_GROUP "${ZM_WEB_GROUP}")
|
set(WEB_GROUP "${ZM_WEB_GROUP}")
|
||||||
set(ZM_DB_TYPE "mysql")
|
set(ZM_DB_TYPE "mysql")
|
||||||
set(EXTRA_PERL_LIB "use lib '${ZM_PERL_USE_PATH}';")
|
if(ZM_PERL_SEARCH_PATH)
|
||||||
|
set(EXTRA_PERL_LIB "use lib '${ZM_PERL_SEARCH_PATH}'; # Include custom perl install path")
|
||||||
|
else(ZM_PERL_SEARCH_PATH)
|
||||||
|
set(EXTRA_PERL_LIB "# Include from system perl paths only")
|
||||||
|
endif(ZM_PERL_SEARCH_PATH)
|
||||||
|
|
||||||
# Generate files from the .in files
|
# Generate files from the .in files
|
||||||
configure_file(zm.conf.in "${CMAKE_CURRENT_BINARY_DIR}/zm.conf" @ONLY)
|
configure_file(zm.conf.in "${CMAKE_CURRENT_BINARY_DIR}/zm.conf" @ONLY)
|
||||||
|
@ -540,9 +661,9 @@ add_subdirectory(web)
|
||||||
add_subdirectory(misc)
|
add_subdirectory(misc)
|
||||||
|
|
||||||
# Enable ONVIF support
|
# Enable ONVIF support
|
||||||
if (ZM_ONVIF)
|
if(ZM_ONVIF)
|
||||||
add_subdirectory(onvif)
|
add_subdirectory(onvif)
|
||||||
endif (ZM_ONVIF)
|
endif(ZM_ONVIF)
|
||||||
|
|
||||||
# Process distro subdirectories
|
# Process distro subdirectories
|
||||||
if((ZM_TARGET_DISTRO STREQUAL "f21") OR (ZM_TARGET_DISTRO STREQUAL "f20"))
|
if((ZM_TARGET_DISTRO STREQUAL "f21") OR (ZM_TARGET_DISTRO STREQUAL "f20"))
|
||||||
|
@ -561,9 +682,11 @@ message(STATUS "Optional libraries not found:${optlibsnotfound}")
|
||||||
message(STATUS "Running ZoneMinder configuration generator")
|
message(STATUS "Running ZoneMinder configuration generator")
|
||||||
execute_process(COMMAND perl ./zmconfgen.pl RESULT_VARIABLE zmconfgen_result)
|
execute_process(COMMAND perl ./zmconfgen.pl RESULT_VARIABLE zmconfgen_result)
|
||||||
if(zmconfgen_result EQUAL 0)
|
if(zmconfgen_result EQUAL 0)
|
||||||
message(STATUS "ZoneMinder configuration generator completed successfully")
|
message(STATUS
|
||||||
|
"ZoneMinder configuration generator completed successfully")
|
||||||
else(zmconfgen_result EQUAL 0)
|
else(zmconfgen_result EQUAL 0)
|
||||||
message(FATAL_ERROR "ZoneMinder configuration generator failed. Exit code: ${zmconfgen_result}")
|
message(FATAL_ERROR
|
||||||
|
"ZoneMinder configuration generator failed. Exit code: ${zmconfgen_result}")
|
||||||
endif(zmconfgen_result EQUAL 0)
|
endif(zmconfgen_result EQUAL 0)
|
||||||
|
|
||||||
# Install zm.conf
|
# Install zm.conf
|
||||||
|
|
21
INSTALL
21
INSTALL
|
@ -53,8 +53,8 @@ Advanced:
|
||||||
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_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_FFMPEG Set to ON to skip ffmpeg checks and force building ZM without ffmpeg. 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_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_MM_PARMS By default, ZoneMinder's Perl modules are installed into the Vendor folders, as defined by your installation of Perl. You can change that here. Consult Perl's MakeMaker documentation for a definition of acceptable parameters. If you set this to something that causes the modules to be installed outside Perl's normal serach path, then you will also need to set ZM_PERL_SEARCH_PATH accordingly. default: "INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1"
|
||||||
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>
|
ZM_PERL_SEARCH_PATH Use to add a folder to your Perl's search path. This will need to be set in cases where ZM_PERL_MM_PARMS has been modified such that ZoneMinder's Perl modules are installed outside Perl's default search path. default: ""
|
||||||
|
|
||||||
Useful configuration options provided by cmake:
|
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_VERBOSE_MAKEFILE - Set this to ON (default OFF) to see what cmake is doing. Very useful for troubleshooting.
|
||||||
|
@ -82,6 +82,7 @@ Basic steps for installing ZoneMinder on a fresh system
|
||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
1) After installing all the required dependencies, in the project directory, run "cmake [extra options] ."
|
1) After installing all the required dependencies, in the project directory, run "cmake [extra options] ."
|
||||||
This behaves like ./configure. It is also possible to supply configuration options, e.g. cmake -DZM_DB_PASS="mypass" .
|
This behaves like ./configure. It is also possible to supply configuration options, e.g. cmake -DZM_DB_PASS="mypass" .
|
||||||
|
IMPORTANT: Don't forget the dot "." at the end.
|
||||||
2) Run "make" to compile ZoneMinder
|
2) Run "make" to compile ZoneMinder
|
||||||
3) Run "make install" (as root, or use sudo) to install ZoneMinder to your system.
|
3) Run "make install" (as root, or use sudo) to install ZoneMinder to your system.
|
||||||
4) Create a directory for the content and the necessary symlinks by running zmlinkcontent.sh with the directory you want to use. e.g. ./zmlinkcontent.sh /nfs/zm
|
4) Create a directory for the content and the necessary symlinks by running zmlinkcontent.sh with the directory you want to use. e.g. ./zmlinkcontent.sh /nfs/zm
|
||||||
|
@ -92,9 +93,19 @@ NOTE: The database server, database name, user and password can be different and
|
||||||
|
|
||||||
8) Create an apache virtual host for ZoneMinder. Make sure to use the same paths as ZM_WEBDIR and ZM_CGIDIR in /etc/zm.conf
|
8) Create an apache virtual host for ZoneMinder. Make sure to use the same paths as ZM_WEBDIR and ZM_CGIDIR in /etc/zm.conf
|
||||||
9) Create other config if desired (e.g. rsyslog, logrotate and such). Some of this can be found in <prefix>/share/zoneminder/misc or project/misc directory
|
9) Create other config if desired (e.g. rsyslog, logrotate and such). Some of this can be found in <prefix>/share/zoneminder/misc or project/misc directory
|
||||||
10) Setup an appropriate startup script for your system. A generic sys v init script is here: /scripts/zm while a generic systemd service file is here: /misc/zoneminder.service
|
10) Setup an appropriate startup script for your system. Two generic startup scripts have been provided, a legacy Sys V Init script and a Systemd service file.
|
||||||
You must determine which file to use, verify it is correct, and then copy it to the correct location. Consult your distro's documentation. Note that distros using systemd also
|
|
||||||
require /misc/zoneminder-tmpfiles.conf to be copied into the system's tmpfiles.d folder.
|
*Sys V Init Setup*
|
||||||
|
- Copy the sys v init script /scripts/zm from the build folder to /etc/init.
|
||||||
|
- Inspect the contents to make sure they apply to your distro.
|
||||||
|
|
||||||
|
*SystemD Setup*
|
||||||
|
- Copy the zoneminder systemd service file /misc/zoneminder.service from the build folder to the systemd service file location.
|
||||||
|
For Redhat based distros, that folder is /usr/lib/systemd/system.
|
||||||
|
- Inspect the contents to make sure they apply to your distro.
|
||||||
|
- Tell systemd to load the new service file: "sudo systemctl daemon-reload".
|
||||||
|
- Copy /misc/zoneminder-tmpfiles.conf to /etc/tmpfiles.d
|
||||||
|
- Tell systemd to process this file: "sudo /usr/bin/systemd-tmpfiles --create /etc/tmpfiles.d/zoneminder.conf".
|
||||||
|
|
||||||
Basic steps for upgrading ZoneMinder
|
Basic steps for upgrading ZoneMinder
|
||||||
------------------------------------
|
------------------------------------
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
AUTOMAKE_OPTIONS = foreign
|
AUTOMAKE_OPTIONS = foreign
|
||||||
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
# And these to the user and group of your webserver
|
# And these to the user and group of your webserver
|
||||||
webuser = @WEB_USER@
|
webuser = @WEB_USER@
|
||||||
|
|
182
README.md
182
README.md
|
@ -9,13 +9,46 @@ All documentation for ZoneMinder is now online at http://www.zoneminder.com/wiki
|
||||||
|
|
||||||
ZoneMinder is an integrated set of applications which provide a complete surveillance solution allowing capture, analysis, recording and monitoring of any CCTV or security cameras attached to a Linux based machine. It is designed to run on distributions which support the Video For Linux (V4L) interface and has been tested with video cameras attached to BTTV cards, various USB cameras and also supports most IP network cameras.
|
ZoneMinder is an integrated set of applications which provide a complete surveillance solution allowing capture, analysis, recording and monitoring of any CCTV or security cameras attached to a Linux based machine. It is designed to run on distributions which support the Video For Linux (V4L) interface and has been tested with video cameras attached to BTTV cards, various USB cameras and also supports most IP network cameras.
|
||||||
|
|
||||||
## Requirements
|
## Installation Methods
|
||||||
|
|
||||||
If you are installing ZoneMinder from a package, that package should provide all of the needed core components.
|
### Building from Source is Discouraged
|
||||||
|
|
||||||
### Packages
|
Historically, installing ZoneMinder onto your system required building from source code by issuing the traditional configure, make, make install commands. To get ZoneMinder to build, all of its dependencies had to be determined and installed beforehand. Init and logrotate scripts had to be manually copied into place following the build. Optional packages such as jscalendar and Cambozola had to be manually installed. Uninstalls could leave stale files around, which could cause problems during an upgrade. Speaking of upgrades, when it comes time to upgrade all these manual steps must be repeated again.
|
||||||
|
|
||||||
If you are compiling ZoneMinder from source, the below list contains the packages needed to get ZoneMinder built:
|
Better methods exist today that do much of this for you. The current development team, along with other volunteers, have taken great strides in providing the resources necessary to avoid building from source.
|
||||||
|
|
||||||
|
### Install from a Package Repository
|
||||||
|
|
||||||
|
This is the recommended method to install ZoneMinder onto your system. ZoneMinder packages are maintained for the following distros:
|
||||||
|
|
||||||
|
- Ubuntu via [Iconnor's PPA](https://launchpad.net/~iconnor/+archive/ubuntu/zoneminder)
|
||||||
|
- Debian from their [default repository](https://packages.debian.org/search?searchon=names&keywords=zoneminder)
|
||||||
|
- RHEL/CentOS and clones via [zmrepo](http://zmrepo.zoneminder.com/)
|
||||||
|
- Fedora via [zmrepo](http://zmrepo.zoneminder.com/)
|
||||||
|
- OpenSuse via [third party repository](http://www.zoneminder.com/wiki/index.php/Installing_using_ZoneMinder_RPMs_for_SuSE)
|
||||||
|
- Maegia from their default repository
|
||||||
|
|
||||||
|
If a repository that hosts ZoneMinder packages is not available for your distro, then you are encouraged to build your own package, rather than build from source. While each distro is different in ways that set it apart from all the others, they are often similar enough to allow you to adapt another distro's package building instructions to your own.
|
||||||
|
|
||||||
|
### Building a ZoneMinder Package
|
||||||
|
|
||||||
|
Building ZoneMinder into a package is not any harder than building from source. As a matter of fact, if you have successfully built ZoneMinder from source in the past, then you may find these steps to be easier.
|
||||||
|
|
||||||
|
When building a package, it is best to do this work in a separate environment, dedicated to development purposes. This could be as simple as creating a virtual machine, using Docker, or using mock. All it takes is one “Oops” to regret doing this work on your production server.
|
||||||
|
|
||||||
|
Lastly, if you desire to build a development snapshot from the master branch, it is recommended you first build your package using an official release of ZoneMinder. This will help identify whether any problems you may encounter are caused by the build process or is a new issue in the master branch.
|
||||||
|
|
||||||
|
What follows are instructions for various distros to build ZoneMinder into a package.
|
||||||
|
|
||||||
|
### Package Maintainters
|
||||||
|
Many of the ZoneMinder configration variable default values are not configurable at build time through autotools or cmake. A new tool called *zmeditconfigdata.sh* has been added to allow package maintainers to manipulate any variable stored in ConfigData.pm without patching the source.
|
||||||
|
|
||||||
|
For example, let's say I have created a new ZoneMinder package that contains the cambolzola javascript file. However, by default cambozola support is turned off. To fix that, add this to the pacakging script:
|
||||||
|
```bash
|
||||||
|
./utils/zmeditconfigdata.sh ZM_OPT_CAMBOZOLA yes
|
||||||
|
```
|
||||||
|
|
||||||
|
Note that zmeditconfigdata.sh is intended to be called, from the root build folder, prior to running cmake or configure.
|
||||||
|
|
||||||
#### Ubuntu
|
#### Ubuntu
|
||||||
|
|
||||||
|
@ -101,42 +134,118 @@ root@host:~# aptitude install -y gdebi;
|
||||||
root@host:~# gdebi /root/zoneminder_1.26.4-1_amd64.deb;
|
root@host:~# gdebi /root/zoneminder_1.26.4-1_amd64.deb;
|
||||||
```
|
```
|
||||||
|
|
||||||
#### CentOS / RHEL
|
#### Fedora / CentOS / RHEL
|
||||||
|
|
||||||
Additional repositories must be added before one can build zoneminder on CentOS or RHEL:
|
***DRAFT* ** Needs Testing
|
||||||
|
|
||||||
1. Zmrepo [ZoneMinder WiKi](http://www.zoneminder.com/wiki/index.php/CentOS#Zmrepo_-_A_ZoneMinder_repository_for_RPM_based_distros)
|
##### Background
|
||||||
2. EPEL https://fedoraproject.org/wiki/EPEL
|
The following method documents how to build ZoneMinder into an RPM package, compatible with Fedora, Redhat, CentOS, and other compatible clones. This is exactly how the RPMS in zmrepo are built.
|
||||||
3. RPMFusion: http://rpmfusion.org/
|
|
||||||
|
|
||||||
When adding third party repositories, it is highly recommended that the user also install and configure yum priorities as documented in the [CentOS WiKi](http://wiki.centos.org/PackageManagement/Yum/Priorities)
|
The method documented below was chosen because:
|
||||||
|
- All of ZoneMinder's dependencies are downloaded and installed automatically
|
||||||
|
- Cross platform capable. The build host does not have to be the same distro or release version as the target.
|
||||||
|
- Once your build environment is set up, few steps are required to run the build again in the future.
|
||||||
|
- Troubleshooting becomes easier if we are all building ZoneMinder the same way.
|
||||||
|
|
||||||
Prioritize the repositories:
|
The build instructions below make use of a custom script called "buildzm.sh". Advanced users are encouraged to view the contents of this script. Notice that the script doesn't really do a whole lot. The goal of the script is to simply make the process a little easier for the first time user. Once you become familar with the build process, you can issue the mock commands found in the buildzm.sh script yourself if you so desire.
|
||||||
|
|
||||||
1. Base
|
***IMPORTANT***
|
||||||
2. EPEL
|
Certain commands in these instructions require root privileges while other commands do not. Pay close attention to this. If the instructions below state to issue a command without a “sudo” prefix, then you should *not* be root while issuing the command. Getting this incorrect will result in a failed build.
|
||||||
3. RPMFusion
|
|
||||||
4. Zmrepo
|
|
||||||
|
|
||||||
Once your repos are in order, install the following:
|
##### Set Up Your Environment
|
||||||
```bash
|
Before you begin, set up an rpmbuild environment by following [this guide](http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment) by the CentOS developers.
|
||||||
sudo yum install cmake 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 \
|
Next, navigate to [Zmrepo](http://zmrepo.zoneminder.com/), and follow the instructions to enable zmrepo on your system.
|
||||||
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 perl-X10 perl-URI-Encode php php-cli php-mysql x264 vlc-devel vlc-core \
|
With zmrepo enabled, issue the following command:
|
||||||
libcurl libcurl-devel polkit-devel git
|
````bash
|
||||||
|
sudo yum install zmrepo-mock-configs mock
|
||||||
```
|
```
|
||||||
|
|
||||||
To build from the master branch:
|
Add your user account to the group mock:
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/ZoneMinder/ZoneMinder.git
|
sudo gpasswd -a {your account name} mock
|
||||||
cd ZoneMinder
|
|
||||||
cmake .
|
|
||||||
make
|
|
||||||
sudo make install
|
|
||||||
```
|
```
|
||||||
|
|
||||||
IMPORTANT: Don't forget the trailing "." when calling cmake
|
Your build environment is now set up.
|
||||||
|
|
||||||
|
##### Build from SRPM
|
||||||
|
To continue, you need a ZoneMinder SRPM. For starters, let's use one of the SRPMS from zmrepo. Go browse the [Zmrepo](http://zmrepo.zoneminder.com/) site and choose an appropriate SRPM and place it into the ~/rpmbuild/SRPMS folder.
|
||||||
|
|
||||||
|
For CentOS 7, I have chosen the following SRPM:
|
||||||
|
```bash
|
||||||
|
wget -P ~/rpmbuild/SRPMS http://zmrepo.zoneminder.com/el/7/SRPMS/zoneminder-1.28.1-2.el7.centos.src.rpm
|
||||||
|
```
|
||||||
|
|
||||||
|
Now comes the fun part. To build ZoneMinder, issue the following command:
|
||||||
|
```bash
|
||||||
|
buildzm.sh zmrepo-el7-x86_64 ~/rpmbuild/SRPMS/zoneminder-1.28.1-2.el7.centos.src.rpm
|
||||||
|
```
|
||||||
|
|
||||||
|
Want to build ZoneMinder for Fedora, instead of CentOS, from the same host? Once you download the Fedora SRPM, issue the following:
|
||||||
|
```bash
|
||||||
|
buildzm.sh zmrepo-f21-x86_64 ~/rpmbuild/SRPMS/zoneminder-1.28.1-1.fc21.src.rpm
|
||||||
|
```
|
||||||
|
Notice that the buildzm.sh tool requires the following parameters:
|
||||||
|
```bash
|
||||||
|
buildzm.sh MOCKCONFIG ZONEMINDER_SRPM
|
||||||
|
```
|
||||||
|
The list of available Mock config files are available here:
|
||||||
|
```bash
|
||||||
|
ls /etc/mock/zmrepo*.cfg
|
||||||
|
```
|
||||||
|
|
||||||
|
You choose the config file based on the desired distro (e.g. el6, el7, f20, f21) and basearch (e.g. x86, x86_64, arhmhfp). Notice that, when specifying the Mock config as a commandline parameter, you should leave off the ".cfg" filename extension.
|
||||||
|
|
||||||
|
##### Installation
|
||||||
|
Once the build completes, you will be presented with a folder containing the RPM's that were built. Copy the newly built ZoneMinder RPM to the desired system, enable zmrepo per the instruction on the [Zmrepo](http://zmrepo.zoneminder.com/) website, and then install the rpm by issuing the appropriate yum install command. Finish the installation by following the zoneminder setup instructions in the distro specific readme file, named README.{distroname}, which will be installed into the /usr/share/doc/zoneminder* folder.
|
||||||
|
|
||||||
|
Finally, you may want to consider editing the zmrepo repo file under /etc/yum.repos.d and placing an “exclude=zoneminder*” line into the config file. This will prevent your system from overwriting your manually built RPM with the ZoneMinder RPM found in the repo.
|
||||||
|
|
||||||
|
##### How to Modify the Source Prior to Build
|
||||||
|
** UNFINISHED **
|
||||||
|
|
||||||
|
Before attempting this part of the instructions, make sure and follow the previous instructions for building one of the unmodified SRPMS from zmrepo. Knowing this part works will assist in troubleshooting should something go wrong.
|
||||||
|
|
||||||
|
These instructions may vary depending on what exactly you want to do. The following example assumes you want to build a development snapshot from the master branch.
|
||||||
|
|
||||||
|
From the previous instructions, we downloaded a CentOS 7 ZoneMinder SRPM and placed it into ~/rpmbuild/SRPMS. For this example, install it onto your system:
|
||||||
|
```bash
|
||||||
|
rpm -Uvh ~/rpmbuild/SRPMS/zoneminder-1.28.1-2.el7.centos.src.rpm
|
||||||
|
```
|
||||||
|
|
||||||
|
IMPORTANT: This operation must be done with your normal user account. Do *not* perform this command as root.
|
||||||
|
|
||||||
|
Make sure you have git installed:
|
||||||
|
```bash
|
||||||
|
sudo yum install git
|
||||||
|
```
|
||||||
|
|
||||||
|
Now clone the ZoneMinder git repository:
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/ZoneMinder/ZoneMinder
|
||||||
|
```
|
||||||
|
This will create a sub-folder called ZoneMinder, which will contain the latest developement.
|
||||||
|
|
||||||
|
We want to turn this into a tarball, but first we need to figure out what to name it. Look here:
|
||||||
|
```bash
|
||||||
|
ls ~/rpmbuild/SOURCES
|
||||||
|
```
|
||||||
|
The tarball from the previsouly installed SRPM should be there. This is the name we will use. For this example, the name is ZoneMinder-1.28.1.tar.gz. From one folder above the local ZoneMinder git repository, execute the following:
|
||||||
|
```bash
|
||||||
|
mv ZoneMinder ZoneMinder-1.28.1
|
||||||
|
tar -cvzf ~/rpmbuild/SOURCES/ZoneMinder-1.28.1.tar.gz ZoneMinder-1.28.1/*
|
||||||
|
```
|
||||||
|
The trailing "/*" leaves off the hidden dot "." file and folders from the git repo, which is what we want.
|
||||||
|
Note that we are overwriting the original tarball. If you wish to keep the original tarball then create a copy prior to creating the new tarball.
|
||||||
|
|
||||||
|
Now build a new src.rpm:
|
||||||
|
```bash
|
||||||
|
rpmbuild -bs --nodeps ~/rpmbuild/SPECS/zoneminder.el7.spec
|
||||||
|
```
|
||||||
|
This step will overwrite the SRPM you originally downloaded, so you may want to back it up prior to completing this step. Note that the name of the specfile will vary slightly depending on what distro you are building for.
|
||||||
|
|
||||||
|
You should now have a a new SRPM under ~/rpmbuild/SRPMS. In our example, the SRPM is called zoneminder-1.28.1-2.el7.centos.src.rpm. Now follow the previous instructions that describe how to use the buildzm script, using ~/rpmbuild/SRPMS/zoneminder-1.28.1-2.el7.centos.src.rpm as the path to your SRPM.
|
||||||
|
|
||||||
#### Docker
|
#### Docker
|
||||||
|
|
||||||
|
@ -144,11 +253,6 @@ Docker is a system to run applications inside isolated containers. ZoneMinder, a
|
||||||
Dockerfile contained in this repository. However, there is still work needed to ensure that the main ZM features work
|
Dockerfile contained in this repository. However, there is still work needed to ensure that the main ZM features work
|
||||||
properly and are documented.
|
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
|
## Contribution Model and Development
|
||||||
|
|
||||||
* Source hosted at [GitHub](https://github.com/ZoneMinder/ZoneMinder/)
|
* Source hosted at [GitHub](https://github.com/ZoneMinder/ZoneMinder/)
|
||||||
|
@ -169,14 +273,4 @@ the following steps.
|
||||||
6. Create new Pull Request
|
6. Create new Pull Request
|
||||||
7. The team will then review, discuss and hopefully merge your changes.
|
7. The team will then review, discuss and hopefully merge your changes.
|
||||||
|
|
||||||
### Package Maintainters
|
|
||||||
Many of the ZoneMinder configration variable default values are not configurable at build time through autotools or cmake. A new tool called *zmeditconfigdata.sh* has been added to allow package maintainers to manipulate any variable stored in ConfigData.pm without patching the source.
|
|
||||||
|
|
||||||
For example, let's say I have created a new ZoneMinder package that contains the cambolzola javascript file. However, by default cambozola support is turned off. To fix that, add this to the pacakging script:
|
|
||||||
```bash
|
|
||||||
./utils/zmeditconfigdata.sh ZM_OPT_CAMBOZOLA yes
|
|
||||||
```
|
|
||||||
|
|
||||||
Note that zmeditconfigdata.sh is intended to be called, from the root build folder, prior to running cmake or configure.
|
|
||||||
|
|
||||||
[![Analytics](https://ga-beacon.appspot.com/UA-15147273-6/ZoneMinder/README.md)](https://github.com/igrigorik/ga-beacon)
|
[![Analytics](https://ga-beacon.appspot.com/UA-15147273-6/ZoneMinder/README.md)](https://github.com/igrigorik/ga-beacon)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
aclocal
|
aclocal -I m4
|
||||||
autoheader
|
autoheader
|
||||||
automake --add-missing
|
automake --add-missing
|
||||||
autoconf
|
autoconf
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
# Check whether sendfile() is supported and what prototype it has
|
||||||
|
include(CheckCSourceCompiles)
|
||||||
|
if (UNIX OR MINGW)
|
||||||
|
SET(CMAKE_REQUIRED_DEFINITIONS -Werror-implicit-function-declaration)
|
||||||
|
endif()
|
||||||
|
check_c_source_compiles("#include <sys/sendfile.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
sendfile(1, 1, NULL, 0);
|
||||||
|
return 0;
|
||||||
|
}" HAVE_SENDFILE4_SUPPORT)
|
||||||
|
if(HAVE_SENDFILE4_SUPPORT)
|
||||||
|
add_definitions(-DHAVE_SENDFILE4_SUPPORT=1)
|
||||||
|
unset(CMAKE_REQUIRED_DEFINITIONS)
|
||||||
|
message(STATUS "Sendfile support: Linux/Solaris sendfile()")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
find_library(SENDFILE_LIBRARIES NAMES sendfile)
|
||||||
|
if(SENDFILE_LIBRARIES)
|
||||||
|
include(CheckLibraryExists)
|
||||||
|
check_library_exists(sendfile sendfile ${SENDFILE_LIBRARIES} HAVE_SENDFILE4_SUPPORT)
|
||||||
|
if(HAVE_SENDFILE4_SUPPORT)
|
||||||
|
add_definitions(-DHAVE_SENDFILE4_SUPPORT=1)
|
||||||
|
unset(CMAKE_REQUIRED_DEFINITIONS)
|
||||||
|
message(STATUS "Sendfile support: Solaris sendfile()")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
set(SENDFILE_LIBRARIES "")
|
||||||
|
check_c_source_compiles("#include <sys/socket.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
sendfile(1, 1, 0, 0, NULL, NULL, 0);
|
||||||
|
return 0;
|
||||||
|
}" HAVE_SENDFILE7_SUPPORT)
|
||||||
|
if(HAVE_SENDFILE7_SUPPORT)
|
||||||
|
add_definitions(-DHAVE_SENDFILE7_SUPPORT=1)
|
||||||
|
unset(CMAKE_REQUIRED_DEFINITIONS)
|
||||||
|
message(STATUS "Sendfile support: FreeBSD sendfile()")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
check_c_source_compiles("#include <sys/socket.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <sys/uio.h>
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
sendfile(1, 1, 0, NULL, NULL, 0);
|
||||||
|
return 0;
|
||||||
|
}" HAVE_SENDFILE6_SUPPORT)
|
||||||
|
if(HAVE_SENDFILE6_SUPPORT)
|
||||||
|
add_definitions(-DHAVE_SENDFILE6_SUPPORT=1)
|
||||||
|
unset(CMAKE_REQUIRED_DEFINITIONS)
|
||||||
|
message(STATUS "Sendfile support: MacOS sendfile()")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
# use pkg-config to get the directories and then use these values
|
# use pkg-config to get the directories and then use these values
|
||||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||||
find_package(PkgConfig)
|
find_package(PkgConfig)
|
||||||
pkg_check_modules(PC_POLKIT polkit-gobject-1)
|
pkg_search_module(PC_POLKIT polkit-gobject-1 polkit)
|
||||||
#pkg_check_modules(PC_POLKIT_AGENT polkit-agent-1)
|
#pkg_check_modules(PC_POLKIT_AGENT polkit-agent-1)
|
||||||
set(POLKIT_DEFINITIONS ${PC_POLKIT_CFLAGS_OTHER})
|
set(POLKIT_DEFINITIONS ${PC_POLKIT_CFLAGS_OTHER})
|
||||||
endif (NOT WIN32)
|
endif (NOT WIN32)
|
||||||
|
@ -31,8 +31,8 @@
|
||||||
HINTS ${PC_POLKIT_INCLUDE_DIRS}
|
HINTS ${PC_POLKIT_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
find_path( POLKIT_INCLUDE_DIR
|
find_path( POLKIT_INCLUDE_DIR
|
||||||
NAMES polkit/polkit.h
|
NAMES polkit/polkit.h libpolkit/libpolkit.h
|
||||||
PATH_SUFFIXES polkit-1
|
PATH_SUFFIXES polkit-1 polkit
|
||||||
HINTS ${PC_POLKIT_INCLUDE_DIRS}
|
HINTS ${PC_POLKIT_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
#find_path( POLKIT_AGENT_INCLUDE_DIR
|
#find_path( POLKIT_AGENT_INCLUDE_DIR
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
#set(POLKIT_INCLUDE_DIRS ${GLIB2_INCLUDE_DIR} ${_POLKIT_INCLUDE_DIR})
|
#set(POLKIT_INCLUDE_DIRS ${GLIB2_INCLUDE_DIR} ${_POLKIT_INCLUDE_DIR})
|
||||||
#set(POLKIT_AGENT_INCLUDE_DIRS ${GLIB2_INCLUDE_DIR} ${_POLKIT_AGENT_INCLUDE_DIR})
|
#set(POLKIT_AGENT_INCLUDE_DIRS ${GLIB2_INCLUDE_DIR} ${_POLKIT_AGENT_INCLUDE_DIR})
|
||||||
find_library( POLKIT_LIBRARIES
|
find_library( POLKIT_LIBRARIES
|
||||||
NAMES polkit-gobject-1
|
NAMES polkit-gobject-1 polkit
|
||||||
HINTS ${PC_POLKIT_LIBDIR}
|
HINTS ${PC_POLKIT_LIBDIR}
|
||||||
)
|
)
|
||||||
#find_library( POLKIT_AGENT_LIBRARY
|
#find_library( POLKIT_AGENT_LIBRARY
|
||||||
|
|
72
configure.ac
72
configure.ac
|
@ -1,8 +1,13 @@
|
||||||
|
#
|
||||||
|
# Building ZoneMinder via Autotools will be depreciated soon
|
||||||
|
# For instructions on building with cmake, please see INSTALL
|
||||||
|
#
|
||||||
AC_PREREQ(2.59)
|
AC_PREREQ(2.59)
|
||||||
AC_INIT(zm,1.28.1,[http://www.zoneminder.com/forums/ - Please check FAQ first],zoneminder,http://www.zoneminder.com/downloads.html)
|
AC_INIT(zm,1.28.1,[http://www.zoneminder.com/forums/ - Please check FAQ first],zoneminder,http://www.zoneminder.com/downloads.html)
|
||||||
AM_INIT_AUTOMAKE
|
AM_INIT_AUTOMAKE
|
||||||
AC_CONFIG_SRCDIR(src/zm.h)
|
AC_CONFIG_SRCDIR(src/zm.h)
|
||||||
AC_CONFIG_HEADERS(config.h)
|
AC_CONFIG_HEADERS(config.h)
|
||||||
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
|
||||||
AC_SUBST([AM_CXXFLAGS], [-D__STDC_CONSTANT_MACROS])
|
AC_SUBST([AM_CXXFLAGS], [-D__STDC_CONSTANT_MACROS])
|
||||||
|
|
||||||
|
@ -26,6 +31,17 @@ case $host_os in
|
||||||
*BSD*)
|
*BSD*)
|
||||||
# Do something specific for BSD
|
# Do something specific for BSD
|
||||||
HOST_OS='BSD'
|
HOST_OS='BSD'
|
||||||
|
AC_DEFINE(BSD,1,"This is a BSD system")
|
||||||
|
;;
|
||||||
|
*bsd*)
|
||||||
|
# Do something specific for BSD
|
||||||
|
HOST_OS='BSD'
|
||||||
|
AC_DEFINE(BSD,1,"This is a BSD system")
|
||||||
|
;;
|
||||||
|
*solaris*)
|
||||||
|
# Do something specific for Solaris
|
||||||
|
HOST_OS='solaris'
|
||||||
|
AC_DEFINE(SOLARIS,1,"We are running a Solaroid OS [tested on OmniOS]")
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
#Default Case
|
#Default Case
|
||||||
|
@ -315,22 +331,20 @@ AC_FUNC_STRTOD
|
||||||
AC_FUNC_VPRINTF
|
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 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])
|
AC_CHECK_FUNCS([syscall sleep usleep ioctl ioctlsocket sigaction])
|
||||||
|
# this is required for freebsd to compile. Look for it in m4/ac_check_sendfile.m4
|
||||||
|
AC_CHECK_SENDFILE
|
||||||
# Other programs
|
# Other programs
|
||||||
AC_CHECK_PROG(OPT_FFMPEG,ffmpeg,yes,no)
|
AC_CHECK_PROG(OPT_FFMPEG,ffmpeg,yes,no)
|
||||||
AC_PATH_PROG(PATH_FFMPEG,ffmpeg)
|
AC_PATH_PROG(PATH_FFMPEG,ffmpeg)
|
||||||
AC_CHECK_PROG(OPT_NETPBM,pnmscale,yes,no)
|
|
||||||
AC_PATH_PROG(PATH_NETPBM,pnmscale)
|
|
||||||
if test "$OPT_NETPBM" == "yes"; then
|
|
||||||
PATH_NETPBM=`dirname $PATH_NETPBM`
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Checks for libraries.
|
# Checks for libraries.
|
||||||
AC_CHECK_LIB(rt,clock_gettime,,AC_MSG_ERROR(zm requires librt))
|
AC_CHECK_LIB(rt,clock_gettime,,AC_MSG_ERROR(zm requires librt))
|
||||||
AC_SEARCH_LIBS(mysql_init,[mysqlclient mariadbclient],,AC_MSG_ERROR(zm requires libmysqlclient.a or libmariadbclient.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(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(pthread,pthread_create,,AC_MSG_ERROR(zm requires libpthread.a))
|
||||||
|
if test "$BSD" == "0"; then
|
||||||
AC_CHECK_LIB(dl,dlsym,,AC_MSG_ERROR(zm requires libdl.a))
|
AC_CHECK_LIB(dl,dlsym,,AC_MSG_ERROR(zm requires libdl.a))
|
||||||
|
fi
|
||||||
if test "$ZM_SSL_LIB" == "openssl"; then
|
if test "$ZM_SSL_LIB" == "openssl"; then
|
||||||
AC_CHECK_HEADERS(openssl/md5.h,,AC_MSG_WARN(zm requires openssl/md5.h header to be installed for openssl),)
|
AC_CHECK_HEADERS(openssl/md5.h,,AC_MSG_WARN(zm requires openssl/md5.h header to be installed for openssl),)
|
||||||
AC_CHECK_LIB(crypto,MD5,,AC_MSG_WARN([libcrypto.a is required for authenticated streaming - use ZM_SSL_LIB option to select gnutls instead]))
|
AC_CHECK_LIB(crypto,MD5,,AC_MSG_WARN([libcrypto.a is required for authenticated streaming - use ZM_SSL_LIB option to select gnutls instead]))
|
||||||
|
@ -373,14 +387,26 @@ AC_CHECK_HEADERS(execinfo.h,,,)
|
||||||
AC_CHECK_HEADERS(ucontext.h,,,)
|
AC_CHECK_HEADERS(ucontext.h,,,)
|
||||||
AC_CHECK_HEADERS(sys/syscall.h,,,)
|
AC_CHECK_HEADERS(sys/syscall.h,,,)
|
||||||
AC_CHECK_HEADERS(pthread.h,,,)
|
AC_CHECK_HEADERS(pthread.h,,,)
|
||||||
AC_CHECK_HEADERS(linux/videodev.h,AC_SUBST(ZM_HAS_V4L1,1),AC_SUBST(ZM_HAS_V4L1,0),)
|
|
||||||
AC_CHECK_HEADERS(linux/videodev2.h,AC_SUBST(ZM_HAS_V4L2,1),AC_SUBST(ZM_HAS_V4L2,0),)
|
# Check for Video for Linux 1 Header Files
|
||||||
|
ZM_HAS_V4L1=0
|
||||||
|
AC_CHECK_HEADERS([libv4l1-videodev.h linux/videodev.h],[ZM_HAS_V4L1=1; break;],,)
|
||||||
|
AC_SUBST(ZM_HAS_V4L1)
|
||||||
|
|
||||||
|
# Check for Video for Linux 2 Header Files
|
||||||
|
ZM_HAS_V4L2=0
|
||||||
|
AC_CHECK_HEADERS(linux/videodev2.h,ZM_HAS_V4L2=1,,)
|
||||||
|
AC_SUBST(ZM_HAS_V4L2)
|
||||||
|
|
||||||
|
# Set global Video for Linux flag
|
||||||
|
ZM_HAS_V4L=0
|
||||||
if test "$ZM_HAS_V4L1" == "1" || test "$ZM_HAS_V4L2" == "1"; then
|
if test "$ZM_HAS_V4L1" == "1" || test "$ZM_HAS_V4L2" == "1"; then
|
||||||
AC_SUBST(ZM_HAS_V4L,1)
|
ZM_HAS_V4L=1
|
||||||
else
|
else
|
||||||
AC_SUBST(ZM_HAS_V4L,0)
|
|
||||||
AC_MSG_WARN(zm requires Video4Linux or Video4Linux2 to be installed for analog or USB camera support)
|
AC_MSG_WARN(zm requires Video4Linux or Video4Linux2 to be installed for analog or USB camera support)
|
||||||
fi
|
fi
|
||||||
|
AC_SUBST(ZM_HAS_V4L)
|
||||||
|
|
||||||
AC_CHECK_HEADERS(jpeglib.h,,AC_MSG_ERROR(zm requires libjpeg headers to be installed),)
|
AC_CHECK_HEADERS(jpeglib.h,,AC_MSG_ERROR(zm requires libjpeg headers to be installed),)
|
||||||
AC_CHECK_HEADERS(mysql/mysql.h,,AC_MSG_ERROR(zm requires MySQL headers - check that MySQL development packages are installed),)
|
AC_CHECK_HEADERS(mysql/mysql.h,,AC_MSG_ERROR(zm requires MySQL headers - check that MySQL development packages are installed),)
|
||||||
AC_LANG_PUSH([C])
|
AC_LANG_PUSH([C])
|
||||||
|
@ -470,32 +496,6 @@ fi
|
||||||
AC_SUBST(PERL_MM_PARMS)
|
AC_SUBST(PERL_MM_PARMS)
|
||||||
AC_SUBST(EXTRA_PERL_LIB)
|
AC_SUBST(EXTRA_PERL_LIB)
|
||||||
|
|
||||||
#
|
|
||||||
# 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_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 onvif/Makefile onvif/scripts/Makefile 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/css/classic/Makefile web/skins/classic/css/classic/views/Makefile web/skins/classic/css/flat/Makefile web/skins/classic/css/flat/views/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/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])
|
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 onvif/Makefile onvif/scripts/Makefile 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/css/classic/Makefile web/skins/classic/css/classic/views/Makefile web/skins/classic/css/flat/Makefile web/skins/classic/css/flat/views/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/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])
|
||||||
|
|
||||||
# Create the definitions for compilation and defaults for the database
|
# Create the definitions for compilation and defaults for the database
|
||||||
|
|
|
@ -382,15 +382,29 @@ CREATE TABLE `Monitors` (
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Table structure for table `States`
|
-- Table structure for table `States`
|
||||||
|
-- Added IsActive to track custom run states
|
||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `States`;
|
DROP TABLE IF EXISTS `States`;
|
||||||
CREATE TABLE `States` (
|
CREATE TABLE `States` (
|
||||||
|
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||||
`Name` varchar(64) NOT NULL default '',
|
`Name` varchar(64) NOT NULL default '',
|
||||||
`Definition` text NOT NULL,
|
`Definition` text NOT NULL,
|
||||||
PRIMARY KEY (`Name`)
|
`IsActive` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
PRIMARY KEY (`Id`)
|
||||||
) ENGINE=@ZM_MYSQL_ENGINE@;
|
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `Servers`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `Servers`;
|
||||||
|
CREATE TABLE `Servers` (
|
||||||
|
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||||
|
`Name` varchar(64) NOT NULL default '',
|
||||||
|
`State_Id` int(10) unsigned,
|
||||||
|
PRIMARY KEY (`Id`)
|
||||||
|
) ENGINE=@ZM_MYSQL_ENGINE@;
|
||||||
--
|
--
|
||||||
-- Table structure for table `Stats`
|
-- Table structure for table `Stats`
|
||||||
--
|
--
|
||||||
|
@ -559,6 +573,11 @@ INSERT INTO Controls VALUES (NULL,'Toshiba IK-WB11A','Remote','Toshiba_IK_WB11A'
|
||||||
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);
|
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);
|
||||||
INSERT INTO Controls VALUES (NULL,'3S Domo N5071', 'Remote', '3S', 0, 0, 1, 1, 0, 1, 1, 0, 0, 9999, 0, 9999, 0, 0, 0, 1, 1, 1, 1, 0, 0, 9999, 20, 9999, 0, 0, 0, 1, 1, 1, 1, 0, 0, 9999, 1, 9999, 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, 64, 1, 0, 1, 1, 0, 0, 0, 0, 1, -180, 180, 40, 100, 1, 40, 100, 0, 0, 1, -180, 180, 40, 100, 1, 40, 100, 0, 0, 0, 0);
|
INSERT INTO Controls VALUES (NULL,'3S Domo N5071', 'Remote', '3S', 0, 0, 1, 1, 0, 1, 1, 0, 0, 9999, 0, 9999, 0, 0, 0, 1, 1, 1, 1, 0, 0, 9999, 20, 9999, 0, 0, 0, 1, 1, 1, 1, 0, 0, 9999, 1, 9999, 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, 64, 1, 0, 1, 1, 0, 0, 0, 0, 1, -180, 180, 40, 100, 1, 40, 100, 0, 0, 1, -180, 180, 40, 100, 1, 40, 100, 0, 0, 0, 0);
|
||||||
INSERT INTO Controls VALUES (NULL,'ONVIF Camera','Ffmpeg','onvif',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,'ONVIF Camera','Ffmpeg','onvif',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,'Foscam 9831W','Ffmpeg','FI9831W',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,16,1,1,1,1,0,0,0,1,1,0,360,0,360,1,0,4,0,0,1,0,90,0,90,0,0,0,0,0,0,0);
|
||||||
|
INSERT INTO `Controls` VALUES (NULL,'Foscam FI8918W','Ffmpeg','FI8918W',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,8,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);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Add some monitor preset values
|
-- Add some monitor preset values
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Add Controls definition for ONVIF
|
-- Add Controls definition for ONVIF
|
||||||
|
-- Add Controls definition for FI9831W
|
||||||
|
-- Add Controls definition for FI8918W
|
||||||
--
|
--
|
||||||
INSERT INTO Controls
|
INSERT INTO Controls
|
||||||
SELECT * FROM (SELECT NULL as Id,
|
SELECT * FROM (SELECT NULL as Id,
|
||||||
|
@ -109,3 +111,268 @@ WHERE NOT EXISTS (
|
||||||
SELECT Name FROM Controls WHERE name = 'ONVIF Camera'
|
SELECT Name FROM Controls WHERE name = 'ONVIF Camera'
|
||||||
) LIMIT 1;
|
) LIMIT 1;
|
||||||
|
|
||||||
|
INSERT INTO Controls
|
||||||
|
SELECT * FROM (SELECT NULL as Id,
|
||||||
|
'Foscam 9831W' as Name,
|
||||||
|
'Ffmpeg' as Type,
|
||||||
|
'FI9831W' as Protocol,
|
||||||
|
0 as CanWake,
|
||||||
|
0 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,
|
||||||
|
0 as CanIris,
|
||||||
|
0 as CanAutoIris,
|
||||||
|
0 as CanIrisAbs,
|
||||||
|
0 as CanIrisRel,
|
||||||
|
0 as CanIrisCon,
|
||||||
|
0 as MinIrisRange,
|
||||||
|
0 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,
|
||||||
|
0 as CanWhite,
|
||||||
|
0 as CanAutoWhite,
|
||||||
|
0 as CanWhiteAbs,
|
||||||
|
0 as CanWhiteRel,
|
||||||
|
0 as CanWhiteCon,
|
||||||
|
0 as MinWhiteRange,
|
||||||
|
0 as MaxWhiteRange,
|
||||||
|
0 as MinWhiteStep,
|
||||||
|
0 as MaxWhiteStep,
|
||||||
|
0 as HasWhiteSpeed,
|
||||||
|
0 as MinWhiteSpeed,
|
||||||
|
0 as MaxWhiteSpeed,
|
||||||
|
0 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,
|
||||||
|
360 as MaxPanRange,
|
||||||
|
0 as MinPanStep,
|
||||||
|
360 as MaxPanStep,
|
||||||
|
1 as HasPanSpeed,
|
||||||
|
0 as MinPanSpeed,
|
||||||
|
4 as MaxPanSpeed,
|
||||||
|
0 as HasTurboPan,
|
||||||
|
0 as TurboPanSpeed,
|
||||||
|
1 as CanTilt,
|
||||||
|
0 as MinTiltRange,
|
||||||
|
90 as MaxTiltRange,
|
||||||
|
0 as MinTiltStep,
|
||||||
|
90 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 = 'Foscam 9831W'
|
||||||
|
) LIMIT 1;
|
||||||
|
|
||||||
|
INSERT INTO Controls
|
||||||
|
SELECT * FROM (SELECT NULL as Id,
|
||||||
|
'Foscam FI8918W' as Name,
|
||||||
|
'Ffmpeg' as Type,
|
||||||
|
'FI8918W' as Protocol,
|
||||||
|
0 as CanWake,
|
||||||
|
0 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,
|
||||||
|
0 as CanIris,
|
||||||
|
0 as CanAutoIris,
|
||||||
|
0 as CanIrisAbs,
|
||||||
|
0 as CanIrisRel,
|
||||||
|
0 as CanIrisCon,
|
||||||
|
0 as MinIrisRange,
|
||||||
|
0 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,
|
||||||
|
0 as CanWhite,
|
||||||
|
0 as CanAutoWhite,
|
||||||
|
0 as CanWhiteAbs,
|
||||||
|
0 as CanWhiteRel,
|
||||||
|
0 as CanWhiteCon,
|
||||||
|
0 as MinWhiteRange,
|
||||||
|
0 as MaxWhiteRange,
|
||||||
|
0 as MinWhiteStep,
|
||||||
|
0 as MaxWhiteStep,
|
||||||
|
0 as HasWhiteSpeed,
|
||||||
|
0 as MinWhiteSpeed,
|
||||||
|
0 as MaxWhiteSpeed,
|
||||||
|
0 as HasPresets,
|
||||||
|
8 as NumPresets,
|
||||||
|
0 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,
|
||||||
|
360 as MaxPanRange,
|
||||||
|
0 as MinPanStep,
|
||||||
|
360 as MaxPanStep,
|
||||||
|
1 as HasPanSpeed,
|
||||||
|
0 as MinPanSpeed,
|
||||||
|
4 as MaxPanSpeed,
|
||||||
|
0 as HasTurboPan,
|
||||||
|
0 as TurboPanSpeed,
|
||||||
|
1 as CanTilt,
|
||||||
|
0 as MinTiltRange,
|
||||||
|
90 as MaxTiltRange,
|
||||||
|
0 as MinTiltStep,
|
||||||
|
90 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 = 'Foscam FI8918W'
|
||||||
|
) LIMIT 1;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Hide USE_DEEP_STORAGE from user to prevent accidental event loss
|
||||||
|
--
|
||||||
|
UPDATE `zm`.`Config` SET `Category`='hidden' WHERE `Name`='ZM_USE_DEEP_STORAGE';
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Add Id column to State
|
||||||
|
--
|
||||||
|
|
||||||
|
SET @s = (SELECT IF(
|
||||||
|
(SELECT COUNT(*)
|
||||||
|
FROM INFORMATION_SCHEMA.COLUMNS
|
||||||
|
WHERE table_name = 'States'
|
||||||
|
AND table_schema = DATABASE()
|
||||||
|
AND column_name = 'Id'
|
||||||
|
) > 0,
|
||||||
|
"SELECT 'Column Id exists in States'",
|
||||||
|
"ALTER TABLE States ALTER Name DROP PRIMARY KEY;ALTER TABLE `States` ADD `Id` int(10) unsigned auto_increment NOT NULL PRIMARY KEY FIRST"
|
||||||
|
));
|
||||||
|
|
||||||
|
PREPARE stmt FROM @s;
|
||||||
|
EXECUTE stmt;
|
||||||
|
|
||||||
|
-- The States table will be updated to have a new column called IsActive
|
||||||
|
-- used to keep track of which custom state is active (if any)
|
||||||
|
SET @s = (SELECT IF(
|
||||||
|
(SELECT COUNT(*)
|
||||||
|
FROM INFORMATION_SCHEMA.COLUMNS
|
||||||
|
WHERE table_name = 'States'
|
||||||
|
AND table_schema = DATABASE()
|
||||||
|
AND column_name = 'IsActive'
|
||||||
|
) > 0,
|
||||||
|
"SELECT 'Column IsActive exists in States'",
|
||||||
|
"ALTER TABLE `States` ADD `IsActive` tinyint(3) unsigned not null default 0 AFTER `Definition`"
|
||||||
|
));
|
||||||
|
|
||||||
|
PREPARE stmt FROM @s;
|
||||||
|
EXECUTE stmt;
|
||||||
|
|
||||||
|
SET @s = (SELECT IF(
|
||||||
|
(SELECT COUNT(*)
|
||||||
|
FROM INFORMATION_SCHEMA.TABLES
|
||||||
|
WHERE table_name = 'Servers'
|
||||||
|
AND table_schema = DATABASE()
|
||||||
|
) > 0,
|
||||||
|
"SELECT 'Servers table exists'",
|
||||||
|
"CREATE TABLE `Servers` (
|
||||||
|
`Id` int(10) unsigned NOT NULL auto_increment,
|
||||||
|
`Name` varchar(64) NOT NULL default '',
|
||||||
|
`State_Id` int(10) unsigned,
|
||||||
|
PRIMARY KEY (`Id`)
|
||||||
|
)"
|
||||||
|
));
|
||||||
|
|
||||||
|
PREPARE stmt FROM @s;
|
||||||
|
EXECUTE stmt;
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,6 @@ override_dh_auto_configure:
|
||||||
-DZM_CGIDIR=/usr/lib/cgi-bin \
|
-DZM_CGIDIR=/usr/lib/cgi-bin \
|
||||||
-DZM_WEB_USER=www-data \
|
-DZM_WEB_USER=www-data \
|
||||||
-DZM_WEB_GROUP=www-data \
|
-DZM_WEB_GROUP=www-data \
|
||||||
-DZM_PERL_SUBPREFIX=/share/perl5 \
|
|
||||||
-DCMAKE_INSTALL_SYSCONFDIR=etc/zm
|
-DCMAKE_INSTALL_SYSCONFDIR=etc/zm
|
||||||
|
|
||||||
override_dh_auto_install:
|
override_dh_auto_install:
|
||||||
|
|
|
@ -32,7 +32,7 @@ install(CODE "execute_process(COMMAND ln -sf ../../java/cambozola.jar \"\$ENV{DE
|
||||||
# Install auxillary files required to run zoneminder on Fedora
|
# 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.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.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 ../../misc/zoneminder-tmpfiles.conf DESTINATION /etc/tmpfiles.d RENAME zoneminder.conf 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 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(FILES zoneminder.service DESTINATION /usr/lib/systemd/system PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,6 @@ too much degradation of performance.
|
||||||
%build
|
%build
|
||||||
%cmake \
|
%cmake \
|
||||||
-DZM_TARGET_DISTRO="f19" \
|
-DZM_TARGET_DISTRO="f19" \
|
||||||
-DZM_PERL_SUBPREFIX=`x="%{perl_vendorlib}" ; echo ${x#"%{_prefix}"}` \
|
|
||||||
%{?_without_ffmpeg:-DZM_NO_FFMPEG=ON} \
|
%{?_without_ffmpeg:-DZM_NO_FFMPEG=ON} \
|
||||||
%{?_without_x10:-DZM_NO_X10=ON} \
|
%{?_without_x10:-DZM_NO_X10=ON} \
|
||||||
.
|
.
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
%define _without_x10 1
|
%define _without_x10 1
|
||||||
|
|
||||||
Name: zoneminder
|
Name: zoneminder
|
||||||
Version: 1.28.0
|
Version: 1.28.1
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: A camera monitoring and analysis tool
|
Summary: A camera monitoring and analysis tool
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
|
@ -31,14 +31,14 @@ BuildRequires: perl(MIME::Entity) perl(MIME::Lite)
|
||||||
BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap)
|
BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap)
|
||||||
BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign)
|
BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign)
|
||||||
BuildRequires: perl(Expect) perl(Sys::Syslog)
|
BuildRequires: perl(Expect) perl(Sys::Syslog)
|
||||||
BuildRequires: gcc gcc-c++ vlc-devel libcurl-devel
|
BuildRequires: gcc gcc-c++ vlc-devel libcurl-devel libv4l-devel
|
||||||
%{!?_without_ffmpeg:BuildRequires: ffmpeg-devel}
|
%{!?_without_ffmpeg:BuildRequires: ffmpeg-devel}
|
||||||
%{!?_without_x10:BuildRequires: perl(X10::ActiveHome) perl(Astro::SunTime)}
|
%{!?_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
|
# cmake needs the following installed at build time due to the way it auto-detects certain parameters
|
||||||
BuildRequires: httpd polkit-devel
|
BuildRequires: httpd polkit-devel
|
||||||
%{!?_without_ffmpeg:BuildRequires: ffmpeg}
|
%{!?_without_ffmpeg:BuildRequires: ffmpeg}
|
||||||
|
|
||||||
Requires: httpd php php-mysql cambozola polkit net-tools
|
Requires: httpd php php-mysql cambozola polkit net-tools psmisc
|
||||||
Requires: libjpeg-turbo vlc-core libcurl
|
Requires: libjpeg-turbo vlc-core libcurl
|
||||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||||
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
|
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
|
||||||
|
@ -76,7 +76,6 @@ too much degradation of performance.
|
||||||
%build
|
%build
|
||||||
%cmake \
|
%cmake \
|
||||||
-DZM_TARGET_DISTRO="f20" \
|
-DZM_TARGET_DISTRO="f20" \
|
||||||
-DZM_PERL_SUBPREFIX=`x="%{perl_vendorlib}" ; echo ${x#"%{_prefix}"}` \
|
|
||||||
%{?_without_ffmpeg:-DZM_NO_FFMPEG=ON} \
|
%{?_without_ffmpeg:-DZM_NO_FFMPEG=ON} \
|
||||||
%{?_without_x10:-DZM_NO_X10=ON} \
|
%{?_without_x10:-DZM_NO_X10=ON} \
|
||||||
.
|
.
|
||||||
|
|
|
@ -31,14 +31,14 @@ BuildRequires: perl(MIME::Entity) perl(MIME::Lite)
|
||||||
BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap)
|
BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap)
|
||||||
BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign)
|
BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign)
|
||||||
BuildRequires: perl(Expect) perl(Sys::Syslog)
|
BuildRequires: perl(Expect) perl(Sys::Syslog)
|
||||||
BuildRequires: gcc gcc-c++ vlc-devel libcurl-devel
|
BuildRequires: gcc gcc-c++ vlc-devel libcurl-devel libv4l-devel
|
||||||
%{!?_without_ffmpeg:BuildRequires: ffmpeg-devel}
|
%{!?_without_ffmpeg:BuildRequires: ffmpeg-devel}
|
||||||
%{!?_without_x10:BuildRequires: perl(X10::ActiveHome) perl(Astro::SunTime)}
|
%{!?_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
|
# cmake needs the following installed at build time due to the way it auto-detects certain parameters
|
||||||
BuildRequires: httpd polkit-devel
|
BuildRequires: httpd polkit-devel
|
||||||
%{!?_without_ffmpeg:BuildRequires: ffmpeg}
|
%{!?_without_ffmpeg:BuildRequires: ffmpeg}
|
||||||
|
|
||||||
Requires: httpd php php-mysql cambozola polkit net-tools
|
Requires: httpd php php-mysql cambozola polkit net-tools psmisc
|
||||||
Requires: libjpeg-turbo vlc-core libcurl
|
Requires: libjpeg-turbo vlc-core libcurl
|
||||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||||
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
|
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
|
||||||
|
@ -76,7 +76,6 @@ too much degradation of performance.
|
||||||
%build
|
%build
|
||||||
%cmake \
|
%cmake \
|
||||||
-DZM_TARGET_DISTRO="f21" \
|
-DZM_TARGET_DISTRO="f21" \
|
||||||
-DZM_PERL_SUBPREFIX=`x="%{perl_vendorlib}" ; echo ${x#"%{_prefix}"}` \
|
|
||||||
%{?_without_ffmpeg:-DZM_NO_FFMPEG=ON} \
|
%{?_without_ffmpeg:-DZM_NO_FFMPEG=ON} \
|
||||||
%{?_without_x10:-DZM_NO_X10=ON} \
|
%{?_without_x10:-DZM_NO_X10=ON} \
|
||||||
.
|
.
|
||||||
|
@ -155,8 +154,6 @@ fi
|
||||||
%{!?_without_x10:%{_bindir}/zmx10.pl}
|
%{!?_without_x10:%{_bindir}/zmx10.pl}
|
||||||
|
|
||||||
%{perl_vendorlib}/ZoneMinder*
|
%{perl_vendorlib}/ZoneMinder*
|
||||||
%{perl_vendorlib}/%{_arch}-linux-thread-multi/auto/ZoneMinder*
|
|
||||||
#%{perl_archlib}/ZoneMinder*
|
|
||||||
%{_mandir}/man*/*
|
%{_mandir}/man*/*
|
||||||
%dir %{_libexecdir}/zoneminder
|
%dir %{_libexecdir}/zoneminder
|
||||||
%{_libexecdir}/zoneminder/cgi-bin
|
%{_libexecdir}/zoneminder/cgi-bin
|
||||||
|
|
|
@ -16,7 +16,7 @@ else(ZM_TARGET_DISTRO STREQUAL "el7")
|
||||||
endif(ZM_TARGET_DISTRO STREQUAL "el7")
|
endif(ZM_TARGET_DISTRO STREQUAL "el7")
|
||||||
|
|
||||||
# Download jscalendar & move files into position
|
# 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)
|
file(DOWNLOAD http://nbtelecom.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}")
|
#message(STATUS "Log of jscalender script was: ${jsc_log}")
|
||||||
if(download_jsc EQUAL 0)
|
if(download_jsc EQUAL 0)
|
||||||
message(STATUS "Jscalander successfully downloaded. Installing...")
|
message(STATUS "Jscalander successfully downloaded. Installing...")
|
||||||
|
@ -58,7 +58,7 @@ if(ZM_TARGET_DISTRO STREQUAL "el7")
|
||||||
install(FILES zoneminder.el7.conf DESTINATION /etc/httpd/conf.d RENAME zoneminder.conf PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
install(FILES zoneminder.el7.conf DESTINATION /etc/httpd/conf.d RENAME zoneminder.conf PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||||
install(FILES zoneminder.el7.logrotate DESTINATION /etc/logrotate.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
install(FILES zoneminder.el7.logrotate DESTINATION /etc/logrotate.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||||
install(FILES zoneminder.service DESTINATION /usr/lib/systemd/system PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
install(FILES zoneminder.service DESTINATION /usr/lib/systemd/system 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 ../../misc/zoneminder-tmpfiles.conf DESTINATION /etc/tmpfiles.d RENAME zoneminder.conf PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||||
else(ZM_TARGET_DISTRO STREQUAL "el7")
|
else(ZM_TARGET_DISTRO STREQUAL "el7")
|
||||||
install(FILES zoneminder.el6.conf DESTINATION /etc/httpd/conf.d RENAME zoneminder.conf PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
install(FILES zoneminder.el6.conf DESTINATION /etc/httpd/conf.d RENAME zoneminder.conf PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||||
install(FILES zoneminder.el6.logrotate DESTINATION /etc/logrotate.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
install(FILES zoneminder.el6.logrotate DESTINATION /etc/logrotate.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
%define zmgid_final apache
|
%define zmgid_final apache
|
||||||
|
|
||||||
Name: zoneminder
|
Name: zoneminder
|
||||||
Version: 1.28.0
|
Version: 1.28.1
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: A camera monitoring and analysis tool
|
Summary: A camera monitoring and analysis tool
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
|
@ -30,7 +30,7 @@ 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
|
# cmake needs the following installed at build time due to the way it auto-detects certain parameters
|
||||||
BuildRequires: httpd ffmpeg
|
BuildRequires: httpd ffmpeg
|
||||||
|
|
||||||
Requires: httpd php php-mysql mysql-server libjpeg-turbo polkit net-tools
|
Requires: httpd php php-mysql mysql-server libjpeg-turbo polkit net-tools psmisc
|
||||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||||
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
|
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(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP)
|
||||||
|
@ -73,7 +73,7 @@ too much degradation of performance.
|
||||||
%build
|
%build
|
||||||
# Have to override CMAKE_INSTALL_LIBDIR for cmake < 2.8.7 due to this bug:
|
# Have to override CMAKE_INSTALL_LIBDIR for cmake < 2.8.7 due to this bug:
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=795542
|
# 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}"}` .
|
%cmake -DZM_TARGET_DISTRO="el6" -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} .
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ rm -rf %{_docdir}/%{name}-%{version}
|
||||||
%{_bindir}/zmcamtool.pl
|
%{_bindir}/zmcamtool.pl
|
||||||
%{_bindir}/zmsystemctl.pl
|
%{_bindir}/zmsystemctl.pl
|
||||||
%{_bindir}/zmx10.pl
|
%{_bindir}/zmx10.pl
|
||||||
%{_bindir}/zmonvif-probe.pl
|
#%{_bindir}/zmonvif-probe.pl
|
||||||
|
|
||||||
%{perl_vendorlib}/ZoneMinder*
|
%{perl_vendorlib}/ZoneMinder*
|
||||||
%{perl_vendorlib}/%{_arch}-linux-thread-multi/auto/ZoneMinder*
|
%{perl_vendorlib}/%{_arch}-linux-thread-multi/auto/ZoneMinder*
|
||||||
|
|
|
@ -27,12 +27,12 @@ BuildRequires: perl(MIME::Entity) perl(MIME::Lite)
|
||||||
BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap)
|
BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap)
|
||||||
BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign)
|
BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign)
|
||||||
BuildRequires: perl(Expect) perl(Sys::Syslog)
|
BuildRequires: perl(Expect) perl(Sys::Syslog)
|
||||||
BuildRequires: gcc gcc-c++ vlc-devel libcurl-devel
|
BuildRequires: gcc gcc-c++ vlc-devel libcurl-devel libv4l-devel
|
||||||
BuildRequires: ffmpeg ffmpeg-devel perl(X10::ActiveHome) perl(Astro::SunTime)
|
BuildRequires: ffmpeg ffmpeg-devel perl(X10::ActiveHome) perl(Astro::SunTime)
|
||||||
# cmake needs the following installed at build time due to the way it auto-detects certain parameters
|
# cmake needs the following installed at build time due to the way it auto-detects certain parameters
|
||||||
BuildRequires: httpd polkit-devel
|
BuildRequires: httpd polkit-devel
|
||||||
|
|
||||||
Requires: httpd php php-mysql mariadb-server polkit net-tools
|
Requires: httpd php php-mysql mariadb-server polkit net-tools psmisc
|
||||||
Requires: libjpeg-turbo vlc-core libcurl
|
Requires: libjpeg-turbo vlc-core libcurl
|
||||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||||
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
|
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
|
||||||
|
@ -69,7 +69,6 @@ too much degradation of performance.
|
||||||
%build
|
%build
|
||||||
%cmake \
|
%cmake \
|
||||||
-DZM_TARGET_DISTRO="el7" \
|
-DZM_TARGET_DISTRO="el7" \
|
||||||
-DZM_PERL_SUBPREFIX=`x="%{perl_vendorlib}" ; echo ${x#"%{_prefix}"}` \
|
|
||||||
.
|
.
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
@ -108,6 +107,8 @@ if [ $1 -eq 0 ] ; then
|
||||||
# Package removal, not upgrade
|
# Package removal, not upgrade
|
||||||
/bin/systemctl --no-reload disable zoneminder.service > /dev/null 2>&1 || :
|
/bin/systemctl --no-reload disable zoneminder.service > /dev/null 2>&1 || :
|
||||||
/bin/systemctl stop zoneminder.service > /dev/null 2>&1 || :
|
/bin/systemctl stop zoneminder.service > /dev/null 2>&1 || :
|
||||||
|
echo -e "\nRemoving ZoneMinder SELinux policy module. Please wait.\n"
|
||||||
|
/usr/sbin/semodule -r local_zoneminder.pp
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
|
@ -129,7 +130,8 @@ fi
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc AUTHORS COPYING README.md distros/redhat/README.Centos7 distros/redhat/jscalendar-doc
|
%doc AUTHORS BUGS ChangeLog COPYING LICENSE NEWS README.md distros/redhat/README.Centos7 distros/redhat/jscalendar-doc
|
||||||
|
%doc distros/redhat/cambozola-doc distros/redhat/local_zoneminder.te
|
||||||
%config %attr(640,root,%{zmgid_final}) /etc/zm/zm.conf
|
%config %attr(640,root,%{zmgid_final}) /etc/zm/zm.conf
|
||||||
%config(noreplace) %attr(644,root,root) /etc/httpd/conf.d/zoneminder.conf
|
%config(noreplace) %attr(644,root,root) /etc/httpd/conf.d/zoneminder.conf
|
||||||
%config(noreplace) /etc/tmpfiles.d/zoneminder.conf
|
%config(noreplace) /etc/tmpfiles.d/zoneminder.conf
|
||||||
|
@ -157,7 +159,8 @@ fi
|
||||||
%{_bindir}/zmx10.pl
|
%{_bindir}/zmx10.pl
|
||||||
|
|
||||||
%{perl_vendorlib}/ZoneMinder*
|
%{perl_vendorlib}/ZoneMinder*
|
||||||
%{perl_vendorlib}/%{_arch}-linux-thread-multi/auto/ZoneMinder*
|
%{perl_vendorarch}/auto/ZoneMinder/.packlist
|
||||||
|
#%{perl_vendorlib}/%{_arch}-linux-thread-multi/auto/ZoneMinder*
|
||||||
#%{perl_archlib}/ZoneMinder*
|
#%{perl_archlib}/ZoneMinder*
|
||||||
%{_mandir}/man*/*
|
%{_mandir}/man*/*
|
||||||
%dir %{_libexecdir}/zoneminder
|
%dir %{_libexecdir}/zoneminder
|
||||||
|
|
|
@ -1,3 +1,16 @@
|
||||||
|
zoneminder (1.28.1+1-trusty-SNAPSHOT2015030201) trusty; urgency=medium
|
||||||
|
|
||||||
|
* maybe fix for RTSP Basic Auth
|
||||||
|
* Also remove dependency on netpbm
|
||||||
|
|
||||||
|
-- Isaac Connor <iconnor@connortechnology.com> Mon, 02 Mar 2015 11:25:59 -0500
|
||||||
|
|
||||||
|
zoneminder (1.28.1+1-utopic-SNAPSHOT2015022301) utopic; urgency=medium
|
||||||
|
|
||||||
|
* Big merge of onvif support and some fixes.
|
||||||
|
|
||||||
|
-- Isaac Connor <iconnor@connortechnology.com> Mon, 23 Feb 2015 19:45:45 -0500
|
||||||
|
|
||||||
zoneminder (1.28.0+1-trusty-SNAPSHOT2015021201) trusty; urgency=medium
|
zoneminder (1.28.0+1-trusty-SNAPSHOT2015021201) trusty; urgency=medium
|
||||||
|
|
||||||
* add mysql-client-5.6 as a dependency instaed of mysql-client.
|
* add mysql-client-5.6 as a dependency instaed of mysql-client.
|
||||||
|
|
|
@ -2,12 +2,12 @@ Source: zoneminder
|
||||||
Section: net
|
Section: net
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Isaac Connor <iconnor@connortechnology.com>
|
Maintainer: Isaac Connor <iconnor@connortechnology.com>
|
||||||
Build-Depends: debhelper (>= 9), autoconf, automake, quilt, libphp-serialization-perl, libgnutls-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev|libjpeg9-dev|libjpeg62-turbo-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, dh-autoreconf, libvlccore-dev, libvlc-dev, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libgcrypt11-dev, libpolkit-gobject-1-dev
|
Build-Depends: debhelper (>= 9), autoconf, automake, quilt, libphp-serialization-perl, libgnutls-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev|libjpeg9-dev|libjpeg62-turbo-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, libavdevice-dev, libdevice-serialport-perl, libpcre3, libarchive-zip-perl, libmime-lite-perl, 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.4
|
Standards-Version: 3.9.4
|
||||||
|
|
||||||
Package: zoneminder
|
Package: zoneminder
|
||||||
Architecture: any
|
Architecture: any
|
||||||
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|mysql-client-5.6, 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 | libavdevice55, libjpeg8|libjpeg9|libjpeg62-turbo, 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, liburi-encode-perl
|
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|mysql-client-5.6, 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, libavdevice53 | libavdevice55, libjpeg8|libjpeg9|libjpeg62-turbo, 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, liburi-encode-perl
|
||||||
Recommends: mysql-server|mariadb-server
|
Recommends: mysql-server|mariadb-server
|
||||||
Description: Video camera security and surveillance solution
|
Description: Video camera security and surveillance solution
|
||||||
ZoneMinder is intended for use in single or multi-camera video security
|
ZoneMinder is intended for use in single or multi-camera video security
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
zoneminder for Debian
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
There is one manual step to get the web interface working.
|
||||||
|
You need to link /etc/zm/apache.conf to /etc/apache2/conf.d/zoneminder.conf,
|
||||||
|
then reload the apache config (i.e. /etc/init.d/apache2 reload)
|
||||||
|
|
||||||
|
Changing the location for images and events
|
||||||
|
-------------------------------------------
|
||||||
|
|
||||||
|
Zoneminder, in its upstream form, stores data in /usr/share/zoneminder/. This
|
||||||
|
package modifies that by changing /usr/share/zoneminder/images and
|
||||||
|
/usr/share/zoneminder/events to symlinks to directories under
|
||||||
|
/var/cache/zoneminder.
|
||||||
|
|
||||||
|
There are numerous places these could be put and ways to do it. But, at the
|
||||||
|
moment, if you change this, an upgrade will fail with a warning about these
|
||||||
|
locations having changed (the reason for this was that previously, an upgrade
|
||||||
|
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
|
||||||
|
|
||||||
|
/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
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- Peter Howard <pjh@northern-ridge.com.au>, Sun, 16 Jan 2010 01:35:51 +1100
|
||||||
|
|
||||||
|
Access to /dev/video*
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
For cameras which require access to /dev/video*, zoneminder may need the
|
||||||
|
www-data user added to the video group in order to see those cameras:
|
||||||
|
|
||||||
|
adduser www-data video
|
||||||
|
|
||||||
|
Note that all web applications running on the zoneminder server will then have
|
||||||
|
access to all video devices on the system.
|
||||||
|
|
||||||
|
-- Vagrant Cascadian <vagrant@debian.org> Sun, 27 Mar 2011 13:06:56 -0700
|
|
@ -0,0 +1,9 @@
|
||||||
|
Alias /zm /usr/share/zoneminder
|
||||||
|
|
||||||
|
<Directory /usr/share/zoneminder>
|
||||||
|
php_flag register_globals off
|
||||||
|
Options Indexes FollowSymLinks
|
||||||
|
<IfModule mod_dir.c>
|
||||||
|
DirectoryIndex index.php
|
||||||
|
</IfModule>
|
||||||
|
</Directory>
|
|
@ -0,0 +1,86 @@
|
||||||
|
zoneminder (1.28.1+1-trusty-SNAPSHOT2015030201) trusty; urgency=medium
|
||||||
|
|
||||||
|
* maybe fix for RTSP Basic Auth
|
||||||
|
* Also remove dependency on netpbm
|
||||||
|
|
||||||
|
-- Isaac Connor <iconnor@connortechnology.com> Mon, 02 Mar 2015 11:25:59 -0500
|
||||||
|
|
||||||
|
zoneminder (1.28.1+1-utopic-SNAPSHOT2015022301) utopic; urgency=medium
|
||||||
|
|
||||||
|
* Big merge of onvif support and some fixes.
|
||||||
|
|
||||||
|
-- Isaac Connor <iconnor@connortechnology.com> Mon, 23 Feb 2015 19:45:45 -0500
|
||||||
|
|
||||||
|
zoneminder (1.28.0+1-trusty-SNAPSHOT2015021201) trusty; urgency=medium
|
||||||
|
|
||||||
|
* add mysql-client-5.6 as a dependency instaed of mysql-client.
|
||||||
|
|
||||||
|
-- Isaac Connor <iconnor@connortechnology.com> Fri, 13 Feb 2015 09:35:13 -0500
|
||||||
|
|
||||||
|
zoneminder (1.28.0+1-trusty-SNAPSHOT2015011101) trusty; urgency=medium
|
||||||
|
|
||||||
|
* small changes
|
||||||
|
|
||||||
|
-- Isaac Connor <iconnor@connortechnology.com> Fri, 12 Dec 2014 16:38:36 -0500
|
||||||
|
|
||||||
|
zoneminder (1.28.0+1-utopic-SNAPSHOT2014112001) utopic; urgency=medium
|
||||||
|
|
||||||
|
* Various fixes and developments since 1.28.0. Includes Digest-Auth for HTTP and better for RTSP
|
||||||
|
|
||||||
|
-- Isaac Connor <iconnor@connortechnology.com> Thu, 20 Nov 2014 10:57:57 -0500
|
||||||
|
|
||||||
|
zoneminder (1.28.0-trusty) trusty; urgency=medium
|
||||||
|
|
||||||
|
* Release
|
||||||
|
|
||||||
|
-- Isaac Connor <iconnor@connortechnology.com> Fri, 17 Oct 2014 09:25:55 -0400
|
||||||
|
|
||||||
|
zoneminder (1.27.99+1-trusty-SNAPSHOT2014101401) trusty; urgency=medium
|
||||||
|
|
||||||
|
* Several PR merges in big push for 1.28.0
|
||||||
|
|
||||||
|
-- Isaac Connor <iconnor@connortechnology.com> Tue, 14 Oct 2014 09:28:29 -0400
|
||||||
|
|
||||||
|
zoneminder (1.27.99+1-trusty-SNAPSHOT2014092601) trusty; urgency=medium
|
||||||
|
|
||||||
|
* style updates and db fixes for database logging filters
|
||||||
|
|
||||||
|
-- Isaac Connor <iconnor@connortechnology.com> Fri, 26 Sep 2014 14:44:45 -0400
|
||||||
|
|
||||||
|
zoneminder (1.27.99+1-trusty-SNAPSHOT2014090801) trusty; urgency=medium
|
||||||
|
|
||||||
|
* several segfault fixes for local cameras
|
||||||
|
|
||||||
|
-- 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
|
|
@ -0,0 +1 @@
|
||||||
|
9
|
|
@ -0,0 +1,40 @@
|
||||||
|
Source: zoneminder
|
||||||
|
Section: net
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: Isaac Connor <iconnor@connortechnology.com>
|
||||||
|
Build-Depends: debhelper (>= 9), dh-systemd (>= 1.5), autoconf, automake, quilt, libphp-serialization-perl, libgnutls-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev|libjpeg9-dev|libjpeg62-turbo-dev, libpcre3-dev, libavcodec-ffmpeg-dev, libavformat-ffmpeg-dev, libswscale-ffmpeg-dev, libavutil-ffmpeg-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, ffmpeg, libavdevice-ffmpeg-dev, libdevice-serialport-perl, libpcre3, libarchive-zip-perl, libmime-lite-perl, 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.4
|
||||||
|
|
||||||
|
Package: zoneminder
|
||||||
|
Architecture: any
|
||||||
|
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|mysql-client-5.6, 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, libavdevice-ffmpeg56, libjpeg8|libjpeg9|libjpeg62-turbo, 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, liburi-encode-perl
|
||||||
|
Recommends: mysql-server|mariadb-server
|
||||||
|
Description: 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
|
||||||
|
Section: debug
|
||||||
|
Priority: extra
|
||||||
|
Architecture: any
|
||||||
|
Depends: zoneminder (= ${binary:Version}), ${misc:Depends}
|
||||||
|
Description: Debugging symbols 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
|
||||||
|
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.
|
|
@ -0,0 +1,22 @@
|
||||||
|
Copyright:
|
||||||
|
|
||||||
|
Copyright 2002 Philip Coombes <philip.coombes@zoneminder.com>
|
||||||
|
|
||||||
|
License:
|
||||||
|
|
||||||
|
This package is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
This package is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public
|
||||||
|
License along with this package; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
On Debian GNU/Linux systems, the text of the GPL can be found in
|
||||||
|
/usr/share/common-licenses/GPL.
|
|
@ -0,0 +1,6 @@
|
||||||
|
var/log/zm
|
||||||
|
var/lib/zm
|
||||||
|
var/cache/zoneminder/events
|
||||||
|
var/cache/zoneminder/images
|
||||||
|
var/cache/zoneminder/temp
|
||||||
|
usr/share/zoneminder/db
|
|
@ -0,0 +1 @@
|
||||||
|
README.md
|
|
@ -0,0 +1,12 @@
|
||||||
|
usr/bin
|
||||||
|
usr/lib/cgi-bin
|
||||||
|
usr/share/man
|
||||||
|
usr/share/perl5/ZoneMinder
|
||||||
|
usr/share/perl5/ZoneMinder.pm
|
||||||
|
usr/share/polkit-1/actions
|
||||||
|
usr/share/polkit-1/rules.d
|
||||||
|
usr/share/zoneminder
|
||||||
|
etc/zm
|
||||||
|
db/zm_create.sql usr/share/zoneminder/db
|
||||||
|
db/zm_update-*.sql usr/share/zoneminder/db
|
||||||
|
debian/apache.conf etc/zm
|
|
@ -0,0 +1,4 @@
|
||||||
|
var/cache/zoneminder/events usr/share/zoneminder/events
|
||||||
|
var/cache/zoneminder/images usr/share/zoneminder/images
|
||||||
|
var/cache/zoneminder/temp usr/share/zoneminder/temp
|
||||||
|
usr/lib/cgi-bin usr/share/zoneminder/cgi-bin
|
|
@ -0,0 +1,53 @@
|
||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$1" = "configure" ]; then
|
||||||
|
if [ -e "/lib/systemd/system/mysql.service" ]; then
|
||||||
|
#
|
||||||
|
# Get mysql started if it isn't
|
||||||
|
#
|
||||||
|
if ! $(systemctl is-active mysql >/dev/null 2>&1); then
|
||||||
|
systemctl start mysql
|
||||||
|
fi
|
||||||
|
if $(systemctl is-active mysql >/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
|
||||||
|
|
||||||
|
systemctl stop zoneminder || true #not sure about "|| true"
|
||||||
|
zmupdate.pl --nointeractive
|
||||||
|
|
||||||
|
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 [ -e "/lib/systemd/system/zoneminder.service" ]; then #changed from -x to -e, could be wrong
|
||||||
|
if systemctl is-active zoneminder >/dev/null 2>&1 ; then
|
||||||
|
systemctl stop zoneminder || exit $?
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "configure" ]; then
|
||||||
|
if [ -z "$2" ]; then
|
||||||
|
chown www-data:www-data /var/log/zm
|
||||||
|
chown www-data:www-data /var/lib/zm/
|
||||||
|
chown www-data:www-data -R /var/cache/zoneminder
|
||||||
|
else
|
||||||
|
chown www-data:www-data /var/log/zm
|
||||||
|
zmupdate.pl
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
#DEBHELPER#
|
|
@ -0,0 +1,9 @@
|
||||||
|
#! /bin/sh
|
||||||
|
# set -e # to be reinstated later
|
||||||
|
|
||||||
|
if [ "$1" = "purge" ]; then
|
||||||
|
echo 'delete from user where User="zmuser";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
|
||||||
|
echo 'delete from db where User="zmuser";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql
|
||||||
|
mysqladmin --defaults-file=/etc/mysql/debian.cnf -f drop zm
|
||||||
|
fi
|
||||||
|
#DEBHELPER#
|
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
abort=false
|
||||||
|
if [ -L /usr/share/zoneminder/events ]; then
|
||||||
|
l=$(readlink /usr/share/zoneminder/events)
|
||||||
|
if [ "$l" != "/var/cache/zoneminder/events" ]; then
|
||||||
|
abort=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -L /usr/share/zoneminder/images ]; then
|
||||||
|
l=$(readlink /usr/share/zoneminder/images )
|
||||||
|
if [ "$l" != "/var/cache/zoneminder/images" ]; then
|
||||||
|
abort=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$abort" = "true" ]; then
|
||||||
|
cat >&2 << EOF
|
||||||
|
Aborting installation of zoneminder due to non-default symlinks in
|
||||||
|
/usr/share/zoneminder for the images and/or events directory, which could
|
||||||
|
result in loss of data. Please move your data in each of these directories to
|
||||||
|
/var/cache/zoneminder before installing zoneminder from the package.
|
||||||
|
EOF
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,67 @@
|
||||||
|
#!/usr/bin/make -f
|
||||||
|
# -*- makefile -*-
|
||||||
|
# Sample debian/rules that uses debhelper.
|
||||||
|
# This file was originally written by Joey Hess and Craig Small.
|
||||||
|
# As a special exception, when this file is copied by dh-make into a
|
||||||
|
# dh-make output file, you may use that output file without restriction.
|
||||||
|
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
||||||
|
|
||||||
|
# Uncomment this to turn on verbose mode.
|
||||||
|
#export DH_VERBOSE=1
|
||||||
|
|
||||||
|
# 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)
|
||||||
|
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||||
|
|
||||||
|
CFLAGS = -Wall -g
|
||||||
|
CPPFLAGS = -D__STDC_CONSTANT_MACROS
|
||||||
|
CXXFLAGS = -DHAVE_LIBCRYPTO
|
||||||
|
|
||||||
|
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
||||||
|
CFLAGS += -O0
|
||||||
|
else
|
||||||
|
CFLAGS += -O2
|
||||||
|
endif
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@ --with quilt,autoreconf,systemd
|
||||||
|
|
||||||
|
override_dh_auto_configure:
|
||||||
|
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" dh_auto_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:
|
||||||
|
# Add here commands to clean up after the build process.
|
||||||
|
[ ! -f Makefile ] || $(MAKE) distclean
|
||||||
|
dh_clean
|
||||||
|
|
||||||
|
override_dh_install:
|
||||||
|
dh_install --fail-missing
|
||||||
|
#
|
||||||
|
# NOTE: This is a short-term kludge; hopefully changes in the next
|
||||||
|
# upstream version will render this unnecessary.
|
||||||
|
rm -rf debian/zoneminder/usr/share/zoneminder/events
|
||||||
|
rm -rf debian/zoneminder/usr/share/zoneminder/images
|
||||||
|
rm -rf debian/zoneminder/usr/share/zoneminder/temp
|
||||||
|
dh_link var/cache/zoneminder/events usr/share/zoneminder/events
|
||||||
|
dh_link var/cache/zoneminder/images usr/share/zoneminder/images
|
||||||
|
dh_link var/cache/zoneminder/temp usr/share/zoneminder/temp
|
||||||
|
|
||||||
|
#
|
||||||
|
# This is a slightly lesser kludge; moving the cgi stuff to
|
||||||
|
# /usr/share/zoneminder/cgi-bin breaks one set of behavior,
|
||||||
|
# having it just in /usr/lib/cgi-bin breaks another bit of
|
||||||
|
# behavior.
|
||||||
|
#
|
||||||
|
dh_link usr/lib/cgi-bin usr/share/zoneminder/cgi-bin
|
||||||
|
|
||||||
|
override_dh_fixperms:
|
||||||
|
dh_fixperms
|
||||||
|
chown root:root debian/zoneminder/etc/zm/zm.conf
|
||||||
|
|
||||||
|
override_dh_auto_test:
|
||||||
|
# do not run tests...
|
||||||
|
|
||||||
|
.PHONY: override_dh_strip
|
||||||
|
override_dh_strip:
|
||||||
|
dh_strip --dbg-package=zoneminder-dbg
|
|
@ -0,0 +1,3 @@
|
||||||
|
version=3
|
||||||
|
http://www.zoneminder.com/downloads.html \
|
||||||
|
.*/ZoneMinder-(.*).tar.gz
|
|
@ -0,0 +1,16 @@
|
||||||
|
# ZoneMinder systemd unit file
|
||||||
|
# This file is intended to work with all Linux distributions
|
||||||
|
[Unit]
|
||||||
|
Description=ZoneMinder CCTV recording and security system
|
||||||
|
After=network.target mysql.service apache2.service
|
||||||
|
Requires=mysql.service apache2.service
|
||||||
|
[Service]
|
||||||
|
User=www-data
|
||||||
|
Type=forking
|
||||||
|
ExecStart=/usr/bin/zmpkg.pl start
|
||||||
|
ExecReload=/usr/bin/zmpkg.pl restart
|
||||||
|
ExecStop=/usr/bin/zmpkg.pl stop
|
||||||
|
PIDFile="/run/zm/zm.pid"
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
d /var/run/zm 0755 www-data www-data
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
zoneminder for Debian
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
There is one manual step to get the web interface working.
|
||||||
|
You need to link /etc/zm/apache.conf to /etc/apache2/conf.d/zoneminder.conf,
|
||||||
|
then reload the apache config (i.e. /etc/init.d/apache2 reload)
|
||||||
|
|
||||||
|
Changing the location for images and events
|
||||||
|
-------------------------------------------
|
||||||
|
|
||||||
|
Zoneminder, in its upstream form, stores data in /usr/share/zoneminder/. This
|
||||||
|
package modifies that by changing /usr/share/zoneminder/images and
|
||||||
|
/usr/share/zoneminder/events to symlinks to directories under
|
||||||
|
/var/cache/zoneminder.
|
||||||
|
|
||||||
|
There are numerous places these could be put and ways to do it. But, at the
|
||||||
|
moment, if you change this, an upgrade will fail with a warning about these
|
||||||
|
locations having changed (the reason for this was that previously, an upgrade
|
||||||
|
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.
|
||||||
|
|
||||||
|
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 /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 ext4 defaults 0 2
|
||||||
|
/dev/sdX2 /var/cache/zoneminder/events ext4 defaults 0 2
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- Peter Howard <pjh@northern-ridge.com.au>, Sun, 16 Jan 2010 01:35:51 +1100
|
||||||
|
|
||||||
|
Access to /dev/video*
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
For cameras which require access to /dev/video*, zoneminder may need the
|
||||||
|
www-data user added to the video group in order to see those cameras:
|
||||||
|
|
||||||
|
adduser www-data video
|
||||||
|
|
||||||
|
Note that all web applications running on the zoneminder server will then have
|
||||||
|
access to all video devices on the system.
|
||||||
|
|
||||||
|
-- Vagrant Cascadian <vagrant@debian.org> Sun, 27 Mar 2011 13:06:56 -0700
|
|
@ -0,0 +1,9 @@
|
||||||
|
Alias /zm /usr/share/zoneminder
|
||||||
|
|
||||||
|
<Directory /usr/share/zoneminder>
|
||||||
|
php_flag register_globals off
|
||||||
|
Options Indexes FollowSymLinks
|
||||||
|
<IfModule mod_dir.c>
|
||||||
|
DirectoryIndex index.php
|
||||||
|
</IfModule>
|
||||||
|
</Directory>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,95 @@
|
||||||
|
zoneminder (1.28.1+1-trusty-SNAPSHOT2015061201) vivid; urgency=medium
|
||||||
|
|
||||||
|
* translation fixes
|
||||||
|
* Merge angular api
|
||||||
|
* now build using cmake
|
||||||
|
* use split up packaging
|
||||||
|
|
||||||
|
-- Isaac Connor <iconnor@connortechnology.com> Fri, 12 Jun 2015 11:22:36 -0400
|
||||||
|
|
||||||
|
zoneminder (1.28.1+1-trusty-SNAPSHOT2015030201) trusty; urgency=medium
|
||||||
|
|
||||||
|
* maybe fix for RTSP Basic Auth
|
||||||
|
* Also remove dependency on netpbm
|
||||||
|
|
||||||
|
-- Isaac Connor <iconnor@connortechnology.com> Mon, 02 Mar 2015 11:25:59 -0500
|
||||||
|
|
||||||
|
zoneminder (1.28.1+1-utopic-SNAPSHOT2015022301) utopic; urgency=medium
|
||||||
|
|
||||||
|
* Big merge of onvif support and some fixes.
|
||||||
|
|
||||||
|
-- Isaac Connor <iconnor@connortechnology.com> Mon, 23 Feb 2015 19:45:45 -0500
|
||||||
|
|
||||||
|
zoneminder (1.28.0+1-trusty-SNAPSHOT2015021201) trusty; urgency=medium
|
||||||
|
|
||||||
|
* add mysql-client-5.6 as a dependency instaed of mysql-client.
|
||||||
|
|
||||||
|
-- Isaac Connor <iconnor@connortechnology.com> Fri, 13 Feb 2015 09:35:13 -0500
|
||||||
|
|
||||||
|
zoneminder (1.28.0+1-trusty-SNAPSHOT2015011101) trusty; urgency=medium
|
||||||
|
|
||||||
|
* small changes
|
||||||
|
|
||||||
|
-- Isaac Connor <iconnor@connortechnology.com> Fri, 12 Dec 2014 16:38:36 -0500
|
||||||
|
|
||||||
|
zoneminder (1.28.0+1-utopic-SNAPSHOT2014112001) utopic; urgency=medium
|
||||||
|
|
||||||
|
* Various fixes and developments since 1.28.0. Includes Digest-Auth for HTTP and better for RTSP
|
||||||
|
|
||||||
|
-- Isaac Connor <iconnor@connortechnology.com> Thu, 20 Nov 2014 10:57:57 -0500
|
||||||
|
|
||||||
|
zoneminder (1.28.0-trusty) trusty; urgency=medium
|
||||||
|
|
||||||
|
* Release
|
||||||
|
|
||||||
|
-- Isaac Connor <iconnor@connortechnology.com> Fri, 17 Oct 2014 09:25:55 -0400
|
||||||
|
|
||||||
|
zoneminder (1.27.99+1-trusty-SNAPSHOT2014101401) trusty; urgency=medium
|
||||||
|
|
||||||
|
* Several PR merges in big push for 1.28.0
|
||||||
|
|
||||||
|
-- Isaac Connor <iconnor@connortechnology.com> Tue, 14 Oct 2014 09:28:29 -0400
|
||||||
|
|
||||||
|
zoneminder (1.27.99+1-trusty-SNAPSHOT2014092601) trusty; urgency=medium
|
||||||
|
|
||||||
|
* style updates and db fixes for database logging filters
|
||||||
|
|
||||||
|
-- Isaac Connor <iconnor@connortechnology.com> Fri, 26 Sep 2014 14:44:45 -0400
|
||||||
|
|
||||||
|
zoneminder (1.27.99+1-trusty-SNAPSHOT2014090801) trusty; urgency=medium
|
||||||
|
|
||||||
|
* several segfault fixes for local cameras
|
||||||
|
|
||||||
|
-- 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
|
|
@ -0,0 +1 @@
|
||||||
|
9
|
|
@ -0,0 +1,133 @@
|
||||||
|
Source: zoneminder
|
||||||
|
Section: net
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: Isaac Connor <iconnor@connortechnology.com>
|
||||||
|
Build-Depends: debhelper (>= 9), po-debconf (>= 1.0), autoconf, automake, libphp-serialization-perl, libgnutls-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev | libjpeg9-dev | libjpeg62-turbo-dev, libpcre3-dev, libavcodec-ffmpeg-dev, libavformat-ffmpeg-dev, libswscale-ffmpeg-dev, libavutil-ffmpeg-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, libavdevice-ffmpeg-dev, libdevice-serialport-perl, libarchive-zip-perl, libmime-lite-perl, dh-autoreconf, libvlccore-dev, libvlc-dev, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libgcrypt11-dev | libgcrypt20-dev, libpolkit-gobject-1-dev, libdbi-perl, libnet-sftp-foreign-perl, libexpect-perl, libmime-tools-perl, libx264-dev, libmp4v2-dev, libpcre3-dev
|
||||||
|
Standards-Version: 3.9.6
|
||||||
|
|
||||||
|
Package: zoneminder
|
||||||
|
Section: metapackages
|
||||||
|
Architecture: all
|
||||||
|
Depends: ${misc:Depends},
|
||||||
|
libzoneminder-perl (>= ${source:Version}),
|
||||||
|
zoneminder-database (>= ${source:Version}),
|
||||||
|
zoneminder-core (>= ${binary:Version}),
|
||||||
|
zoneminder-ui-base (>= ${source:Version}),
|
||||||
|
zoneminder-ui-classic (>= ${source:Version}),
|
||||||
|
zoneminder-ui-mobile (>= ${source:Version}),
|
||||||
|
zoneminder-ui-xml (>= ${source:Version})
|
||||||
|
Description: Video camera security and surveillance solution (metapackage)
|
||||||
|
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: libzoneminder-perl
|
||||||
|
Section: perl
|
||||||
|
Architecture: all
|
||||||
|
Depends: ${misc:Depends}, ${perl:Depends}, libdbi-perl,
|
||||||
|
libdevice-serialport-perl, libimage-info-perl, libjson-any-perl,
|
||||||
|
libsys-mmap-perl, liburi-encode-perl, libwww-perl
|
||||||
|
Description: Perl libraries for ZoneMinder
|
||||||
|
ZoneMinder is a video camera security and surveillance solution.
|
||||||
|
.
|
||||||
|
This package provides the libraries for the perl scripts, it can be used to
|
||||||
|
write custom interfaces as well.
|
||||||
|
|
||||||
|
Package: zoneminder-database
|
||||||
|
Section: database
|
||||||
|
Architecture: all
|
||||||
|
Depends: ${misc:Depends}, debconf, dbconfig-common,
|
||||||
|
mysql-client | mariadb-client
|
||||||
|
Recommends: mysql-server | mariadb-server
|
||||||
|
Description: Database management package for ZoneMinder
|
||||||
|
ZoneMinder is a video camera security and surveillance solution.
|
||||||
|
.
|
||||||
|
This package provides the sql files and maintenance scripts to perform all the
|
||||||
|
database operations (installation, upgrade or removal) on a local or a remote
|
||||||
|
server.
|
||||||
|
|
||||||
|
Package: zoneminder-core
|
||||||
|
Section: video
|
||||||
|
Architecture: any
|
||||||
|
Depends: libzoneminder-perl (= ${source:Version}),
|
||||||
|
zoneminder-database (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends},
|
||||||
|
${perl:Depends}, libarchive-tar-perl, libarchive-zip-perl, libdate-manip-perl,
|
||||||
|
libdbi-perl, libmodule-load-conditional-perl, libmime-lite-perl,
|
||||||
|
libmime-tools-perl, libnet-sftp-foreign-perl, libphp-serialization-perl,
|
||||||
|
debconf, ffmpeg | libav-tools, rsyslog | system-log-daemon, zip,
|
||||||
|
policykit-1, apache2, libmp4v2-2, libpcre++0
|
||||||
|
Description: Core binaries and perl scripts for ZoneMinder
|
||||||
|
ZoneMinder is a video camera security and surveillance solution.
|
||||||
|
.
|
||||||
|
This package provides the executable compiled binaries which do the main video
|
||||||
|
processing work and the perl scripts which perform helper and/or external
|
||||||
|
interface tasks.
|
||||||
|
|
||||||
|
Package: zoneminder-core-dbg
|
||||||
|
Priority: extra
|
||||||
|
Section: debug
|
||||||
|
Architecture: any
|
||||||
|
Depends: zoneminder-core (= ${binary:Version}), ${misc:Depends}
|
||||||
|
Description: Debugging symbols for ZoneMinder
|
||||||
|
ZoneMinder is a video camera security and surveillance solution.
|
||||||
|
.
|
||||||
|
This package provides the debugging symbols for the executable compiled
|
||||||
|
binaries.
|
||||||
|
|
||||||
|
Package: zoneminder-ui-base
|
||||||
|
Section: web
|
||||||
|
Architecture: any
|
||||||
|
Depends: zoneminder-core (= ${binary:Version}), ${shlibs:Depends},
|
||||||
|
${misc:Depends}, debconf, apache2, libapache2-mod-php5 | libapache2-mod-fcgid,
|
||||||
|
php5, php5-mysql | php5-mysqlnd
|
||||||
|
Description: Essential files for ZoneMinder's web user interface
|
||||||
|
ZoneMinder is a video camera security and surveillance solution.
|
||||||
|
.
|
||||||
|
This package provides the essential web files and maintenance scripts to set up
|
||||||
|
a basic web environment.
|
||||||
|
|
||||||
|
Package: zoneminder-ui-classic
|
||||||
|
Section: web
|
||||||
|
Architecture: all
|
||||||
|
Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends}
|
||||||
|
Description: Classic web user interface for ZoneMinder
|
||||||
|
ZoneMinder is a video camera security and surveillance solution.
|
||||||
|
.
|
||||||
|
This package provides the classic web user interface.
|
||||||
|
|
||||||
|
Package: zoneminder-ui-mobile
|
||||||
|
Section: web
|
||||||
|
Architecture: all
|
||||||
|
Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends}
|
||||||
|
Description: Mobile web user interface for ZoneMinder
|
||||||
|
ZoneMinder is a video camera security and surveillance solution.
|
||||||
|
.
|
||||||
|
This package provides the web user interface for mobile devices.
|
||||||
|
|
||||||
|
Package: zoneminder-ui-xml
|
||||||
|
Section: web
|
||||||
|
Architecture: all
|
||||||
|
Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends}
|
||||||
|
Description: XML interface for ZoneMinder
|
||||||
|
ZoneMinder is a video camera security and surveillance solution.
|
||||||
|
.
|
||||||
|
This package provides a XML interface mainly intended for use with the eyeZm
|
||||||
|
iPhone Application, but can be used with any other custom programs as well.
|
||||||
|
|
||||||
|
Package: zoneminder-ui-api
|
||||||
|
Section: web
|
||||||
|
Architecture: all
|
||||||
|
Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends}
|
||||||
|
Description: API interface for ZoneMinder
|
||||||
|
ZoneMinder is a video camera security and surveillance solution.
|
||||||
|
.
|
||||||
|
This package provides an API interface mainly intended for use with angular-ui
|
||||||
|
or mobile applications, but can be used with any other custom programs as well.
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
Copyright:
|
||||||
|
|
||||||
|
Copyright 2002 Philip Coombes <philip.coombes@zoneminder.com>
|
||||||
|
|
||||||
|
License:
|
||||||
|
|
||||||
|
This package is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
This package is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public
|
||||||
|
License along with this package; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
On Debian GNU/Linux systems, the text of the GPL can be found in
|
||||||
|
/usr/share/common-licenses/GPL.
|
|
@ -0,0 +1 @@
|
||||||
|
README.md
|
|
@ -0,0 +1,4 @@
|
||||||
|
usr/share/perl5/ZoneMinder
|
||||||
|
usr/share/perl5/ZoneMinder.pm
|
||||||
|
debian/tmp/usr/share/man/man3/ZoneMinder.3pm
|
||||||
|
debian/tmp/usr/share/man/man3/ZoneMinder::*
|
|
@ -0,0 +1,3 @@
|
||||||
|
[type: gettext/rfc822deb] zoneminder-core.templates
|
||||||
|
[type: gettext/rfc822deb] zoneminder-database.templates
|
||||||
|
[type: gettext/rfc822deb] zoneminder-ui-base.templates
|
|
@ -0,0 +1,252 @@
|
||||||
|
# debconf french translation file for ZoneMinder.
|
||||||
|
# Copyright (C) 2001-2008 Philip Coombes
|
||||||
|
# This file is distributed under the same license as the zoneminder package.
|
||||||
|
# First author: Emmanuel Papin <manupap01@gmail.com>, 2014.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: zoneminder\n"
|
||||||
|
"Report-Msgid-Bugs-To: zoneminder@packages.debian.org\n"
|
||||||
|
"POT-Creation-Date: 2014-12-16 12:34+0100\n"
|
||||||
|
"PO-Revision-Date: 2014-12-07 00:40+0100\n"
|
||||||
|
"Last-Translator: Emmanuel Papin <manupap01@gmail.com>\n"
|
||||||
|
"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
|
||||||
|
"Language: fr\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
|
#. Type: boolean
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-core.templates:1001
|
||||||
|
msgid "Delete this non empty directory?"
|
||||||
|
msgstr "Supprimer ce répertoire non vide ?"
|
||||||
|
|
||||||
|
#. Type: boolean
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-core.templates:1001
|
||||||
|
msgid ""
|
||||||
|
"A purge of the ZoneMinder package is performed but the directory '/var/cache/"
|
||||||
|
"zoneminder' is not empty so it will not be deleted."
|
||||||
|
msgstr ""
|
||||||
|
"Une purge du paquet ZoneMinder est en cours mais le répertoire '/var/cache/"
|
||||||
|
"zoneminder' n'est pas vide et sera donc conservé."
|
||||||
|
|
||||||
|
#. Type: boolean
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-core.templates:1001
|
||||||
|
msgid ""
|
||||||
|
"Please consider that this directory is designed to contain data resulting "
|
||||||
|
"from event detection. Therefore, \"proof of evidence\" could be lost!\""
|
||||||
|
msgstr ""
|
||||||
|
"Veuillez considérer que ce répertoire est conçu pour contenir des données "
|
||||||
|
"résultants de la détection d'événements. Par conséquent, des preuves "
|
||||||
|
"pourraient être perdues !"
|
||||||
|
|
||||||
|
#. Type: boolean
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-core.templates:1001
|
||||||
|
msgid ""
|
||||||
|
"If you are not sure of your decision, please do not delete this directory "
|
||||||
|
"but perform a manual checkup."
|
||||||
|
msgstr ""
|
||||||
|
"Si vous n'êtes pas sûr de votre décision, veuillez conserver ce répertoire "
|
||||||
|
"et effectuer une vérification manuelle."
|
||||||
|
|
||||||
|
#. Type: boolean
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-core.templates:2001
|
||||||
|
msgid "Deletion confirmed?"
|
||||||
|
msgstr "Supression confirmée ?"
|
||||||
|
|
||||||
|
#. Type: boolean
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-core.templates:2001
|
||||||
|
msgid ""
|
||||||
|
"You have allowed the deletion of directory '/var/cache/zoneminder' although "
|
||||||
|
"it may contain critical data."
|
||||||
|
msgstr ""
|
||||||
|
"Vous avez autorisé la suppression du répertoire '/var/cache/zoneminder' bien "
|
||||||
|
"qu'il puisse contenir des données critiques."
|
||||||
|
|
||||||
|
#. Type: select
|
||||||
|
#. Choices
|
||||||
|
#: ../zoneminder-database.templates:1001
|
||||||
|
msgid "local"
|
||||||
|
msgstr "local"
|
||||||
|
|
||||||
|
#. Type: select
|
||||||
|
#. Choices
|
||||||
|
#: ../zoneminder-database.templates:1001
|
||||||
|
msgid "remote"
|
||||||
|
msgstr "distant"
|
||||||
|
|
||||||
|
#. Type: select
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:1002
|
||||||
|
msgid "Database location:"
|
||||||
|
msgstr "Emplacement de la base de donnée :"
|
||||||
|
|
||||||
|
#. Type: select
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:1002
|
||||||
|
msgid ""
|
||||||
|
"A database server is required to run ZoneMinder. The database can be "
|
||||||
|
"installed either locally or remotely on a machine of your network."
|
||||||
|
msgstr ""
|
||||||
|
"Un serveur de base de données est requis pour ZoneMinder. La base de donnée "
|
||||||
|
"peut être installée localement ou à distance sur une machine de votre réseau."
|
||||||
|
|
||||||
|
#. Type: select
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:1002
|
||||||
|
msgid ""
|
||||||
|
"If you choose a remote location, you will have to select the 'tcp/ip' "
|
||||||
|
"connection method and enter the hostname or ip address of the remote machine "
|
||||||
|
"in the next configuration screens."
|
||||||
|
msgstr ""
|
||||||
|
"Si vous choisissez un emplacement distant, vous devrez sélectionner la "
|
||||||
|
"méthode de connexion 'tcp/ip' et entrer le nom réseau ou l'adresse ip de la "
|
||||||
|
"machine distante dans les écrans de configuration suivants."
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:2001
|
||||||
|
msgid "No local database server is available:"
|
||||||
|
msgstr "Aucun serveur local de base de données n'est disponible :"
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:2001
|
||||||
|
msgid ""
|
||||||
|
"Currently ZoneMinder supports mysql or mariadb database server but none of "
|
||||||
|
"them appears to be installed on this machine."
|
||||||
|
msgstr ""
|
||||||
|
"Actuellement ZoneMinder supporte les serveurs de base de données mysql et "
|
||||||
|
"mariadb mais aucun d'entre eux n'est installé sur cette machine."
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:2001
|
||||||
|
msgid ""
|
||||||
|
"In order to complete ZoneMinder's installation, after ending of this "
|
||||||
|
"assistant, please install a compatible database server and then restart the "
|
||||||
|
"assistant by invoking:"
|
||||||
|
msgstr ""
|
||||||
|
"Afin de compléter l'installation de ZoneMinder, après la fermeture de cet "
|
||||||
|
"assitant, veuillez installer un serveur de base de données compatible et "
|
||||||
|
"ensuite redémarrez l'assistant en invoquant :"
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:2001 ../zoneminder-database.templates:3001
|
||||||
|
msgid "$ sudo dpkg-reconfigure zoneminder"
|
||||||
|
msgstr "$ sudo dpkg-reconfigure zoneminder"
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:3001
|
||||||
|
msgid "Remote database servers are not allowed:"
|
||||||
|
msgstr "Les serveurs de base de données distants ne sont pas autorisés :"
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:3001
|
||||||
|
msgid ""
|
||||||
|
"The current configuration of dbconfig-common does not allow installation of "
|
||||||
|
"a database on remote servers."
|
||||||
|
msgstr ""
|
||||||
|
"La configuration actuelle de dbconfig-common ne permet pas l'installation de "
|
||||||
|
"bases de données sur des serveurs distants."
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:3001
|
||||||
|
msgid ""
|
||||||
|
"In order to reconfigure dbconfig-common, please invoke the following command "
|
||||||
|
"after ending of this assistant:"
|
||||||
|
msgstr ""
|
||||||
|
"Afin de reconfigurer dbconfig-common, veuillez invoquer la commande suivante "
|
||||||
|
"après la fermeture de cet assitant :"
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:3001
|
||||||
|
msgid "$ sudo dpkg-reconfigure dbconfig-common"
|
||||||
|
msgstr "$ sudo dpkg-reconfigure dbconfig-common"
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:3001
|
||||||
|
msgid ""
|
||||||
|
"Then, to complete ZoneMinder's installation, please restart this assistant "
|
||||||
|
"by invoking:"
|
||||||
|
msgstr ""
|
||||||
|
"Ensuite, pour compléter l'installation de ZoneMinder, veuillez redémarrer "
|
||||||
|
"cet assistant en invoquant :"
|
||||||
|
|
||||||
|
#. Type: password
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:4001
|
||||||
|
msgid "New password for the ZoneMinder 'admin' user:"
|
||||||
|
msgstr "Nouveau mot de passe pour le compte 'admin' de ZoneMinder :"
|
||||||
|
|
||||||
|
#. Type: password
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:4001
|
||||||
|
msgid "Please enter the password of the default administrative user."
|
||||||
|
msgstr "Veuillez entrer le mot de passe du compte administrateur par défaut."
|
||||||
|
|
||||||
|
#. Type: password
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:4001
|
||||||
|
msgid ""
|
||||||
|
"While not mandatory, it is highly recommended that you set a custom password "
|
||||||
|
"for the administrative 'admin' user."
|
||||||
|
msgstr ""
|
||||||
|
"Bien que cela ne soit pas obligatoire, il est fortement recommandé de "
|
||||||
|
"fournir un mot de passe personnalisé pour le compte administrateur 'admin'."
|
||||||
|
|
||||||
|
#. Type: password
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:4001
|
||||||
|
msgid "If this field is left blank, the password will not be changed."
|
||||||
|
msgstr "Si le champ est laissé vide, le mot de passe ne sera pas changé."
|
||||||
|
|
||||||
|
#. Type: password
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:5001
|
||||||
|
msgid "Repeat password for the ZoneMinder 'admin' user:"
|
||||||
|
msgstr "Répéter le mot de passe pour le compte 'admin' de ZoneMinder :"
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:6001
|
||||||
|
msgid "Password input error"
|
||||||
|
msgstr "Erreur de mot de passe"
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:6001
|
||||||
|
msgid "The two passwords you entered were not the same. Please try again."
|
||||||
|
msgstr ""
|
||||||
|
"Les deux mots de passe saisis ne sont pas les mêmes. Veuillez essayer à "
|
||||||
|
"nouveau."
|
||||||
|
|
||||||
|
#. Type: multiselect
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-ui-base.templates:1001
|
||||||
|
msgid "Web server to reconfigure automatically:"
|
||||||
|
msgstr "Serveur web à reconfigurer automatiquement :"
|
||||||
|
|
||||||
|
#. Type: multiselect
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-ui-base.templates:1001
|
||||||
|
msgid ""
|
||||||
|
"Please choose the web server that should be automatically configured for "
|
||||||
|
"ZoneMinder's web portal access."
|
||||||
|
msgstr ""
|
||||||
|
"Veuillez choisir le serveur web à reconfigurer automatiquement pour l'accès "
|
||||||
|
"au portail web de ZoneMinder."
|
|
@ -0,0 +1,222 @@
|
||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||||
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
#, fuzzy
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: zoneminder\n"
|
||||||
|
"Report-Msgid-Bugs-To: zoneminder@packages.debian.org\n"
|
||||||
|
"POT-Creation-Date: 2014-12-16 12:34+0100\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
"Language: \n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=CHARSET\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
|
#. Type: boolean
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-core.templates:1001
|
||||||
|
msgid "Delete this non empty directory?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: boolean
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-core.templates:1001
|
||||||
|
msgid ""
|
||||||
|
"A purge of the ZoneMinder package is performed but the directory '/var/cache/"
|
||||||
|
"zoneminder' is not empty so it will not be deleted."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: boolean
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-core.templates:1001
|
||||||
|
msgid ""
|
||||||
|
"Please consider that this directory is designed to contain data resulting "
|
||||||
|
"from event detection. Therefore, \"proof of evidence\" could be lost!\""
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: boolean
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-core.templates:1001
|
||||||
|
msgid ""
|
||||||
|
"If you are not sure of your decision, please do not delete this directory "
|
||||||
|
"but perform a manual checkup."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: boolean
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-core.templates:2001
|
||||||
|
msgid "Deletion confirmed?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: boolean
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-core.templates:2001
|
||||||
|
msgid ""
|
||||||
|
"You have allowed the deletion of directory '/var/cache/zoneminder' although "
|
||||||
|
"it may contain critical data."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: select
|
||||||
|
#. Choices
|
||||||
|
#: ../zoneminder-database.templates:1001
|
||||||
|
msgid "local"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: select
|
||||||
|
#. Choices
|
||||||
|
#: ../zoneminder-database.templates:1001
|
||||||
|
msgid "remote"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: select
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:1002
|
||||||
|
msgid "Database location:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: select
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:1002
|
||||||
|
msgid ""
|
||||||
|
"A database server is required to run ZoneMinder. The database can be "
|
||||||
|
"installed either locally or remotely on a machine of your network."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: select
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:1002
|
||||||
|
msgid ""
|
||||||
|
"If you choose a remote location, you will have to select the 'tcp/ip' "
|
||||||
|
"connection method and enter the hostname or ip address of the remote machine "
|
||||||
|
"in the next configuration screens."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:2001
|
||||||
|
msgid "No local database server is available:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:2001
|
||||||
|
msgid ""
|
||||||
|
"Currently ZoneMinder supports mysql or mariadb database server but none of "
|
||||||
|
"them appears to be installed on this machine."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:2001
|
||||||
|
msgid ""
|
||||||
|
"In order to complete ZoneMinder's installation, after ending of this "
|
||||||
|
"assistant, please install a compatible database server and then restart the "
|
||||||
|
"assistant by invoking:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:2001 ../zoneminder-database.templates:3001
|
||||||
|
msgid "$ sudo dpkg-reconfigure zoneminder"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:3001
|
||||||
|
msgid "Remote database servers are not allowed:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:3001
|
||||||
|
msgid ""
|
||||||
|
"The current configuration of dbconfig-common does not allow installation of "
|
||||||
|
"a database on remote servers."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:3001
|
||||||
|
msgid ""
|
||||||
|
"In order to reconfigure dbconfig-common, please invoke the following command "
|
||||||
|
"after ending of this assistant:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:3001
|
||||||
|
msgid "$ sudo dpkg-reconfigure dbconfig-common"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:3001
|
||||||
|
msgid ""
|
||||||
|
"Then, to complete ZoneMinder's installation, please restart this assistant "
|
||||||
|
"by invoking:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: password
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:4001
|
||||||
|
msgid "New password for the ZoneMinder 'admin' user:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: password
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:4001
|
||||||
|
msgid "Please enter the password of the default administrative user."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: password
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:4001
|
||||||
|
msgid ""
|
||||||
|
"While not mandatory, it is highly recommended that you set a custom password "
|
||||||
|
"for the administrative 'admin' user."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: password
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:4001
|
||||||
|
msgid "If this field is left blank, the password will not be changed."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: password
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:5001
|
||||||
|
msgid "Repeat password for the ZoneMinder 'admin' user:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:6001
|
||||||
|
msgid "Password input error"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: error
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-database.templates:6001
|
||||||
|
msgid "The two passwords you entered were not the same. Please try again."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: multiselect
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-ui-base.templates:1001
|
||||||
|
msgid "Web server to reconfigure automatically:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Type: multiselect
|
||||||
|
#. Description
|
||||||
|
#: ../zoneminder-ui-base.templates:1001
|
||||||
|
msgid ""
|
||||||
|
"Please choose the web server that should be automatically configured for "
|
||||||
|
"ZoneMinder's web portal access."
|
||||||
|
msgstr ""
|
|
@ -0,0 +1,164 @@
|
||||||
|
#!/usr/bin/make -f
|
||||||
|
# -*- makefile -*-
|
||||||
|
# Sample debian/rules that uses debhelper.
|
||||||
|
# This file was originally written by Joey Hess and Craig Small.
|
||||||
|
# As a special exception, when this file is copied by dh-make into a
|
||||||
|
# dh-make output file, you may use that output file without restriction.
|
||||||
|
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
||||||
|
|
||||||
|
# Uncomment this to turn on verbose mode.
|
||||||
|
#export DH_VERBOSE=1
|
||||||
|
|
||||||
|
# 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)
|
||||||
|
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||||
|
|
||||||
|
CFLAGS = -Wall
|
||||||
|
CPPFLAGS = -D__STDC_CONSTANT_MACROS
|
||||||
|
CXXFLAGS = -DHAVE_LIBCRYPTO
|
||||||
|
|
||||||
|
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
|
||||||
|
DEBOPT = --enable-debug
|
||||||
|
CFLAGS += -g
|
||||||
|
CXXFLAGS += -g
|
||||||
|
else
|
||||||
|
DEBOPT =
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
||||||
|
CFLAGS += -O0
|
||||||
|
else
|
||||||
|
CFLAGS += -O2
|
||||||
|
endif
|
||||||
|
|
||||||
|
INSTDIR = debian/tmp
|
||||||
|
|
||||||
|
# These are used to get the most recent version of the original sources from github
|
||||||
|
UURL = $(shell git config --get remote.origin.url)
|
||||||
|
BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
|
||||||
|
HEAD = $(shell git rev-parse HEAD)
|
||||||
|
PKD = $(abspath $(dir $(MAKEFILE_LIST)))
|
||||||
|
PKG = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
|
||||||
|
VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-|\+nmu\d+.*)};')
|
||||||
|
DTYPE =
|
||||||
|
TARBALL = ../$(PKG)_$(VER)$(DTYPE).orig.tar.xz
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@ --buildsystem=cmake --parallel
|
||||||
|
|
||||||
|
override_dh_auto_configure:
|
||||||
|
CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" dh_auto_configure -- \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||||
|
-DCMAKE_SKIP_RPATH=ON \
|
||||||
|
-DCMAKE_VERBOSE_MAKEFILE=OFF \
|
||||||
|
-DCMAKE_COLOR_MAKEFILE=ON \
|
||||||
|
-DZM_RUNDIR=/var/run/zm \
|
||||||
|
-DZM_SOCKDIR=/var/run/zm \
|
||||||
|
-DZM_TMPDIR=/var/tmp/zm \
|
||||||
|
-DZM_LOGDIR=/var/log/zm \
|
||||||
|
-DZM_WEBDIR=/usr/share/zoneminder \
|
||||||
|
-DZM_CONTENTDIR=/var/cache/zoneminder \
|
||||||
|
-DZM_CGIDIR=/usr/lib/cgi-bin \
|
||||||
|
-DZM_WEB_USER=www-data \
|
||||||
|
-DZM_WEB_GROUP=www-data \
|
||||||
|
-DCMAKE_INSTALL_SYSCONFDIR=etc/zm
|
||||||
|
|
||||||
|
override_dh_auto_test:
|
||||||
|
# do not run tests...
|
||||||
|
|
||||||
|
|
||||||
|
override_dh_clean:
|
||||||
|
# Add here commands to clean up after the build process.
|
||||||
|
[ ! -f Makefile ] || $(MAKE) distclean
|
||||||
|
dh_clean src/zm_config_defines.h
|
||||||
|
#
|
||||||
|
# Delete remaining auto-generated Makefile if Makefile.in exists
|
||||||
|
find $(CURDIR)/ -type f -name "Makefile" | while read file; do \
|
||||||
|
[ -f $$file.in ] && rm -f $$file; \
|
||||||
|
done || true
|
||||||
|
#
|
||||||
|
# Delete remaining auto-generated Makefile.in if Makefile.am exists
|
||||||
|
find $(CURDIR)/ -type f -name "Makefile.in" | while read filein; do \
|
||||||
|
fileam=`echo $$filein | sed 's/\(.*\)\.in/\1\.am/'`; \
|
||||||
|
[ -f $$fileam ] && rm -f $$filein; \
|
||||||
|
done || true
|
||||||
|
|
||||||
|
override_dh_install:
|
||||||
|
dh_install --fail-missing
|
||||||
|
#
|
||||||
|
# NOTE: This is a short-term kludge; hopefully changes in the next
|
||||||
|
# upstream version will render this unnecessary.
|
||||||
|
rm -rf debian/zoneminder/usr/share/zoneminder/events
|
||||||
|
rm -rf debian/zoneminder/usr/share/zoneminder/images
|
||||||
|
rm -rf debian/zoneminder/usr/share/zoneminder/temp
|
||||||
|
# The link stuff for these folders has been moved to
|
||||||
|
# zoneminder-core.links file
|
||||||
|
#
|
||||||
|
# This is a slightly lesser kludge; moving the cgi stuff to
|
||||||
|
# /usr/share/zoneminder/cgi-bin breaks one set of behavior,
|
||||||
|
# having it just in /usr/lib/cgi-bin breaks another bit of
|
||||||
|
# behavior.
|
||||||
|
# The link stuff for /usr/share/zoneminder/cgi-bin has been moved to
|
||||||
|
# zoneminder-ui-base.links file
|
||||||
|
|
||||||
|
override_dh_installinit:
|
||||||
|
dh_installinit --package=zoneminder-core --name=zoneminder
|
||||||
|
|
||||||
|
override_dh_systemd_start:
|
||||||
|
dh_systemd_start --package=zoneminder-core --name=zoneminder \
|
||||||
|
--restart-after-upgrade
|
||||||
|
|
||||||
|
override_dh_systemd_enable:
|
||||||
|
dh_systemd_enable --package=zoneminder-core --name=zoneminder
|
||||||
|
|
||||||
|
override_dh_fixperms:
|
||||||
|
dh_fixperms
|
||||||
|
#
|
||||||
|
# As requested by the Debian Webapps Policy Manual §3.2.1
|
||||||
|
chown root:www-data debian/zoneminder-core/etc/zm/zm.conf
|
||||||
|
chmod 640 debian/zoneminder-core/etc/zm/zm.conf
|
||||||
|
|
||||||
|
.PHONY: override_dh_strip
|
||||||
|
override_dh_strip:
|
||||||
|
dh_strip --dbg-package=zoneminder-core-dbg
|
||||||
|
|
||||||
|
# Inspired by https://wiki.debian.org/onlyjob/get-orig-source
|
||||||
|
.PHONY: get-orig-source
|
||||||
|
get-orig-source: $(TARBALL) $(info I: $(PKG)_$(VER)$(DTYPE))
|
||||||
|
@
|
||||||
|
|
||||||
|
$(TARBALL):
|
||||||
|
$(if $(wildcard $(PKG)-$(VER)),$(error folder '$(PKG)-$(VER)' exists, aborting...))
|
||||||
|
@echo "# Cloning origin repository..."; \
|
||||||
|
if ! git clone $(UURL) $(PKG)-$(VER); then \
|
||||||
|
$(RM) -r $(PKG)-$(VER); \
|
||||||
|
echo "failed to clone repository, aborting..."; \
|
||||||
|
false; \
|
||||||
|
fi
|
||||||
|
@if [ $(BRANCH) != "master" ]; then \
|
||||||
|
cd $(PKG)-$(VER); \
|
||||||
|
echo "# Not on master branch, fetching origin branch '$(BRANCH)'..."; \
|
||||||
|
git fetch origin $(BRANCH):$(BRANCH) || false; \
|
||||||
|
echo "# Switching to branch '$(BRANCH)'..."; \
|
||||||
|
git checkout $(BRANCH) || false; \
|
||||||
|
fi
|
||||||
|
@echo "# Checking local source..."
|
||||||
|
@if [ $$(cd $(PKG)-$(VER) && git rev-parse HEAD) = $(HEAD) ]; then \
|
||||||
|
echo "even with origin, ok"; \
|
||||||
|
true; \
|
||||||
|
else \
|
||||||
|
echo "not even with origin, aborting..."; \
|
||||||
|
false; \
|
||||||
|
fi
|
||||||
|
@echo "# Setting times..."
|
||||||
|
@cd $(PKG)-$(VER) \
|
||||||
|
&& for F in $$(git ls-tree -r --name-only HEAD | sed -e "s/\s/\*/g"); do \
|
||||||
|
touch --no-dereference -d "$$(git log -1 --format="%ai" -- $$F)" "$$F"; \
|
||||||
|
done
|
||||||
|
@echo "# Cleaning-up..."
|
||||||
|
cd $(PKG)-$(VER) && $(RM) -r .git
|
||||||
|
@echo "# Packing file '$(TARBALL)'..."
|
||||||
|
@find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \
|
||||||
|
| XZ_OPT="-6v" tar -caf "$(TARBALL)" -T- --owner=root --group=root --mode=a+rX \
|
||||||
|
&& $(RM) -r "$(PKG)-$(VER)"
|
|
@ -0,0 +1 @@
|
||||||
|
3.0 (native)
|
|
@ -0,0 +1 @@
|
||||||
|
extend-diff-ignore = "(^|/)(config\.sub|config\.guess|Makefile|aclocal.m4|compile|config.h.in|configure|depcomp|install-sh|missing)$"
|
|
@ -0,0 +1,11 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# config maintainer script for zoneminder-core package
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Source the debconf stuff
|
||||||
|
. /usr/share/debconf/confmodule
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,4 @@
|
||||||
|
var/log/zm
|
||||||
|
var/cache/zoneminder/events
|
||||||
|
var/cache/zoneminder/images
|
||||||
|
var/cache/zoneminder/temp
|
|
@ -0,0 +1,4 @@
|
||||||
|
etc/zm
|
||||||
|
usr/bin
|
||||||
|
usr/share/polkit-1/actions
|
||||||
|
usr/share/polkit-1/rules.d
|
|
@ -0,0 +1,3 @@
|
||||||
|
var/cache/zoneminder/events usr/share/zoneminder/events
|
||||||
|
var/cache/zoneminder/images usr/share/zoneminder/images
|
||||||
|
var/cache/zoneminder/temp usr/share/zoneminder/temp
|
|
@ -0,0 +1,80 @@
|
||||||
|
#! /bin/sh
|
||||||
|
# postinst maintainer script for zoneminder-core package
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Source the debconf stuff
|
||||||
|
. /usr/share/debconf/confmodule
|
||||||
|
|
||||||
|
# Source the config file
|
||||||
|
CONFIGFILE=/etc/zm/zm.conf
|
||||||
|
. $CONFIGFILE
|
||||||
|
|
||||||
|
# Do this when the package is installed, upgraded or reconfigured
|
||||||
|
if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then
|
||||||
|
|
||||||
|
# Retrieve data from dbconfig (inputs from user)
|
||||||
|
. /etc/dbconfig-common/zoneminder.conf
|
||||||
|
|
||||||
|
# ZoneMinder config file handling
|
||||||
|
# Inspired by: http://manpages.debian.org/cgi-bin/man.cgi?query=debconf-devel&sektion=7
|
||||||
|
|
||||||
|
# Backup the config file
|
||||||
|
cp -a -f $CONFIGFILE ${CONFIGFILE}.postinst.bak
|
||||||
|
|
||||||
|
# Redeclare variables if missing in config file
|
||||||
|
test -z $dbc_dbserver || grep -Eq "^ *ZM_DB_HOST=" $CONFIGFILE \
|
||||||
|
|| echo "ZM_DB_HOST=" >> ${CONFIGFILE}.postinst.bak
|
||||||
|
test -z $dbc_dbname || grep -Eq "^ *ZM_DB_NAME=" $CONFIGFILE \
|
||||||
|
|| echo "ZM_DB_NAME=" >> ${CONFIGFILE}.postinst.bak
|
||||||
|
test -z $dbc_dbuser || grep -Eq "^ *ZM_DB_USER=" $CONFIGFILE \
|
||||||
|
|| echo "ZM_DB_USER=" >> ${CONFIGFILE}.postinst.bak
|
||||||
|
test -z $dbc_dbpass || grep -Eq "^ *ZM_DB_PASS=" $CONFIGFILE \
|
||||||
|
|| echo "ZM_DB_PASS=" >> ${CONFIGFILE}.postinst.bak
|
||||||
|
|
||||||
|
# Prevent ZM_DB_HOST to be empty if user selected the 'unix socket' method
|
||||||
|
if test -z $dbc_dbserver; then
|
||||||
|
dbc_dbserver_override="localhost"
|
||||||
|
else
|
||||||
|
dbc_dbserver_override=$dbc_dbserver
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update variables in config file
|
||||||
|
sed -i "s/^ *ZM_DB_HOST=.*/ZM_DB_HOST=$dbc_dbserver_override/" \
|
||||||
|
${CONFIGFILE}.postinst.bak
|
||||||
|
test -z $dbc_dbname || sed -i "s/^ *ZM_DB_NAME=.*/ZM_DB_NAME=$dbc_dbname/" \
|
||||||
|
${CONFIGFILE}.postinst.bak
|
||||||
|
test -z $dbc_dbuser || sed -i "s/^ *ZM_DB_USER=.*/ZM_DB_USER=$dbc_dbuser/" \
|
||||||
|
${CONFIGFILE}.postinst.bak
|
||||||
|
test -z $dbc_dbpass || sed -i "s/^ *ZM_DB_PASS=.*/ZM_DB_PASS=$dbc_dbpass/" \
|
||||||
|
${CONFIGFILE}.postinst.bak
|
||||||
|
|
||||||
|
# Clean-up backup file
|
||||||
|
mv -f ${CONFIGFILE}.postinst.bak $CONFIGFILE
|
||||||
|
|
||||||
|
|
||||||
|
# Set some file permissions
|
||||||
|
chown $ZM_WEB_USER:$ZM_WEB_GROUP /var/log/zm
|
||||||
|
if [ -z "$2" ]; then
|
||||||
|
chown $ZM_WEB_USER:$ZM_WEB_GROUP -R /var/cache/zoneminder
|
||||||
|
fi
|
||||||
|
# As requested by the Debian Webapps Policy Manual §3.2.1
|
||||||
|
chown root:${ZM_WEB_GROUP} $CONFIGFILE
|
||||||
|
chmod 640 $CONFIGFILE
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Do this every time the package is installed or upgraded
|
||||||
|
# Test for database presence to avoid failure of zmupdate.pl
|
||||||
|
if [ "$dbc_install" = "true" ] && [ "$1" = "configure" ]; then
|
||||||
|
|
||||||
|
# Ensure zoneminder is stopped
|
||||||
|
deb-systemd-invoke stop zoneminder.service || exit $?
|
||||||
|
|
||||||
|
# Run the ZoneMinder update tool
|
||||||
|
zmupdate.pl --nointeractive
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,15 @@
|
||||||
|
# Automatically added by dh_installinit
|
||||||
|
# In case this system is running systemd, we need to ensure that all
|
||||||
|
# necessary tmpfiles (if any) are created before starting.
|
||||||
|
if [ -d /run/systemd/system ] ; then
|
||||||
|
systemd-tmpfiles --create /usr/lib/tmpfiles.d/zoneminder.conf >/dev/null || true
|
||||||
|
fi
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installinit
|
||||||
|
if [ -x "/etc/init.d/zoneminder" ]; then
|
||||||
|
update-rc.d zoneminder defaults >/dev/null
|
||||||
|
fi
|
||||||
|
if [ -x "/etc/init.d/zoneminder" ] || [ -e "/etc/init/zoneminder.conf" ]; then
|
||||||
|
invoke-rc.d zoneminder start || exit $?
|
||||||
|
fi
|
||||||
|
# End automatically added section
|
|
@ -0,0 +1,37 @@
|
||||||
|
#! /bin/sh
|
||||||
|
# postrm maintainer script for zoneminder-core package
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Source the debconf stuff
|
||||||
|
if [ -f /usr/share/debconf/confmodule ]; then
|
||||||
|
. /usr/share/debconf/confmodule
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "purge" ]; then
|
||||||
|
|
||||||
|
# Ask the user if we have to remove the cache directory even if not empty
|
||||||
|
if [ -d /var/cache/zoneminder ] \
|
||||||
|
&& [ ! $(find /var/cache/zoneminder -maxdepth 0 -type d -empty 2>/dev/null) ]; then
|
||||||
|
RET=""
|
||||||
|
db_input high zoneminder/ask_delete || true
|
||||||
|
db_go || true
|
||||||
|
db_get zoneminder/ask_delete
|
||||||
|
if [ "$RET" = "true" ]; then
|
||||||
|
RET=""
|
||||||
|
db_input high zoneminder/ask_delete_again || true
|
||||||
|
db_go || true
|
||||||
|
db_get zoneminder/ask_delete_again
|
||||||
|
if [ "$RET" = "true" ]; then
|
||||||
|
rm -rf /var/cache/zoneminder
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
# postrm rm may freeze without that
|
||||||
|
db_stop
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Automatically added by dh_installinit
|
||||||
|
if [ "$1" = "purge" ] ; then
|
||||||
|
update-rc.d zoneminder remove >/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# In case this system is running systemd, we make systemd reload the unit files
|
||||||
|
# to pick up changes.
|
||||||
|
if [ -d /run/systemd/system ] ; then
|
||||||
|
systemctl --system daemon-reload >/dev/null || true
|
||||||
|
fi
|
||||||
|
# End automatically added section
|
||||||
|
# Automatically added by dh_installdebconf
|
||||||
|
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
|
||||||
|
. /usr/share/debconf/confmodule
|
||||||
|
db_purge
|
||||||
|
fi
|
||||||
|
# End automatically added section
|
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# preinst maintainer script for zoneminder-core package
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
abort=false
|
||||||
|
if [ -L /usr/share/zoneminder/events ]; then
|
||||||
|
l=$(readlink /usr/share/zoneminder/events)
|
||||||
|
if [ "$l" != "/var/cache/zoneminder/events" ]; then
|
||||||
|
abort=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -L /usr/share/zoneminder/images ]; then
|
||||||
|
l=$(readlink /usr/share/zoneminder/images )
|
||||||
|
if [ "$l" != "/var/cache/zoneminder/images" ]; then
|
||||||
|
abort=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$abort" = "true" ]; then
|
||||||
|
cat >&2 << EOF
|
||||||
|
Aborting installation of zoneminder due to non-default symlinks in
|
||||||
|
/usr/share/zoneminder for the images and/or events directory, which could
|
||||||
|
result in loss of data. Please move your data in each of these directories to
|
||||||
|
/var/cache/zoneminder before installing zoneminder from the package.
|
||||||
|
EOF
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Automatically added by dh_installinit
|
||||||
|
if [ -x "/etc/init.d/zoneminder" ] || [ -e "/etc/init/zoneminder.conf" ]; then
|
||||||
|
invoke-rc.d zoneminder stop || exit $?
|
||||||
|
fi
|
||||||
|
# End automatically added section
|
|
@ -0,0 +1,19 @@
|
||||||
|
Template: zoneminder/ask_delete
|
||||||
|
Type: boolean
|
||||||
|
Default: false
|
||||||
|
_Description: Delete this non empty directory?
|
||||||
|
A purge of the ZoneMinder package is performed but the directory
|
||||||
|
'/var/cache/zoneminder' is not empty so it will not be deleted.
|
||||||
|
.
|
||||||
|
Please consider that this directory is designed to contain data resulting from
|
||||||
|
event detection. Therefore, "proof of evidence" could be lost!"
|
||||||
|
.
|
||||||
|
If you are not sure of your decision, please do not delete this directory but
|
||||||
|
perform a manual checkup.
|
||||||
|
|
||||||
|
Template: zoneminder/ask_delete_again
|
||||||
|
Type: boolean
|
||||||
|
Default: false
|
||||||
|
_Description: Deletion confirmed?
|
||||||
|
You have allowed the deletion of directory '/var/cache/zoneminder' although
|
||||||
|
it may contain critical data.
|
|
@ -0,0 +1,90 @@
|
||||||
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: zoneminder
|
||||||
|
# Required-Start: $network $remote_fs $syslog
|
||||||
|
# Required-Stop: $network $remote_fs $syslog
|
||||||
|
# Should-Start: mysql
|
||||||
|
# Should-Stop: mysql
|
||||||
|
# Default-Start: 2 3 4 5
|
||||||
|
# Default-Stop: 0 1 6
|
||||||
|
# Short-Description: Control ZoneMinder as a Service
|
||||||
|
### END INIT INFO
|
||||||
|
# description: Control ZoneMinder as a Service
|
||||||
|
# chkconfig: 2345 20 20
|
||||||
|
|
||||||
|
# Source function library.
|
||||||
|
#. /etc/rc.d/init.d/functions
|
||||||
|
|
||||||
|
prog=ZoneMinder
|
||||||
|
ZM_PATH_BIN="/usr/bin"
|
||||||
|
RUNDIR=/var/run/zm
|
||||||
|
TMPDIR=/tmp/zm
|
||||||
|
command="$ZM_PATH_BIN/zmpkg.pl"
|
||||||
|
|
||||||
|
start() {
|
||||||
|
echo -n "Starting $prog: "
|
||||||
|
mkdir -p $RUNDIR && chown www-data:www-data $RUNDIR
|
||||||
|
mkdir -p $TMPDIR && chown www-data:www-data $TMPDIR
|
||||||
|
$command start
|
||||||
|
RETVAL=$?
|
||||||
|
[ $RETVAL = 0 ] && echo success
|
||||||
|
[ $RETVAL != 0 ] && echo failure
|
||||||
|
echo
|
||||||
|
[ $RETVAL = 0 ] && touch /var/lock/zm
|
||||||
|
return $RETVAL
|
||||||
|
}
|
||||||
|
stop() {
|
||||||
|
echo -n "Stopping $prog: "
|
||||||
|
#
|
||||||
|
# Why is this status check being done?
|
||||||
|
# as $command stop returns 1 if zoneminder
|
||||||
|
# is stopped, which will result in
|
||||||
|
# this returning 1, which will stuff
|
||||||
|
# dpkg when it tries to stop zoneminder before
|
||||||
|
# uninstalling . . .
|
||||||
|
#
|
||||||
|
result=`$command status`
|
||||||
|
if [ ! "$result" = "running" ]; then
|
||||||
|
echo "Zoneminder already stopped"
|
||||||
|
echo
|
||||||
|
RETVAL=0
|
||||||
|
else
|
||||||
|
$command stop
|
||||||
|
RETVAL=$?
|
||||||
|
[ $RETVAL = 0 ] && echo success
|
||||||
|
[ $RETVAL != 0 ] && echo failure
|
||||||
|
echo
|
||||||
|
[ $RETVAL = 0 ] && rm -f /var/lock/zm
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
status() {
|
||||||
|
result=`$command status`
|
||||||
|
if [ "$result" = "running" ]; then
|
||||||
|
echo "ZoneMinder is running"
|
||||||
|
RETVAL=0
|
||||||
|
else
|
||||||
|
echo "ZoneMinder is stopped"
|
||||||
|
RETVAL=1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
'start')
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
'stop')
|
||||||
|
stop
|
||||||
|
;;
|
||||||
|
'restart' | 'force-reload')
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
;;
|
||||||
|
'status')
|
||||||
|
status
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 { start | stop | restart | status }"
|
||||||
|
RETVAL=1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
exit $RETVAL
|
|
@ -0,0 +1,19 @@
|
||||||
|
# ZoneMinder systemd unit file
|
||||||
|
# This file is intended to work with debian distributions
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=ZoneMinder CCTV recording and security system
|
||||||
|
After=network.target mysql.service apache2.service
|
||||||
|
Requires=apache2.service
|
||||||
|
Wants=mysql.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=www-data
|
||||||
|
Type=forking
|
||||||
|
ExecStart=/usr/bin/zmpkg.pl start
|
||||||
|
ExecReload=/usr/bin/zmpkg.pl restart
|
||||||
|
ExecStop=/usr/bin/zmpkg.pl stop
|
||||||
|
PIDFile=/var/run/zm/zm.pid
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1 @@
|
||||||
|
d /var/run/zm 0755 www-data www-data
|
|
@ -0,0 +1,142 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# config maintainer script for zoneminder
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Source the debconf stuff
|
||||||
|
. /usr/share/debconf/confmodule
|
||||||
|
|
||||||
|
# Set the first version in which dbconfig-common was introduced in the package
|
||||||
|
dbc_first_version="1.28.0"
|
||||||
|
|
||||||
|
CONFIGFILE=/etc/zm/zm.conf
|
||||||
|
if [ -e $CONFIGFILE ]; then
|
||||||
|
# Source the config file if exists
|
||||||
|
. $CONFIGFILE
|
||||||
|
elif [ -e ${CONFIGFILE}.dpkg-new ]; then
|
||||||
|
# If no config file, source the config file which is going to be installed
|
||||||
|
# by the core package
|
||||||
|
. ${CONFIGFILE}.dpkg-new
|
||||||
|
else
|
||||||
|
# If no config file is going to be installed, set some default values
|
||||||
|
ZM_DB_HOST=
|
||||||
|
ZM_DB_NAME="zm"
|
||||||
|
ZM_DB_USER="zmuser"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set some variables for the dbconfig-common stuff
|
||||||
|
dbc_dbserver="$ZM_DB_HOST"
|
||||||
|
dbc_dbname="$ZM_DB_NAME"
|
||||||
|
dbc_dbuser="$ZM_DB_USER"
|
||||||
|
|
||||||
|
if [ -f /usr/share/dbconfig-common/dpkg/config ]; then
|
||||||
|
|
||||||
|
# Default use dbconfig-common
|
||||||
|
dbc_install="true"
|
||||||
|
|
||||||
|
# Currently we only support mysql database
|
||||||
|
dbc_dbtypes="mysql"
|
||||||
|
|
||||||
|
# Set authentication method to password
|
||||||
|
dbc_authmethod_user="password"
|
||||||
|
|
||||||
|
# Source the dbconfig-common stuff
|
||||||
|
. /usr/share/dbconfig-common/dpkg/config
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Do this when the package is installed, upgraded or reconfigured
|
||||||
|
# Most of answers are cached so the questions will not be asked again
|
||||||
|
if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then
|
||||||
|
|
||||||
|
# Ask the user if the database shall be installed locally or remotely
|
||||||
|
db_input high zoneminder/debconf_dblocation || true
|
||||||
|
db_go || true
|
||||||
|
db_get zoneminder/debconf_dblocation
|
||||||
|
|
||||||
|
if [ "$RET" = "local" ]; then
|
||||||
|
if [ ! -e "/usr/sbin/mysqld" ]; then
|
||||||
|
# Display a message and exit if the user want a local database but
|
||||||
|
# no database server is available
|
||||||
|
db_input high zoneminder/debconf_dblocalmissingerror || true
|
||||||
|
db_go || true
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
# Set the database server to localhost
|
||||||
|
dbc_dbserver="localhost"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# Source the dbconfig main configuration file
|
||||||
|
if [ -f /etc/dbconfig-common/config ]; then
|
||||||
|
. /etc/dbconfig-common/config
|
||||||
|
fi
|
||||||
|
if [ "$dbc_remote_questions_default" = "false" ]; then
|
||||||
|
# Display a message and exit if the dbconfig configuration does not
|
||||||
|
# allow installation of remote databases
|
||||||
|
# Note: To overcome this issue, we could think to override the
|
||||||
|
# default setting by using dbc_remote_questions_default='true' in
|
||||||
|
# maintainer scripts but unfortunately this does not work due to
|
||||||
|
# current dbconfig design
|
||||||
|
# More information here:
|
||||||
|
# https://bugs.launchpad.net/ubuntu/+source/dbconfig-common/+bug/1065331
|
||||||
|
db_input high zoneminder/debconf_dbconfigerror || true
|
||||||
|
db_go || true
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Ask the user for all database settings
|
||||||
|
dbc_go zoneminder $@
|
||||||
|
|
||||||
|
# Ask the user for the password of the database administrator if the user
|
||||||
|
# has not yet answered to this question.
|
||||||
|
# This situation may occur if the user skipped the database creation step
|
||||||
|
# when reconfiguring the package.
|
||||||
|
RET=""
|
||||||
|
db_get zoneminder/mysql/admin-pass
|
||||||
|
if [ -z "$RET" ]; then
|
||||||
|
db_input high zoneminder/mysql/admin-pass || true
|
||||||
|
db_go || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Do this only when not upgrading the package (no old version in argument)
|
||||||
|
if [ -z "$2" ]; then
|
||||||
|
# Ask for the password of 'admin' user
|
||||||
|
while :; do
|
||||||
|
RET=""
|
||||||
|
db_input high zoneminder/admin_password || true
|
||||||
|
db_go || true
|
||||||
|
db_get zoneminder/admin_password
|
||||||
|
# If password isn't empty we ask for password verification
|
||||||
|
if [ -z "$RET" ]; then
|
||||||
|
db_fset zoneminder/admin_password seen false
|
||||||
|
db_fset zoneminder/admin_password_again seen false
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
ROOT_PW="$RET"
|
||||||
|
db_input high zoneminder/admin_password_again || true
|
||||||
|
db_go || true
|
||||||
|
db_get zoneminder/admin_password_again
|
||||||
|
if [ "$RET" = "$ROOT_PW" ]; then
|
||||||
|
ROOT_PW=""
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
db_fset zoneminder/password_mismatch seen false
|
||||||
|
db_input critical zoneminder/password_mismatch || true
|
||||||
|
db_set zoneminder/admin_password ""
|
||||||
|
db_set zoneminder/admin_password_again ""
|
||||||
|
db_go || true
|
||||||
|
done
|
||||||
|
else
|
||||||
|
# If we are upgrading the package, set an empty password to disable
|
||||||
|
# password update in ZoneMinder database
|
||||||
|
db_set zoneminder/admin_password ""
|
||||||
|
fi
|
||||||
|
# Set the seen flag to not ask this question again if no password is
|
||||||
|
# provided
|
||||||
|
db_fset zoneminder/admin_password seen true
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,3 @@
|
||||||
|
usr/share/zoneminder/db
|
||||||
|
usr/share/dbconfig-common/data/zoneminder/install
|
||||||
|
usr/share/dbconfig-common/data/zoneminder/upgrade/mysql
|
|
@ -0,0 +1 @@
|
||||||
|
usr/share/zoneminder/db
|
|
@ -0,0 +1,79 @@
|
||||||
|
#! /bin/sh
|
||||||
|
# postinst maintainer script for zoneminder-db package
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Source the debconf stuff
|
||||||
|
. /usr/share/debconf/confmodule
|
||||||
|
|
||||||
|
mysql_update() {
|
||||||
|
|
||||||
|
# Source the dbconfig stuff
|
||||||
|
. /usr/share/dbconfig-common/internal/mysql
|
||||||
|
|
||||||
|
# Update the password of the hard-coded default 'admin' account
|
||||||
|
test -z $ADMIN_PASSWORD || dbc_mysql_exec_command "UPDATE Users SET Password = password('$ADMIN_PASSWORD') WHERE Username = 'admin';" || true
|
||||||
|
|
||||||
|
# Update the database version
|
||||||
|
dbc_mysql_exec_command "UPDATE Config SET Value = '$DB_VERSION' WHERE Name = 'ZM_DYN_DB_VERSION';" || true
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -f /usr/share/dbconfig-common/dpkg/postinst ]; then
|
||||||
|
|
||||||
|
# Set the first version in which dbconfig-common was introduced in the package
|
||||||
|
dbc_first_version="1.28.0"
|
||||||
|
|
||||||
|
# Set the database type
|
||||||
|
dbc_dbtypes="mysql"
|
||||||
|
|
||||||
|
# Source the dbconfig-common stuff
|
||||||
|
. /usr/share/dbconfig-common/dpkg/postinst
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Do this when the package is installed, upgraded or reconfigured
|
||||||
|
if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then
|
||||||
|
|
||||||
|
# Install sql database create file for dbconfig
|
||||||
|
# (needed at first package installation)
|
||||||
|
if [ ! -f /usr/share/dbconfig-common/data/zoneminder/install/mysql ]; then
|
||||||
|
install -m 644 /usr/share/zoneminder/db/zm_create.sql \
|
||||||
|
/usr/share/dbconfig-common/data/zoneminder/install/mysql
|
||||||
|
# Remove unneeded sql requests
|
||||||
|
# dbconfig will create the underlying database
|
||||||
|
sed -i "/^ *CREATE DATABASE /d" \
|
||||||
|
/usr/share/dbconfig-common/data/zoneminder/install/mysql
|
||||||
|
sed -i "/^ *USE /d" \
|
||||||
|
/usr/share/dbconfig-common/data/zoneminder/install/mysql
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Symlink sql update files for dbconfig (needed when upgrading the package)
|
||||||
|
for sqlfile in /usr/share/zoneminder/db/zm_update-*.sql; do
|
||||||
|
lnk=`echo $sqlfile | sed "s/^\/usr\/share\/zoneminder\/db\/zm_update-\(.*\)\.sql/\1/"`
|
||||||
|
if [ ! -L /usr/share/dbconfig-common/data/zoneminder/upgrade/mysql/$lnk ]; then
|
||||||
|
ln -sf $sqlfile \
|
||||||
|
/usr/share/dbconfig-common/data/zoneminder/upgrade/mysql/$lnk
|
||||||
|
fi
|
||||||
|
done || true
|
||||||
|
|
||||||
|
# Create the underlying database and populate it
|
||||||
|
# dbconfig will take care of applying any updates which are newer than the
|
||||||
|
# previously installed version
|
||||||
|
dbc_go zoneminder $@
|
||||||
|
|
||||||
|
# Get the password of ZoneMinder user 'admin' from debconf
|
||||||
|
db_get zoneminder/admin_password
|
||||||
|
ADMIN_PASSWORD=$RET
|
||||||
|
|
||||||
|
# Remove the password from debconf database
|
||||||
|
test -z $ADMIN_PASSWORD || db_reset zoneminder/admin_password || true
|
||||||
|
|
||||||
|
# Get the lastest database version from dbconfig upgrade folder
|
||||||
|
DB_VERSION=$(ls -rv /usr/share/dbconfig-common/data/zoneminder/upgrade/$dbc_dbtypes | head -1)
|
||||||
|
|
||||||
|
# Update the default admin account and database version
|
||||||
|
mysql_update
|
||||||
|
fi
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,34 @@
|
||||||
|
#! /bin/sh
|
||||||
|
# postrm maintainer script for zoneminder-db package
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Source the debconf stuff
|
||||||
|
if [ -f /usr/share/debconf/confmodule ]; then
|
||||||
|
. /usr/share/debconf/confmodule
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Source the dbconfig stuff
|
||||||
|
if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then
|
||||||
|
. /usr/share/dbconfig-common/dpkg/postrm
|
||||||
|
# Ask the user what do to with dbconfig when removing the package
|
||||||
|
dbc_go zoneminder $@
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
|
||||||
|
# Remove dbconfig stuff added in postinst script
|
||||||
|
rm -rf /usr/share/dbconfig-common/data/zoneminder
|
||||||
|
# No need to manually remove the zm database, dbconfig take care of this
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "purge" ]; then
|
||||||
|
# Delete a potential remaining file used in postinst script
|
||||||
|
rm -f /etc/zm/zm.conf.postinst.bak
|
||||||
|
fi
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
# postrm rm may freeze without that
|
||||||
|
db_stop
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,6 @@
|
||||||
|
# Automatically added by dh_installdebconf
|
||||||
|
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
|
||||||
|
. /usr/share/debconf/confmodule
|
||||||
|
db_purge
|
||||||
|
fi
|
||||||
|
# End automatically added section
|
|
@ -0,0 +1,22 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# prerm script for zoneminder-db package
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Source the debconf stuff if file exists
|
||||||
|
if [ -f /usr/share/debconf/confmodule ]; then
|
||||||
|
. /usr/share/debconf/confmodule
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If dbconfig-common is installed and has been used by zoneminder
|
||||||
|
if [ -f /usr/share/dbconfig-common/dpkg/prerm ] \
|
||||||
|
&& [ -f /etc/dbconfig-common/zoneminder.conf ]; then
|
||||||
|
# Source the dbconfig stuff
|
||||||
|
. /usr/share/dbconfig-common/dpkg/prerm
|
||||||
|
# Ask the user what do to with dbconfig before removing the package
|
||||||
|
dbc_go zoneminder $@
|
||||||
|
fi
|
||||||
|
|
||||||
|
# #DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,58 @@
|
||||||
|
Template: zoneminder/debconf_dblocation
|
||||||
|
Type: select
|
||||||
|
__Choices: local, remote
|
||||||
|
Default: local
|
||||||
|
_Description: Database location:
|
||||||
|
A database server is required to run ZoneMinder. The database can be installed
|
||||||
|
either locally or remotely on a machine of your network.
|
||||||
|
.
|
||||||
|
If you choose a remote location, you will have to select the 'tcp/ip'
|
||||||
|
connection method and enter the hostname or ip address of the remote machine
|
||||||
|
in the next configuration screens.
|
||||||
|
|
||||||
|
Template: zoneminder/debconf_dblocalmissingerror
|
||||||
|
Type: error
|
||||||
|
_Description: No local database server is available:
|
||||||
|
Currently ZoneMinder supports mysql or mariadb database server but none of them
|
||||||
|
appears to be installed on this machine.
|
||||||
|
.
|
||||||
|
In order to complete ZoneMinder's installation, after ending of this assistant,
|
||||||
|
please install a compatible database server and then restart the assistant by
|
||||||
|
invoking:
|
||||||
|
.
|
||||||
|
$ sudo dpkg-reconfigure zoneminder
|
||||||
|
|
||||||
|
Template: zoneminder/debconf_dbconfigerror
|
||||||
|
Type: error
|
||||||
|
_Description: Remote database servers are not allowed:
|
||||||
|
The current configuration of dbconfig-common does not allow installation of
|
||||||
|
a database on remote servers.
|
||||||
|
.
|
||||||
|
In order to reconfigure dbconfig-common, please invoke the following command
|
||||||
|
after ending of this assistant:
|
||||||
|
.
|
||||||
|
$ sudo dpkg-reconfigure dbconfig-common
|
||||||
|
.
|
||||||
|
Then, to complete ZoneMinder's installation, please restart this assistant by
|
||||||
|
invoking:
|
||||||
|
.
|
||||||
|
$ sudo dpkg-reconfigure zoneminder
|
||||||
|
|
||||||
|
Template: zoneminder/admin_password
|
||||||
|
Type: password
|
||||||
|
_Description: New password for the ZoneMinder 'admin' user:
|
||||||
|
Please enter the password of the default administrative user.
|
||||||
|
.
|
||||||
|
While not mandatory, it is highly recommended that you set a custom password
|
||||||
|
for the administrative 'admin' user.
|
||||||
|
.
|
||||||
|
If this field is left blank, the password will not be changed.
|
||||||
|
|
||||||
|
Template: zoneminder/admin_password_again
|
||||||
|
Type: password
|
||||||
|
_Description: Repeat password for the ZoneMinder 'admin' user:
|
||||||
|
|
||||||
|
Template: zoneminder/password_mismatch
|
||||||
|
Type: error
|
||||||
|
_Description: Password input error
|
||||||
|
The two passwords you entered were not the same. Please try again.
|
|
@ -0,0 +1 @@
|
||||||
|
usr/share/zoneminder/api
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# config maintainer script for zoneminder-ui-base package
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Source the debconf stuff
|
||||||
|
. /usr/share/debconf/confmodule
|
||||||
|
|
||||||
|
# Do this when the package is installed, upgraded or reconfigured
|
||||||
|
# Most of answers are cached so the questions will not be asked again
|
||||||
|
if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then
|
||||||
|
|
||||||
|
# Ask the user for the web server(s) to configure
|
||||||
|
db_input high zoneminder/webserver || true
|
||||||
|
db_go || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,11 @@
|
||||||
|
debian/apache.conf etc/zm
|
||||||
|
usr/lib/cgi-bin
|
||||||
|
usr/share/zoneminder/ajax
|
||||||
|
usr/share/zoneminder/css
|
||||||
|
usr/share/zoneminder/graphics
|
||||||
|
usr/share/zoneminder/includes
|
||||||
|
usr/share/zoneminder/index.php
|
||||||
|
usr/share/zoneminder/js
|
||||||
|
usr/share/zoneminder/lang
|
||||||
|
usr/share/zoneminder/tools
|
||||||
|
usr/share/zoneminder/views
|
|
@ -0,0 +1 @@
|
||||||
|
usr/lib/cgi-bin usr/share/zoneminder/cgi-bin
|
|
@ -0,0 +1,48 @@
|
||||||
|
#! /bin/sh
|
||||||
|
# postinst maintainer script for zoneminder-ui-base package
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Source the debconf stuff
|
||||||
|
. /usr/share/debconf/confmodule
|
||||||
|
|
||||||
|
apache_install() {
|
||||||
|
|
||||||
|
mkdir -p /etc/apache2/conf-available
|
||||||
|
ln -sf ../../zm/apache.conf /etc/apache2/conf-available/zoneminder.conf
|
||||||
|
|
||||||
|
COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
|
||||||
|
|
||||||
|
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
|
||||||
|
. /usr/share/apache2/apache2-maintscript-helper
|
||||||
|
apache2_invoke enconf zoneminder
|
||||||
|
elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
|
||||||
|
[ -d /etc/apache2/conf.d/ ] && [ ! -L /etc/apache2/conf.d/zoneminder.conf ] && ln -s ../conf-available/zoneminder.conf /etc/apache2/conf.d/zoneminder.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Enable CGI script module in apache (not enabled by default on jessie)
|
||||||
|
a2enmod cgi >/dev/null 2>&1
|
||||||
|
|
||||||
|
# Reload the web server
|
||||||
|
deb-systemd-invoke reload apache2.service || true
|
||||||
|
}
|
||||||
|
|
||||||
|
# Do this when the package is installed, upgraded or reconfigured
|
||||||
|
if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then
|
||||||
|
|
||||||
|
# Configure the web server
|
||||||
|
db_get zoneminder/webserver
|
||||||
|
webservers="$RET"
|
||||||
|
|
||||||
|
for webserver in $webservers; do
|
||||||
|
webserver=${webserver%,}
|
||||||
|
# Currently we only support apache2
|
||||||
|
if [ "$webserver" = "apache2" ] ; then
|
||||||
|
apache_install $1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,41 @@
|
||||||
|
#! /bin/sh
|
||||||
|
# postrm maintainer script for zoneminder-ui-base package
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Source the debconf stuff
|
||||||
|
if [ -f /usr/share/debconf/confmodule ]; then
|
||||||
|
. /usr/share/debconf/confmodule
|
||||||
|
fi
|
||||||
|
|
||||||
|
apache_remove() {
|
||||||
|
COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
|
||||||
|
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
|
||||||
|
. /usr/share/apache2/apache2-maintscript-helper
|
||||||
|
apache2_invoke disconf zoneminder
|
||||||
|
elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then
|
||||||
|
rm -f /etc/apache2/conf.d/zoneminder.conf
|
||||||
|
fi
|
||||||
|
rm -f /etc/apache2/conf-available/zoneminder.conf
|
||||||
|
# Reload the web server
|
||||||
|
deb-systemd-invoke reload apache2.service || true
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
|
||||||
|
# Deconfigure the web server
|
||||||
|
db_get zoneminder/webserver
|
||||||
|
for webserver in $RET; do
|
||||||
|
webserver=${webserver%,}
|
||||||
|
# Currently we only support apache2
|
||||||
|
if [ "$webserver" = "apache2" ] ; then
|
||||||
|
apache_remove $1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
# postrm rm may freeze without that
|
||||||
|
db_stop
|
||||||
|
|
||||||
|
exit 0
|
|
@ -0,0 +1,6 @@
|
||||||
|
# Automatically added by dh_installdebconf
|
||||||
|
if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
|
||||||
|
. /usr/share/debconf/confmodule
|
||||||
|
db_purge
|
||||||
|
fi
|
||||||
|
# End automatically added section
|
|
@ -0,0 +1,7 @@
|
||||||
|
Template: zoneminder/webserver
|
||||||
|
Type: multiselect
|
||||||
|
Choices: apache2
|
||||||
|
Default: apache2
|
||||||
|
_Description: Web server to reconfigure automatically:
|
||||||
|
Please choose the web server that should be automatically configured for
|
||||||
|
ZoneMinder's web portal access.
|
|
@ -0,0 +1 @@
|
||||||
|
usr/share/zoneminder/skins/classic
|
|
@ -0,0 +1 @@
|
||||||
|
usr/share/zoneminder/skins/mobile
|
|
@ -0,0 +1 @@
|
||||||
|
usr/share/zoneminder/skins/xml
|
257
docs/api.rst
257
docs/api.rst
|
@ -1,10 +1,10 @@
|
||||||
API
|
API
|
||||||
===
|
^^^
|
||||||
|
|
||||||
This document will provide an overview of ZoneMinder's API.
|
This document will provide an overview of ZoneMinder's API. This is work in progress.
|
||||||
|
|
||||||
Overview
|
Overview
|
||||||
--------
|
^^^^^^^^
|
||||||
|
|
||||||
In an effort to further 'open up' ZoneMinder, an API was needed. This will
|
In an effort to further 'open up' ZoneMinder, an API was needed. This will
|
||||||
allow quick integration with and development of ZoneMinder.
|
allow quick integration with and development of ZoneMinder.
|
||||||
|
@ -14,7 +14,7 @@ provides a RESTful service and supports CRUD (create, retrieve, update, delete)
|
||||||
functions for Monitors, Events, Frames, Zones and Config.
|
functions for Monitors, Events, Frames, Zones and Config.
|
||||||
|
|
||||||
Examples
|
Examples
|
||||||
--------
|
^^^^^^^^
|
||||||
|
|
||||||
Here be a list of examples. Some results may be truncated.
|
Here be a list of examples. Some results may be truncated.
|
||||||
|
|
||||||
|
@ -22,97 +22,244 @@ 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
|
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.
|
you will be in. I like json, however you can use xml if you'd like.
|
||||||
|
|
||||||
|
(In all examples, replace 'server' with IP or hostname & port where ZoneMinder is running)
|
||||||
|
|
||||||
|
API Version
|
||||||
|
^^^^^^^^^^^
|
||||||
|
To retrieve the API version:
|
||||||
|
::
|
||||||
|
http://server/zm/api/host/getVersion.json
|
||||||
|
|
||||||
|
|
||||||
Return a list of all monitors
|
Return a list of all monitors
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
``curl -XGET http://zmdevapi/monitors.json``
|
::
|
||||||
|
|
||||||
|
curl -XGET http://server/zm/api/monitors.json
|
||||||
|
|
||||||
Retrieve monitor 1
|
Retrieve monitor 1
|
||||||
^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^
|
||||||
``curl -XGET http://zmdevapi/monitors/1.json``
|
|
||||||
|
::
|
||||||
|
|
||||||
|
curl -XGET http://server/zm/api/monitors/1.json
|
||||||
|
|
||||||
|
|
||||||
|
Change State of Monitor 1
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This API changes monitor 1 to Modect and Enabled
|
||||||
|
::
|
||||||
|
|
||||||
|
curl -XPOST http://server/zm/api/monitors/1.json -d "Monitor[Function]=Modect&Monitor[Enabled]:true"
|
||||||
|
|
||||||
Add a monitor
|
Add a monitor
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
This command will add a new http 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 \
|
curl -XPOST http://server/zm/api/monitors.json -d "Monitor[Name]=Cliff-Burton \
|
||||||
&Monitor[Method]=simple \
|
&Monitor[Function]=Modect \
|
||||||
&Monitor[Host]=ussr:pass@192.168.11.20 \
|
&Monitor[Protocol]=http \
|
||||||
&Monitor[Port]=80 \
|
&Monitor[Method]=simple \
|
||||||
&Monitor[Path]=/mjpg/video.mjpg \
|
&Monitor[Host]=usr:pass@192.168.11.20 \
|
||||||
&Monitor[Width]=704 \
|
&Monitor[Port]=80 \
|
||||||
&Monitor[Height]=480 \
|
&Monitor[Path]=/mjpg/video.mjpg \
|
||||||
&Monitor[Colours]=4"``
|
&Monitor[Width]=704 \
|
||||||
|
&Monitor[Height]=480 \
|
||||||
|
&Monitor[Colours]=4"
|
||||||
|
|
||||||
Edit monitor 1
|
Edit monitor 1
|
||||||
^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
This command will change the 'Name' field of Monitor 1 to 'test1'
|
This command will change the 'Name' field of Monitor 1 to 'test1'
|
||||||
|
|
||||||
``curl -XPUT http://zmdevapi/monitors/1.json -d "Monitor[Name]=test1"``
|
::
|
||||||
|
|
||||||
|
curl -XPUT http://server/zm/api/monitors/1.json -d "Monitor[Name]=test1"
|
||||||
|
|
||||||
|
|
||||||
Delete monitor 1
|
Delete monitor 1
|
||||||
^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
This command will delete Monitor 1, but will _not_ delete any Events which
|
This command will delete Monitor 1, but will _not_ delete any Events which
|
||||||
depend on it.
|
depend on it.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
curl -XDELETE http://server/zm/api/monitors/1.json
|
||||||
|
|
||||||
``curl -XDELETE http://zmdevapi/monitors/1.json``
|
|
||||||
|
|
||||||
Return a list of all events
|
Return a list of all events
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
``curl -XGET http://zmdevapi/events.json``
|
::
|
||||||
|
|
||||||
|
curl -XGET http://server/zm/api/events.json
|
||||||
|
|
||||||
|
|
||||||
|
Note that events list can be quite large and this API (as with all other APIs in ZM)
|
||||||
|
uses pagination. Each page returns a specific set of entries. By default this is 25
|
||||||
|
and ties into WEB_EVENTS_PER_PAGE in the ZM options menu.
|
||||||
|
|
||||||
|
So the logic to iterate through all events should be something like this (pseudocode):
|
||||||
|
(unfortunately there is no way to get pageCount without getting the first page)
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
data = http://server/zm/api/events.json?page=1 # this returns the first page
|
||||||
|
# The json object returned now has a property called data.pagination.pageCount
|
||||||
|
count = data.pagination.pageCount;
|
||||||
|
for (i=1, i<count, i++)
|
||||||
|
{
|
||||||
|
data = http://server/zm/api/events.json?page=i;
|
||||||
|
doStuff(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Retrieve event Id 1000
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
curl -XGET http://server/zm/api/events/1000.json
|
||||||
|
|
||||||
Retrieve event 1
|
|
||||||
^^^^^^^^^^^^^^^^
|
|
||||||
``curl -XGET http://zmdevapi/events/1.json``
|
|
||||||
|
|
||||||
Edit event 1
|
Edit event 1
|
||||||
^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
This command will change the 'Name' field of Event 1 to 'Seek and Destroy'
|
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"``
|
::
|
||||||
|
|
||||||
|
curl -XPUT http://server/zm/api/events/1.json -d "Event[Name]=Seek and Destroy"
|
||||||
|
|
||||||
Delete event 1
|
Delete event 1
|
||||||
^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
This command will delete Event 1, and any Frames which depend on it.
|
This command will delete Event 1, and any Frames which depend on it.
|
||||||
|
|
||||||
``curl -XDELETE http://zmdevapi/events/1.json``
|
::
|
||||||
|
|
||||||
Edit config 121
|
curl -XDELETE http://server/zm/api/events/1.json
|
||||||
|
|
||||||
|
|
||||||
|
Return a list of events for a specific monitor Id =5
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
::
|
||||||
|
|
||||||
|
curl -XGET http://server/zm/api/events/events/index/MonitorId:5.json``
|
||||||
|
|
||||||
|
|
||||||
|
Note that the same pagination logic applies if the list is too long
|
||||||
|
|
||||||
|
|
||||||
|
Return a list of events for a specific monitor within a specific date/time range
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
http://server/zm/api/events/events/index/MonitorId:5/StartTime >=:2015-05-15 18:43:56/EndTime <=:2015-05-16 18:43:56.json
|
||||||
|
|
||||||
|
|
||||||
|
To try this in CuRL, you need to URL escape the spaces like so:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
curl -XGET "http://server/zm/api/events/index/MonitorId:5/StartTime%20>=:2015-05-15%2018:43:56/EndTime%20<=:2015-05-16%2018:43:56.json"
|
||||||
|
|
||||||
|
|
||||||
|
Return a list of events for all monitors within a specified date/time range
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
curl -XGET "http://server/zm/api/events/index/StartTime%20>=:2015-05-15%2018:43:56/EndTime%20<=:208:43:56.json"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Configuration Apis
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The APIs allow you to access all the configuration parameters of ZM that you typically set inside the web console.
|
||||||
|
This returns the full list of configuration parameters:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
curl -XGET http://server/zm/api/configs.json
|
||||||
|
|
||||||
|
|
||||||
|
Each configuration parameter has an Id, Name, Value and other fields. Chances are you are likely only going to focus on these 3.
|
||||||
|
|
||||||
|
(Example of changing config TBD)
|
||||||
|
|
||||||
|
Run State Apis
|
||||||
^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
This command will change the 'Value' field of Config 121 to 901.
|
ZM API can be used to start/stop/restart/list states of ZM as well
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
curl -XGET http://server/zm/api/states.json # returns list of run states
|
||||||
|
curl -XPOST http://server/zm/api/states/change/restart.json #restarts ZM
|
||||||
|
curl -XPOST http://server/zm/api/states/change/stop.json #Stops ZM
|
||||||
|
curl -XPOST http://server/zm/api/states/change/start.json #Starts ZM
|
||||||
|
|
||||||
|
|
||||||
``curl -XPUT http://zmdevapi/configs/121.json -d "Config[Value]=901"``
|
|
||||||
|
|
||||||
Create a Zone
|
Create a Zone
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
curl -XPOST http://server/zm/api/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"
|
||||||
|
|
||||||
|
PTZ Control APIs
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
PTZ controls associated with a monitor are stored in the Controls table and not the Monitors table inside ZM. What that means is when you get the details of a Monitor, you will only know if it is controllable (isControllable:true) and the control ID.
|
||||||
|
To be able to retrieve PTZ information related to that Control ID, you need to use the controls API
|
||||||
|
|
||||||
|
This returns all the control definitions:
|
||||||
|
::
|
||||||
|
|
||||||
|
curl http://server/zm/api/controls.json
|
||||||
|
|
||||||
|
This returns control definitions for a specific control ID=5
|
||||||
|
::
|
||||||
|
|
||||||
|
curl http://server/zm/api/controls/5.json
|
||||||
|
|
||||||
|
Host APIs
|
||||||
|
^^^^^^^^^^
|
||||||
|
|
||||||
|
ZM APIs have various APIs that help you in determining host (aka ZM) daemon status, load etc. Some examples:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
curl -XGET http://server/zm/api/host/daemonCheck.json # 1 = ZM running 0=not running
|
||||||
|
curl -XGET http://server/zm/api/host/getLoad.json # returns current load of ZM
|
||||||
|
curl -XGET http://server/zm/api/host/getDiskPercent.json # returns in GB (not percentage), disk usage per monitor (that is, space taken to store various event related information,images etc. per monitor) ``
|
||||||
|
|
||||||
``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,63 @@
|
||||||
|
AC_DEFUN([AC_CHECK_SENDFILE],[
|
||||||
|
AC_MSG_CHECKING([whether sendfile() is supported and what prototype it has])
|
||||||
|
|
||||||
|
saved_CFLAGS="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS -Werror-implicit-function-declaration"
|
||||||
|
ac_sendfile_supported=no
|
||||||
|
AC_TRY_LINK([#include <sys/sendfile.h>
|
||||||
|
#include <stdio.h>],
|
||||||
|
[sendfile(1, 1, NULL, 0);],
|
||||||
|
[
|
||||||
|
AC_DEFINE(HAVE_SENDFILE4_SUPPORT, 1,
|
||||||
|
[Define this if Linux/Solaris sendfile() is supported])
|
||||||
|
AC_MSG_RESULT([Linux sendfile()])
|
||||||
|
ac_sendfile_supported=yes
|
||||||
|
], [])
|
||||||
|
|
||||||
|
if test x$ac_sendfile_supported = xno; then
|
||||||
|
dnl Checking wether we need libsendfile
|
||||||
|
dnl Presumably on Solaris
|
||||||
|
AC_CHECK_LIB(sendfile, sendfile,
|
||||||
|
[
|
||||||
|
AC_DEFINE(HAVE_SENDFILE4_SUPPORT, 1,
|
||||||
|
[Define this if Linux/Solaris sendfile() is supported])
|
||||||
|
SENDFILE_LIBS="-lsendfile"
|
||||||
|
AC_SUBST(SENDFILE_LIBS)
|
||||||
|
AC_MSG_RESULT([Solaris sendfile()])
|
||||||
|
ac_sendfile_supported=yes
|
||||||
|
], [])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x$ac_sendfile_supported = xno; then
|
||||||
|
dnl Checking wether we have FreeBSD-like sendfile() support.
|
||||||
|
AC_TRY_LINK([#include <sys/socket.h>
|
||||||
|
#include <stdio.h>],
|
||||||
|
[sendfile(1, 1, 0, 0, NULL, NULL, 0);],
|
||||||
|
[
|
||||||
|
AC_DEFINE(HAVE_SENDFILE7_SUPPORT, 1,
|
||||||
|
[Define this if FreeBSD sendfile() is supported])
|
||||||
|
AC_MSG_RESULT([FreeBSD sendfile()])
|
||||||
|
ac_sendfile_supported=yes
|
||||||
|
], [])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test x$ac_sendfile_supported = xno; then
|
||||||
|
dnl Checking wether we have MacOS-like sendfile() support.
|
||||||
|
AC_TRY_LINK([#include <sys/socket.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <sys/uio.h>],
|
||||||
|
[sendfile(1, 1, 0, NULL, NULL, 0);],
|
||||||
|
[
|
||||||
|
AC_DEFINE(HAVE_SENDFILE6_SUPPORT, 1,
|
||||||
|
[Define this if MacOS sendfile() is supported])
|
||||||
|
AC_MSG_RESULT([MacOS sendfile()])
|
||||||
|
ac_sendfile_supported=yes
|
||||||
|
], [])
|
||||||
|
fi
|
||||||
|
|
||||||
|
CFLAGS="$saved_CFLAGS"
|
||||||
|
|
||||||
|
if test x$ac_sendfile_supported = xno; then
|
||||||
|
AC_MSG_RESULT([no sendfile() support, using read/send])
|
||||||
|
fi
|
||||||
|
])
|
|
@ -1 +1,4 @@
|
||||||
d @ZM_RUNDIR@ 0755 @WEB_USER@ @WEB_GROUP@
|
D @ZM_RUNDIR@ 0755 @WEB_USER@ @WEB_GROUP@
|
||||||
|
D @ZM_TMPDIR@ 0755 @WEB_USER@ @WEB_GROUP@
|
||||||
|
D @ZM_SOCKDIR@ 0755 @WEB_USER@ @WEB_GROUP@
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,18 @@
|
||||||
|
# CMakeLists.txt for the ZoneMinder ONVIF modules.
|
||||||
|
|
||||||
|
# If this is an out-of-source build, copy the files we need to the binary directory
|
||||||
|
if(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
|
||||||
|
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.PL" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/lib" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" PATTERN "*.in" EXCLUDE)
|
||||||
|
endif(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
|
||||||
|
|
||||||
|
# MAKEMAKER_NOECHO_COMMAND previously defined in /scripts/zoneminder/CMakeLists.txt
|
||||||
|
|
||||||
# Add build target for the perl modules
|
# Add build target for the perl modules
|
||||||
add_custom_target(zmonvifmodules ALL perl Makefile.PL FIRST_MAKEFILE=MakefilePerl PREFIX="${CMAKE_CURRENT_BINARY_DIR}/output" LIB="${CMAKE_CURRENT_BINARY_DIR}/output/${ZM_PERL_SUBPREFIX}" INSTALLSITEMAN3DIR="${CMAKE_CURRENT_BINARY_DIR}/output/${CMAKE_INSTALL_MANDIR}/man3" ${MAKEMAKER_NOECHO_COMMAND} COMMAND make --makefile=MakefilePerl COMMAND make --makefile=MakefilePerl pure_install COMMENT "Building ZoneMinder perl modules")
|
add_custom_target(zmonvifmodules ALL perl Makefile.PL ${ZM_PERL_MM_PARMS} FIRST_MAKEFILE=MakefilePerl DESTDIR="${CMAKE_CURRENT_BINARY_DIR}/output" ${MAKEMAKER_NOECHO_COMMAND} COMMAND make --makefile=MakefilePerl pure_install COMMENT "Building ZoneMinder perl ONVIF proxy module")
|
||||||
|
|
||||||
# Add install target for the perl modules
|
# Add install target for the perl modules
|
||||||
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/output/" DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/output/" DESTINATION "/")
|
||||||
|
|
||||||
# Add additional files and directories to make clean
|
# Add additional files and directories to make clean
|
||||||
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "output;blib;pm_to_blib;MakefilePerl")
|
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "output;blib;pm_to_blib;MakefilePerl")
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
{
|
|
||||||
"abstract" : "unknown",
|
|
||||||
"author" : [
|
|
||||||
"Jan Hochstein"
|
|
||||||
],
|
|
||||||
"dynamic_config" : 0,
|
|
||||||
"generated_by" : "ExtUtils::MakeMaker version 6.72, CPAN::Meta::Converter version 2.141520",
|
|
||||||
"license" : [
|
|
||||||
"unknown"
|
|
||||||
],
|
|
||||||
"meta-spec" : {
|
|
||||||
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
|
|
||||||
"version" : "2"
|
|
||||||
},
|
|
||||||
"name" : "ONVIF",
|
|
||||||
"no_index" : {
|
|
||||||
"directory" : [
|
|
||||||
"t",
|
|
||||||
"inc"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"prereqs" : {
|
|
||||||
"build" : {
|
|
||||||
"requires" : {
|
|
||||||
"ExtUtils::MakeMaker" : "0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"configure" : {
|
|
||||||
"requires" : {
|
|
||||||
"ExtUtils::MakeMaker" : "0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"runtime" : {
|
|
||||||
"requires" : {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"release_status" : "stable",
|
|
||||||
"version" : ""
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
---
|
|
||||||
abstract: unknown
|
|
||||||
author:
|
|
||||||
- 'Jan Hochstein'
|
|
||||||
build_requires:
|
|
||||||
ExtUtils::MakeMaker: '0'
|
|
||||||
configure_requires:
|
|
||||||
ExtUtils::MakeMaker: '0'
|
|
||||||
dynamic_config: 0
|
|
||||||
generated_by: 'ExtUtils::MakeMaker version 6.72, CPAN::Meta::Converter version 2.141520'
|
|
||||||
license: unknown
|
|
||||||
meta-spec:
|
|
||||||
url: http://module-build.sourceforge.net/META-spec-v1.4.html
|
|
||||||
version: '1.4'
|
|
||||||
name: ONVIF
|
|
||||||
no_index:
|
|
||||||
directory:
|
|
||||||
- t
|
|
||||||
- inc
|
|
||||||
requires: {}
|
|
||||||
version: ''
|
|
|
@ -1,10 +1,18 @@
|
||||||
|
# CMakeLists.txt for the ZoneMinder ONVIF proxy module.
|
||||||
|
|
||||||
|
# If this is an out-of-source build, copy the files we need to the binary directory
|
||||||
|
if(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
|
||||||
|
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/Makefile.PL" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/lib" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" PATTERN "*.in" EXCLUDE)
|
||||||
|
endif(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
|
||||||
|
|
||||||
|
# MAKEMAKER_NOECHO_COMMAND previously defined in /scripts/zoneminder/CMakeLists.txt
|
||||||
|
|
||||||
# Add build target for the perl modules
|
# Add build target for the perl modules
|
||||||
add_custom_target(zmonvifproxy ALL perl Makefile.PL FIRST_MAKEFILE=MakefilePerl PREFIX="${CMAKE_CURRENT_BINARY_DIR}/output" LIB="${CMAKE_CURRENT_BINARY_DIR}/output/${ZM_PERL_SUBPREFIX}" INSTALLSITEMAN3DIR="${CMAKE_CURRENT_BINARY_DIR}/output/${CMAKE_INSTALL_MANDIR}/man3" ${MAKEMAKER_NOECHO_COMMAND} COMMAND make --makefile=MakefilePerl COMMAND make --makefile=MakefilePerl pure_install COMMENT "Building ZoneMinder perl modules")
|
add_custom_target(zmonvifproxy ALL perl Makefile.PL ${ZM_PERL_MM_PARMS} FIRST_MAKEFILE=MakefilePerl DESTDIR="${CMAKE_CURRENT_BINARY_DIR}/output" ${MAKEMAKER_NOECHO_COMMAND} COMMAND make --makefile=MakefilePerl pure_install COMMENT "Building ZoneMinder perl ONVIF proxy module")
|
||||||
|
|
||||||
# Add install target for the perl modules
|
# Add install target for the perl modules
|
||||||
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/output/" DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/output/" DESTINATION "/")
|
||||||
|
|
||||||
# Add additional files and directories to make clean
|
# Add additional files and directories to make clean
|
||||||
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "output;blib;pm_to_blib;MakefilePerl")
|
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "output;blib;pm_to_blib;MakefilePerl")
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
{
|
|
||||||
"abstract" : "unknown",
|
|
||||||
"author" : [
|
|
||||||
"Jan Hochstein"
|
|
||||||
],
|
|
||||||
"dynamic_config" : 0,
|
|
||||||
"generated_by" : "ExtUtils::MakeMaker version 6.72, CPAN::Meta::Converter version 2.141520",
|
|
||||||
"license" : [
|
|
||||||
"unknown"
|
|
||||||
],
|
|
||||||
"meta-spec" : {
|
|
||||||
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
|
|
||||||
"version" : "2"
|
|
||||||
},
|
|
||||||
"name" : "ONVIF",
|
|
||||||
"no_index" : {
|
|
||||||
"directory" : [
|
|
||||||
"t",
|
|
||||||
"inc"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"prereqs" : {
|
|
||||||
"build" : {
|
|
||||||
"requires" : {
|
|
||||||
"ExtUtils::MakeMaker" : "0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"configure" : {
|
|
||||||
"requires" : {
|
|
||||||
"ExtUtils::MakeMaker" : "0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"runtime" : {
|
|
||||||
"requires" : {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"release_status" : "stable",
|
|
||||||
"version" : ""
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue