From 972dedd15a4fca89dde2d6a42e4e5e31325651e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cosme=20Dom=C3=ADnguez=20D=C3=ADaz?= Date: Tue, 11 Nov 2014 22:47:28 +0100 Subject: [PATCH] * distros/debian -> Autotools * distros/debian_cmake -> CMake --- distros/debian/changelog | 11 ---- distros/debian/control | 16 +++--- distros/debian/copyright | 35 ------------ distros/debian/dirs | 1 + distros/debian/init.d | 9 ++-- distros/debian/postrm | 10 ++-- distros/debian/preinst | 0 distros/debian/rules | 87 ++++++++++++++++++++---------- distros/debian_cmake/README.Debian | 51 ++++++++++++++++++ distros/debian_cmake/apache.conf | 9 ++++ distros/debian_cmake/changelog | 29 ++++++++++ distros/debian_cmake/compat | 1 + distros/debian_cmake/control | 40 ++++++++++++++ distros/debian_cmake/copyright | 57 ++++++++++++++++++++ distros/debian_cmake/dirs | 5 ++ distros/debian_cmake/docs | 1 + distros/debian_cmake/init.d | 87 ++++++++++++++++++++++++++++++ distros/debian_cmake/install | 7 +++ distros/debian_cmake/links | 4 ++ distros/debian_cmake/postinst | 53 ++++++++++++++++++ distros/debian_cmake/postrm | 11 ++++ distros/debian_cmake/preinst | 32 +++++++++++ distros/debian_cmake/rules | 42 +++++++++++++++ distros/debian_cmake/watch | 3 ++ 24 files changed, 509 insertions(+), 92 deletions(-) mode change 100644 => 100755 distros/debian/preinst create mode 100644 distros/debian_cmake/README.Debian create mode 100644 distros/debian_cmake/apache.conf create mode 100644 distros/debian_cmake/changelog create mode 100644 distros/debian_cmake/compat create mode 100644 distros/debian_cmake/control create mode 100644 distros/debian_cmake/copyright create mode 100644 distros/debian_cmake/dirs create mode 100644 distros/debian_cmake/docs create mode 100644 distros/debian_cmake/init.d create mode 100644 distros/debian_cmake/install create mode 100644 distros/debian_cmake/links create mode 100644 distros/debian_cmake/postinst create mode 100644 distros/debian_cmake/postrm create mode 100644 distros/debian_cmake/preinst create mode 100755 distros/debian_cmake/rules create mode 100644 distros/debian_cmake/watch diff --git a/distros/debian/changelog b/distros/debian/changelog index 0edaefce7..ceebf9367 100644 --- a/distros/debian/changelog +++ b/distros/debian/changelog @@ -1,14 +1,3 @@ -zoneminder (1.28.0-0.1) wheezy; urgency=low - - * Use CMake instead of Autotools to simplify - debian/rules and have less build-depends. - * Some lintian love in debian/{control,copyright} - and perl ZoneMinder modules. - * Don't purge database if we use a remote - MySQL server. - - -- Cosme Domínguez Díaz Sun, 09 Nov 2014 02:20:20 +0100 - zoneminder (1.28.0-wheezy) wheezy; urgency=medium * Release diff --git a/distros/debian/control b/distros/debian/control index 01adf14df..1949ef0b9 100644 --- a/distros/debian/control +++ b/distros/debian/control @@ -2,14 +2,14 @@ Source: zoneminder Section: net Priority: optional Maintainer: Isaac Connor -Build-Depends: debhelper (>= 9), cmake, libphp-serialization-perl, libgnutls-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libsys-mmap-perl, libav-tools, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libarchive-zip-perl, libmime-lite-perl, libvlccore-dev, libvlc-dev, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libgcrypt11-dev, libpolkit-gobject-1-dev -Standards-Version: 3.9.4 +Build-Depends: debhelper (>= 7.0.50), autoconf, automake, dpatch, libphp-serialization-perl, libgnutls-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, ffmpeg | libav-tools, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libpcre3, libarchive-zip-perl, libmime-lite-perl, libjpeg8, dh-autoreconf, libvlccore-dev, libvlc-dev, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libgcrypt11-dev, libpolkit-gobject-1-dev +Standards-Version: 3.9.2 Package: zoneminder Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2 | httpd, libapache2-mod-php5 | libapache2-mod-fcgid | php5-fpm, php5-mysqlnd | php5-mysql, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl, mariadb-client | mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, libav-tools, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53, libjpeg8, zip, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl, libvlccore5 | libvlccore7, libvlc5, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libpolkit-gobject-1-0 -Recommends: mysql-server | mariadb-server -Description: Video camera security and surveillance solution +Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2 | httpd, libapache2-mod-php5 | libapache2-mod-fcgid | php5-fpm, php5, php5-mysql|php5-mysqlnd, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl, mariadb-client|mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, ffmpeg | libav-tools, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53, libjpeg8, zip, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl, libvlccore5 | libvlccore7, libvlc5, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libpolkit-gobject-1-0 +Recommends: mysql-server|mariadb-server +Description: A video camera security and surveillance solution ZoneMinder is intended for use in single or multi-camera video security applications, including commercial or home CCTV, theft prevention and child or family member or home monitoring and other care scenarios. It @@ -23,9 +23,9 @@ Description: Video camera security and surveillance solution Package: zoneminder-dbg Architecture: any -Priority: extra -Section: debug -Depends: zoneminder (= ${binary:Version}), ${misc:Depends} +Depends: + zoneminder (= ${binary:Version}), + ${misc:Depends} Description: debugging syumbols for zoneminder. ZoneMinder is a video camera security and surveillance solution. ZoneMinder is intended for use in single or multi-camera video security diff --git a/distros/debian/copyright b/distros/debian/copyright index 1c10c59db..a177502a0 100644 --- a/distros/debian/copyright +++ b/distros/debian/copyright @@ -20,38 +20,3 @@ 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. - -/usr/share/zoneminder/api/lib/Cake/*: -Copyright: - -Copyright (c) 2005-2013, Cake Software Foundation, Inc. - -License: - -CakePHP(tm) : The Rapid Development PHP Framework (http://cakephp.org) - -The MIT License - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -Cake Software Foundation, Inc. -1785 E. Sahara Avenue, -Suite 490-204 -Las Vegas, Nevada 89104, -United States of America. diff --git a/distros/debian/dirs b/distros/debian/dirs index 9e29e6113..4178482c1 100644 --- a/distros/debian/dirs +++ b/distros/debian/dirs @@ -3,3 +3,4 @@ var/lib/zm var/cache/zoneminder/events var/cache/zoneminder/images var/cache/zoneminder/temp +usr/share/zoneminder/db diff --git a/distros/debian/init.d b/distros/debian/init.d index cbc8fb10e..d3354c1d8 100644 --- a/distros/debian/init.d +++ b/distros/debian/init.d @@ -23,10 +23,12 @@ command="$ZM_PATH_BIN/zmpkg.pl" start() { echo -n "Starting $prog: " - mkdir -p $RUNDIR $TMPDIR && chown www-data:www-data $RUNDIR $TMPDIR + 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 || echo failure + [ $RETVAL = 0 ] && echo success + [ $RETVAL != 0 ] && echo failure echo [ $RETVAL = 0 ] && touch /var/lock/zm return $RETVAL @@ -49,7 +51,8 @@ stop() { else $command stop RETVAL=$? - [ $RETVAL = 0 ] && echo success || echo failure + [ $RETVAL = 0 ] && echo success + [ $RETVAL != 0 ] && echo failure echo [ $RETVAL = 0 ] && rm -f /var/lock/zm fi diff --git a/distros/debian/postrm b/distros/debian/postrm index fde590981..28a00a7a0 100644 --- a/distros/debian/postrm +++ b/distros/debian/postrm @@ -1,11 +1,9 @@ #! /bin/sh -set -e +# set -e # to be reinstated later if [ "$1" = "purge" ]; then - if [ -e "/etc/init.d/mysql" ]; 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 + 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# diff --git a/distros/debian/preinst b/distros/debian/preinst old mode 100644 new mode 100755 diff --git a/distros/debian/rules b/distros/debian/rules index 0bf0f3362..df11f4988 100755 --- a/distros/debian/rules +++ b/distros/debian/rules @@ -1,42 +1,71 @@ #!/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 -export CFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -pipe -export CXXFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -pipe -INSTDIR = debian/tmp +# 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 autoreconf override_dh_auto_configure: - 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 \ - -DZM_PERL_SUBPREFIX=/share/perl5 \ - -DCMAKE_INSTALL_SYSCONFDIR=etc/zm + CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --sysconfdir=/etc/zm --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-mysql=/usr --with-mariadb=/usr --with-webdir=/usr/share/zoneminder --with-ffmpeg=/usr --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-crashtrace=no --enable-mmap=yes -override_dh_auto_install: - dh_auto_install --buildsystem=cmake - install -D -m 0644 debian/apache.conf $(INSTDIR)/etc/zm/apache.conf - rm $(INSTDIR)/usr/share/zoneminder/api/lib/Cake/LICENSE.txt - rm $(INSTDIR)/usr/share/zoneminder/api/.gitignore - rm -r $(INSTDIR)/usr/share/zoneminder/api/lib/Cake/Test +override_dh_clean: + # Add here commands to clean up after the build process. + [ ! -f Makefile ] || $(MAKE) distclean + dh_clean + +override_dh_install: + # Add here commands to install the package into debian/zm. + $(MAKE) install DESTDIR=$(CURDIR)/debian/zoneminder RUNDIR=$(CURDIR)/debian/zoneminder/var/run ZM_RUNDIR=$(CURDIR)/debian/zoneminder/var/run + install -D -m 0644 db/zm_create.sql $(CURDIR)/debian/zoneminder/usr/share/zoneminder/db + install -D -m 0644 db/zm_update-*.sql $(CURDIR)/debian/zoneminder/usr/share/zoneminder/db + install -D -m 0644 debian/apache.conf $(CURDIR)/debian/zoneminder/etc/zm + # + # 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 + ln -s /var/cache/zoneminder/events debian/zoneminder/usr/share/zoneminder/ + ln -s /var/cache/zoneminder/images debian/zoneminder/usr/share/zoneminder/ + ln -s /var/cache/zoneminder/temp debian/zoneminder/usr/share/zoneminder/ + + # + # 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. + # + ln -s /usr/lib/cgi-bin debian/zoneminder/usr/share/zoneminder/ + +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 - -%: - dh $@ --buildsystem=cmake --parallel + dh_strip --dbg-package=zoneminder-dbg diff --git a/distros/debian_cmake/README.Debian b/distros/debian_cmake/README.Debian new file mode 100644 index 000000000..a49b6be72 --- /dev/null +++ b/distros/debian_cmake/README.Debian @@ -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 , 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 Sun, 27 Mar 2011 13:06:56 -0700 diff --git a/distros/debian_cmake/apache.conf b/distros/debian_cmake/apache.conf new file mode 100644 index 000000000..92a2b6414 --- /dev/null +++ b/distros/debian_cmake/apache.conf @@ -0,0 +1,9 @@ +Alias /zm /usr/share/zoneminder + + + php_flag register_globals off + Options Indexes FollowSymLinks + + DirectoryIndex index.php + + diff --git a/distros/debian_cmake/changelog b/distros/debian_cmake/changelog new file mode 100644 index 000000000..0edaefce7 --- /dev/null +++ b/distros/debian_cmake/changelog @@ -0,0 +1,29 @@ +zoneminder (1.28.0-0.1) wheezy; urgency=low + + * Use CMake instead of Autotools to simplify + debian/rules and have less build-depends. + * Some lintian love in debian/{control,copyright} + and perl ZoneMinder modules. + * Don't purge database if we use a remote + MySQL server. + + -- Cosme Domínguez Díaz Sun, 09 Nov 2014 02:20:20 +0100 + +zoneminder (1.28.0-wheezy) wheezy; urgency=medium + + * Release + + -- Isaac Connor Fri, 17 Oct 2014 09:27:22 -0400 + +zoneminder (1.27.99+1-testing-SNAPSHOT2014072901) testing; 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 Tue, 29 Jul 2014 14:50:20 -0400 + +zoneminder (1.27.0+1-testing-v4ltomonitor-1) testing; urgency=high + + * Snapshot release - + + -- Isaac Connor Wed, 09 Jul 2014 21:35:29 -0400 diff --git a/distros/debian_cmake/compat b/distros/debian_cmake/compat new file mode 100644 index 000000000..ec635144f --- /dev/null +++ b/distros/debian_cmake/compat @@ -0,0 +1 @@ +9 diff --git a/distros/debian_cmake/control b/distros/debian_cmake/control new file mode 100644 index 000000000..01adf14df --- /dev/null +++ b/distros/debian_cmake/control @@ -0,0 +1,40 @@ +Source: zoneminder +Section: net +Priority: optional +Maintainer: Isaac Connor +Build-Depends: debhelper (>= 9), cmake, libphp-serialization-perl, libgnutls-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libsys-mmap-perl, libav-tools, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libarchive-zip-perl, libmime-lite-perl, 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 | httpd, libapache2-mod-php5 | libapache2-mod-fcgid | php5-fpm, php5-mysqlnd | php5-mysql, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl, mariadb-client | mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, libav-tools, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53, libjpeg8, zip, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl, libvlccore5 | libvlccore7, libvlc5, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libpolkit-gobject-1-0 +Recommends: mysql-server | mariadb-server +Description: Video camera security and surveillance solution + ZoneMinder is intended for use in single or multi-camera video security + applications, including commercial or home CCTV, theft prevention and child + or family member or home monitoring and other care scenarios. It + supports capture, analysis, recording, and monitoring of video data coming + from one or more video or network cameras attached to a Linux system. + ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom + cameras using a variety of protocols. It is suitable for use as a home + video security system and for commercial or professional video security + and surveillance. It can also be integrated into a home automation system + via X.10 or other protocols. + +Package: zoneminder-dbg +Architecture: any +Priority: extra +Section: debug +Depends: zoneminder (= ${binary:Version}), ${misc:Depends} +Description: debugging syumbols for zoneminder. + ZoneMinder is a video camera security and surveillance solution. + ZoneMinder is intended for use in single or multi-camera video security + applications, including commercial or home CCTV, theft prevention and child + or family member or home monitoring and other care scenarios. It + 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. diff --git a/distros/debian_cmake/copyright b/distros/debian_cmake/copyright new file mode 100644 index 000000000..1c10c59db --- /dev/null +++ b/distros/debian_cmake/copyright @@ -0,0 +1,57 @@ +Copyright: + +Copyright 2002 Philip Coombes + +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. + +/usr/share/zoneminder/api/lib/Cake/*: +Copyright: + +Copyright (c) 2005-2013, Cake Software Foundation, Inc. + +License: + +CakePHP(tm) : The Rapid Development PHP Framework (http://cakephp.org) + +The MIT License + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +Cake Software Foundation, Inc. +1785 E. Sahara Avenue, +Suite 490-204 +Las Vegas, Nevada 89104, +United States of America. diff --git a/distros/debian_cmake/dirs b/distros/debian_cmake/dirs new file mode 100644 index 000000000..9e29e6113 --- /dev/null +++ b/distros/debian_cmake/dirs @@ -0,0 +1,5 @@ +var/log/zm +var/lib/zm +var/cache/zoneminder/events +var/cache/zoneminder/images +var/cache/zoneminder/temp diff --git a/distros/debian_cmake/docs b/distros/debian_cmake/docs new file mode 100644 index 000000000..b43bf86b5 --- /dev/null +++ b/distros/debian_cmake/docs @@ -0,0 +1 @@ +README.md diff --git a/distros/debian_cmake/init.d b/distros/debian_cmake/init.d new file mode 100644 index 000000000..cbc8fb10e --- /dev/null +++ b/distros/debian_cmake/init.d @@ -0,0 +1,87 @@ +#!/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 $TMPDIR && chown www-data:www-data $RUNDIR $TMPDIR + $command start + RETVAL=$? + [ $RETVAL = 0 ] && echo success || 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 || 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 diff --git a/distros/debian_cmake/install b/distros/debian_cmake/install new file mode 100644 index 000000000..9e8953409 --- /dev/null +++ b/distros/debian_cmake/install @@ -0,0 +1,7 @@ +usr/bin +usr/lib/cgi-bin +usr/share/man +usr/share/perl5/ZoneMinder +usr/share/perl5/ZoneMinder.pm +usr/share/zoneminder +etc/zm diff --git a/distros/debian_cmake/links b/distros/debian_cmake/links new file mode 100644 index 000000000..9715ee428 --- /dev/null +++ b/distros/debian_cmake/links @@ -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 diff --git a/distros/debian_cmake/postinst b/distros/debian_cmake/postinst new file mode 100644 index 000000000..d06f9c641 --- /dev/null +++ b/distros/debian_cmake/postinst @@ -0,0 +1,53 @@ +#! /bin/sh + +set -e + +if [ "$1" = "configure" ]; then + if [ -e "/etc/init.d/mysql" ]; then + # + # Get mysql started if it isn't + # + if ! $(/etc/init.d/mysql status >/dev/null 2>&1); then + invoke-rc.d mysql start + fi + if $(/etc/init.d/mysql status >/dev/null 2>&1); then + mysqladmin --defaults-file=/etc/mysql/debian.cnf -f reload + # test if database if already present... + if ! $(echo quit | mysql --defaults-file=/etc/mysql/debian.cnf zm > /dev/null 2> /dev/null) ; then + cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf + echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql + fi + + invoke-rc.d zoneminder stop || true + zmupdate.pl --nointeractive + + else + echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.' + fi + else + echo 'mysql not found, assuming remote server.' + fi + chown www-data:www-data /var/log/zm + chown www-data:www-data /var/lib/zm/ + if [ -z "$2" ]; then + chown www-data:www-data -R /var/cache/zoneminder + fi +fi +# Ensure zoneminder is stopped... +if [ -x "/etc/init.d/zoneminder" ]; then + if invoke-rc.d zoneminder status ; then + invoke-rc.d zoneminder stop || 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# diff --git a/distros/debian_cmake/postrm b/distros/debian_cmake/postrm new file mode 100644 index 000000000..fde590981 --- /dev/null +++ b/distros/debian_cmake/postrm @@ -0,0 +1,11 @@ +#! /bin/sh +set -e + +if [ "$1" = "purge" ]; then + if [ -e "/etc/init.d/mysql" ]; 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 +fi +#DEBHELPER# diff --git a/distros/debian_cmake/preinst b/distros/debian_cmake/preinst new file mode 100644 index 000000000..6cd01ba55 --- /dev/null +++ b/distros/debian_cmake/preinst @@ -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 diff --git a/distros/debian_cmake/rules b/distros/debian_cmake/rules new file mode 100755 index 000000000..0bf0f3362 --- /dev/null +++ b/distros/debian_cmake/rules @@ -0,0 +1,42 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +export CFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -pipe +export CXXFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -pipe +INSTDIR = debian/tmp + +override_dh_auto_configure: + 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 \ + -DZM_PERL_SUBPREFIX=/share/perl5 \ + -DCMAKE_INSTALL_SYSCONFDIR=etc/zm + +override_dh_auto_install: + dh_auto_install --buildsystem=cmake + install -D -m 0644 debian/apache.conf $(INSTDIR)/etc/zm/apache.conf + rm $(INSTDIR)/usr/share/zoneminder/api/lib/Cake/LICENSE.txt + rm $(INSTDIR)/usr/share/zoneminder/api/.gitignore + rm -r $(INSTDIR)/usr/share/zoneminder/api/lib/Cake/Test + +override_dh_auto_test: + # do not run tests... + +override_dh_strip: + dh_strip --dbg-package=zoneminder-dbg + +%: + dh $@ --buildsystem=cmake --parallel diff --git a/distros/debian_cmake/watch b/distros/debian_cmake/watch new file mode 100644 index 000000000..5a8a9c4d7 --- /dev/null +++ b/distros/debian_cmake/watch @@ -0,0 +1,3 @@ +version=3 +http://www.zoneminder.com/downloads.html \ + .*/ZoneMinder-(.*).tar.gz