wok-undigest rev 748

Add zoneminder
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jul 11 17:31:06 2012 +0200 (2012-07-11)
parents f3262880f9b0
children 52086ed34b44
files zoneminder/receipt zoneminder/stuff/etc/logrotate.d/zoneminder zoneminder/stuff/etc/mysql.d/zoneminder
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/zoneminder/receipt	Wed Jul 11 17:31:06 2012 +0200
     1.3 @@ -0,0 +1,42 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="zoneminder"
     1.7 +VERSION="1.25.0"
     1.8 +SOURCE="ZoneMinder"
     1.9 +CATEGORY="misc"
    1.10 +SHORT_DESC="Linux video camera security and surveillance solution."
    1.11 +MAINTAINER="pascal.bellard@slitaz.org"
    1.12 +WEB_SITE="http://www.zoneminder.com/"
    1.13 +TARBALL="$SOURCE-$VERSION.tar.gz"
    1.14 +WGET_URL="http://www2.zoneminder.com/downloads/$TARBALL"
    1.15 +
    1.16 +DEPENDS="mysql jpeg bzlib zlib ffmpeg x264 perl perl-dbi-dbd perl-dbd-mysql \
    1.17 +perl-time-hires perl-getopt-long perl-date-manip perl-libwww"
    1.18 +BUILD_DEPENDS="mysql-dev jpeg-dev ffmpeg-dev linux-api-headers $DEPENDS"
    1.19 +
    1.20 +# Rules to configure and make the package.
    1.21 +compile_rules()
    1.22 +{
    1.23 +	cd $src
    1.24 +	sed -i 's/.*fcntl.h.*/#include <limits.h>\n&/' src/zm_event.cpp \
    1.25 +		src/zm_local_camera.cpp
    1.26 +	./configure --prefix=/usr --infodir=/usr/share/info \
    1.27 +		--mandir=/usr/share/man \
    1.28 +		--sysconfdir=/etc \
    1.29 +		--with-libarch=lib \
    1.30 +		--with-mysql=/usr --with-ffmpeg=/usr \
    1.31 +		--with-webuser=www --with-webgroup=www \
    1.32 +		--with-webdir=/usr/share/zoneminder/www \
    1.33 +		--with-cgidir=/usr/share/zoneminder/cgi-bin \
    1.34 +		--enable-mmap=no \
    1.35 +		$CONFIGURE_ARGS &&
    1.36 +	make &&
    1.37 +	make DESTDIR=$DESTDIR install
    1.38 +}
    1.39 +
    1.40 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.41 +genpkg_rules()
    1.42 +{
    1.43 +	cp -a $_pkg/* $stuff/* $fs
    1.44 +	cp $src/db/zm_create.sql $fs/usr/share/zoneminder
    1.45 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/zoneminder/stuff/etc/logrotate.d/zoneminder	Wed Jul 11 17:31:06 2012 +0200
     2.3 @@ -0,0 +1,8 @@
     2.4 +/var/log/zm/*.log {
     2.5 +	missingok
     2.6 +	notifempty
     2.7 +	sharedscripts
     2.8 +	postrotate
     2.9 +		/usr/bin/zmpkg.pl logrot 2>&1 /dev/null || true
    2.10 +	endscript
    2.11 +}		
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/zoneminder/stuff/etc/mysql.d/zoneminder	Wed Jul 11 17:31:06 2012 +0200
     3.3 @@ -0,0 +1,13 @@
     3.4 +#!/bin/sh
     3.5 +
     3.6 +mysqldump zm > /dev/null 2>&1 || mysql <<EOT
     3.7 +create database zm;
     3.8 +use zm;
     3.9 +
    3.10 +\. /usr/share/zoneminder/zm_create.sql
    3.11 +
    3.12 +grant select,insert,update,delete on zm.* to 'zoneminder'@'localhost' identified by 'zoneminder';
    3.13 +flush privileges;
    3.14 +EOT
    3.15 +
    3.16 +chmod -x /etc/mysql.d/zoneminder