* Use CMake instead of Autotools.
* Some lintian love (minor fixes and cosmetic changes...) * Don't remove database data if we are using a remote MySQL server.
This commit is contained in:
parent
3fe5724ca0
commit
96859e3b11
|
@ -67,7 +67,7 @@ apache2-mpm-prefork libapache2-mod-php5 php5-cli
|
|||
A fresh build based on master branch running Debian 7 (wheezy):
|
||||
|
||||
```bash
|
||||
root@host:~# aptitude install -y apache2 mysql-server php5 php5-mysql build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libpcre3 libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm automake autoconf libjpeg8-dev libjpeg8 apache2-mpm-prefork libapache2-mod-php5 php5-cli libphp-serialization-perl libgnutls-dev libjpeg8-dev libavcodec-dev libavformat-dev libswscale-dev libavutil-dev libv4l-dev libtool ffmpeg libnetpbm10-dev libavdevice-dev libmime-lite-perl dh-autoreconf dpatch;
|
||||
root@host:~# aptitude install -y libapache2-mod-php5 mysql-server php5-mysqlnd build-essential cmake debhelper libphp-serialization-perl libgnutls-dev libmysqlclient-dev libdbd-mysql-perl libdate-manip-perl libwww-perl libjpeg8-dev libpcre3-dev libavcodec-dev libavformat-dev libswscale-dev libavutil-dev libv4l-dev 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 libgcrypt11-dev libpolkit-gobject-1-dev;
|
||||
|
||||
root@host:~# git clone https://github.com/ZoneMinder/ZoneMinder.git zoneminder;
|
||||
root@host:~# cd zoneminder;
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
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 <cosme.ddiaz@gmail.com> Sun, 09 Nov 2014 02:20:20 +0100
|
||||
|
||||
zoneminder (1.28.0-wheezy) wheezy; urgency=medium
|
||||
|
||||
* Release
|
||||
|
|
|
@ -2,14 +2,14 @@ Source: zoneminder
|
|||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: Isaac Connor <iconnor@connortechnology.com>
|
||||
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
|
||||
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, 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
|
||||
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
|
||||
|
@ -23,9 +23,9 @@ Description: A video camera security and surveillance solution
|
|||
|
||||
Package: zoneminder-dbg
|
||||
Architecture: any
|
||||
Depends:
|
||||
zoneminder (= ${binary:Version}),
|
||||
${misc:Depends}
|
||||
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
|
||||
|
|
|
@ -20,3 +20,38 @@ 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.
|
||||
|
|
|
@ -3,4 +3,3 @@ var/lib/zm
|
|||
var/cache/zoneminder/events
|
||||
var/cache/zoneminder/images
|
||||
var/cache/zoneminder/temp
|
||||
usr/share/zoneminder/db
|
||||
|
|
|
@ -23,12 +23,10 @@ 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
|
||||
mkdir -p $RUNDIR $TMPDIR && chown www-data:www-data $RUNDIR $TMPDIR
|
||||
$command start
|
||||
RETVAL=$?
|
||||
[ $RETVAL = 0 ] && echo success
|
||||
[ $RETVAL != 0 ] && echo failure
|
||||
[ $RETVAL = 0 ] && echo success || echo failure
|
||||
echo
|
||||
[ $RETVAL = 0 ] && touch /var/lock/zm
|
||||
return $RETVAL
|
||||
|
@ -51,8 +49,7 @@ stop() {
|
|||
else
|
||||
$command stop
|
||||
RETVAL=$?
|
||||
[ $RETVAL = 0 ] && echo success
|
||||
[ $RETVAL != 0 ] && echo failure
|
||||
[ $RETVAL = 0 ] && echo success || echo failure
|
||||
echo
|
||||
[ $RETVAL = 0 ] && rm -f /var/lock/zm
|
||||
fi
|
||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -1,9 +1,11 @@
|
|||
#! /bin/sh
|
||||
# set -e # to be reinstated later
|
||||
set -e
|
||||
|
||||
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
|
||||
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#
|
||||
|
|
|
@ -1,71 +1,42 @@
|
|||
#!/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 autoreconf
|
||||
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:
|
||||
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
|
||||
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_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_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...
|
||||
|
||||
.PHONY: override_dh_strip
|
||||
override_dh_strip:
|
||||
dh_strip --dbg-package=zoneminder-dbg
|
||||
dh_strip --dbg-package=zoneminder-dbg
|
||||
|
||||
%:
|
||||
dh $@ --buildsystem=cmake --parallel
|
||||
|
|
Loading…
Reference in New Issue