wok-next rev 13247

Move from undigest: zoneminder
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Aug 14 13:39:33 2012 +0200 (2012-08-14)
parents 532929a9f473
children 58689c13dd4b
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	Tue Aug 14 13:39:33 2012 +0200
     1.3 @@ -0,0 +1,47 @@
     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-svn x264 perl perl-dbi-dbd \
    1.17 +perl-dbd-mysql perl-time-hires perl-getopt-long perl-date-manip perl-libwww \
    1.18 +perl-archive-zip"
    1.19 +BUILD_DEPENDS="mysql-dev jpeg-dev ffmpeg-svn-dev gnutls-dev \
    1.20 +linux-api-headers $DEPENDS"
    1.21 +
    1.22 +# Rules to configure and make the package.
    1.23 +compile_rules()
    1.24 +{
    1.25 +	cd $src
    1.26 +	sed -i 's/.*fcntl.h.*/#include <limits.h>\n&/' src/zm_event.cpp \
    1.27 +		src/zm_local_camera.cpp
    1.28 +	CXXFLAGS=-D__STDC_CONSTANT_MACROS \
    1.29 +	./configure --prefix=/usr --infodir=/usr/share/info \
    1.30 +		--mandir=/usr/share/man \
    1.31 +		--sysconfdir=/etc \
    1.32 +		--with-libarch=lib \
    1.33 +		--with-mysql=/usr --with-ffmpeg=/usr \
    1.34 +		--with-webuser=www --with-webgroup=www \
    1.35 +		--with-webdir=/usr/share/zoneminder/www \
    1.36 +		--with-cgidir=/usr/share/zoneminder/cgi-bin \
    1.37 +		--enable-mmap=no \
    1.38 +		$CONFIGURE_ARGS &&
    1.39 +	make &&
    1.40 +	make -j 1 DESTDIR=$DESTDIR install
    1.41 +}
    1.42 +
    1.43 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.44 +genpkg_rules()
    1.45 +{
    1.46 +	cp -a $_pkg/* $stuff/* $fs
    1.47 +	cp $src/db/zm_create.sql $fs/usr/share/zoneminder
    1.48 +	chown -R root.root $fs/usr/share/zoneminder/zm_create.sql \
    1.49 +		$fs/usr/lib/perl* $fs/etc/*.d/zoneminder
    1.50 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/zoneminder/stuff/etc/logrotate.d/zoneminder	Tue Aug 14 13:39:33 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	Tue Aug 14 13:39:33 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