summaryrefslogtreecommitdiffstats
path: root/system/ZoneMinder
diff options
context:
space:
mode:
author Geno Bob <geno.bob@gmail.com>2017-04-01 06:31:12 +0700
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2017-04-01 06:32:59 +0700
commit1c1ecdc54b751cdd094fb9844100b3154290b671 (patch)
treeef62158aa8b84382b52772272bffb05d9b471c5e /system/ZoneMinder
parent9cc0eb1267c6b883512287328aa42b4bed6e4853 (diff)
downloadslackbuilds-1c1ecdc54b751cdd094fb9844100b3154290b671.tar.gz
slackbuilds-1c1ecdc54b751cdd094fb9844100b3154290b671.tar.xz
system/ZoneMinder: Updated for version 1.30.0.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/ZoneMinder')
-rw-r--r--system/ZoneMinder/README.SLACKWARE41
-rw-r--r--system/ZoneMinder/ZoneMinder.SlackBuild45
-rw-r--r--system/ZoneMinder/ZoneMinder.info12
-rw-r--r--system/ZoneMinder/doinst.sh4
4 files changed, 59 insertions, 43 deletions
diff --git a/system/ZoneMinder/README.SLACKWARE b/system/ZoneMinder/README.SLACKWARE
index af5a641bdd..c19f5391d2 100644
--- a/system/ZoneMinder/README.SLACKWARE
+++ b/system/ZoneMinder/README.SLACKWARE
@@ -2,16 +2,27 @@ README.SLACKWARE
This build uses the mmap method for camera access, as opposed to shared memory.
That means, there is no need to configure shared memory limits any more.
-You can revert back to the shm method by removing --enable-mmap from the build.
+You can revert back to the shm method by adding -DSM_NO_MMAP=ON to the build.
To use ZoneMinder, you need to have Apache, PHP and MySQL.
CONFIGURATION
-# Be sure to follow the dircetions in /etc/rc.d/rc.mysqld before you try and
+# Be sure to follow the directions in /etc/rc.d/rc.mysqld before you try and
setup your database.
+chmod 755 /etc/rc.d/rc.mysqld
+chmod 755 /etc/rc.d/rc.httpd
+
+mysql_install_db --user=mysql
+chown -R dmysql:mysql /var/lib/mysql
+mysql_install_db --user=mysql
+chmod 755 /etc/rc.d/rc.mysqld
+/etc/rc.d/rc.mysqld start
+mysql_secure_installation
+
1) Database setup:
# mysql -u root -p
+mysql -u root -p
source /usr/share/ZoneMinder/db/zm_create.sql
use mysql;
grant select,insert,update,delete on zm.* to 'zmuser'@localhost identified by 'zmpass';
@@ -20,13 +31,22 @@ quit;
Reload the mysql server with "mysqladmin reload -u root -p".
2) Apache configuration:
-Uncomment mod_php at the end of /etc/httpd/httpd.conf.
+Edit /etc/httpd/httpd.conf
+Uncomment mod_php
+Uncomment LoadModule cgid_module
+Uncomment AddHandler cgi-script .cgi
Add this line to httpd.conf:
- Include /etc/zm/zm_apache.conf
+Include /etc/httpd/extra/zm.conf# You may need to chmod +x /etc/rc.d/rc.httpd first
-# You may need to chmod +x /etc/rc.d/rc.httpd first
Restart apache with "/etc/rc.d/rc.httpd restart".
+# I also had to add a line to my php.ini file for my time zone
+[Date]
+; Defines the default timezone used by the date functions
+; http://php.net/date.timezone
+date.timezone = America/Los_Angeles
+
+
To make ZoneMinder launch on system boot:
/etc/rc.d/rc.local:
==================================
@@ -48,3 +68,14 @@ on how to counter the massive amount of syslog spam that ZoneMinder generates.
The ZoneMinder web interface shall be available at http://hostname/zm/
Have fun!
+
+
+If you use sbopkg, use sqg to generate queuefile for dependencies:
+sqg -p ZoneMinder
+sbopkg -i ZoneMinder (pick Queue)
+
+OPTIONAL
+sbopkg -i perl-Mozilla-CA -i perl-IO-Socket-SSL -i Net-SSLeay -i perl-LWP-Protocol-https
+
+If you choose to install ffmpeg, this is the sbopkg build line I used.
+sbopkg -i xvidcore -i x264 -i twolame -i lame -i ffmpeg
diff --git a/system/ZoneMinder/ZoneMinder.SlackBuild b/system/ZoneMinder/ZoneMinder.SlackBuild
index b659efa583..7fad4633e2 100644
--- a/system/ZoneMinder/ZoneMinder.SlackBuild
+++ b/system/ZoneMinder/ZoneMinder.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=ZoneMinder
-VERSION=${VERSION:-1.27.0}
+VERSION=${VERSION:-1.30.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -36,7 +36,7 @@ CGIROOT=${CGIROOT:-"/srv/httpd/cgi-bin"}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -47,8 +47,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -67,7 +67,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/v$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
tar xvf $CWD/cambozola-$CAMBOZOLA_VERSION.tar.gz
unzip $CWD/jscalendar-$JSCALENDAR_VERSION.zip
@@ -78,39 +78,24 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Regenerate files for automake/autoconf.
-./bootstrap.sh
-
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS -D__STDC_CONSTANT_MACROS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc/zm \
- --localstatedir=/var \
- --mandir=/usr/man \
- --build=$ARCH-slackware-linux \
- --with-libarch=lib${LIBDIRSUFFIX} \
- --with-mysql=/usr \
- --with-ffmpeg=/usr \
- --with-webdir=$DOCROOT \
- --with-cgidir=$CGIROOT \
- --with-webuser=$DOCOWN \
- --with-webgroup=$DOCGRP \
- --disable-debug \
- --enable-mmap=yes
+cd $TMP/$PRGNAM-$VERSION
+cmake -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_LIBRARY_PATH=/usr/lib${LIBDIRSUFFIX} \
+ -DZM_WEBDIR=$DOCROOT \
+ -DZM_CGIDIR=$CGIROOT \
+ -DZM_WEB_USER=$DOCOWN \
+ -DZM_WEB_GROUP=$DOCGRP .
make
make install DESTDIR=$PKG INSTALLDIRS=vendor INSTALLVENDORMAN3DIR=/usr/man/man3
-# Strip binaries
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-# Compress manpages
find $PKG/usr/man -type f -exec gzip -9 {} \;
-# Remove junk files and dirs
find $PKG -name perllocal.pod \
-o -name ".packlist" \
-o -name "*.bs" \
@@ -130,10 +115,11 @@ mkdir -p $PKG/etc/logrotate.d/
cat $CWD/zm_logrotate > $PKG/etc/logrotate.d/zm.new
# Install apache config
-sed "s%@DOCROOT@%$DOCROOT%" $CWD/zm_apache.conf > $PKG/etc/zm/zm_apache.conf.new
+mkdir -p $PKG/etc/httpd/extra
+cp $TMP/$PRGNAM-$VERSION/misc/apache.conf $PKG/etc/httpd/extra/zm.conf.new
# Do not clobber the config file
-mv $PKG/etc/zm/zm.conf $PKG/etc/zm/zm.conf.new
+mv $PKG/etc/zm.conf $PKG/etc/zm.conf.new
# Install startup script
install -D -m 644 scripts/zm $PKG/etc/rc.d/rc.zm.new
@@ -153,7 +139,6 @@ mkdir -p $PKG/tmp
chmod 777 $PKG/tmp
chmod +t $PKG/tmp
-# Copy documentation
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS ChangeLog INSTALL NEWS TODO $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
diff --git a/system/ZoneMinder/ZoneMinder.info b/system/ZoneMinder/ZoneMinder.info
index 7ab5d0c056..1c46a9dbed 100644
--- a/system/ZoneMinder/ZoneMinder.info
+++ b/system/ZoneMinder/ZoneMinder.info
@@ -1,14 +1,14 @@
PRGNAM="ZoneMinder"
-VERSION="1.27.0"
+VERSION="1.30.0"
HOMEPAGE="http://www.zoneminder.com"
-DOWNLOAD="https://github.com/ZoneMinder/ZoneMinder/archive/v1.27.0.tar.gz \
+DOWNLOAD="https://github.com/ZoneMinder/ZoneMinder/releases/download/v1.30.0/ZoneMinder-1.30.0.tar.gz \
http://www.andywilcock.com/code/cambozola/cambozola-0.935.tar.gz \
http://downloads.sourceforge.net/jscalendar/jscalendar-1.0.zip"
-MD5SUM="9ff149baa1a0d04931fbafcdb3200fab \
+MD5SUM="590c5c4ee35cd5677983dc76b391c415 \
6c48fd994685d4d72668850eeb613e24 \
10f2160fe68294013efcd1473cd36f72"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="perl-Date-Manip perl-Sys-Mmap perl-LWP-Protocol-https"
-MAINTAINER="Gene Baxter"
-EMAIL="GenoBob@gmail.com"
+REQUIRES="perl-Module-Build perl-Date-Manip perl-Sys-Mmap libwww-perl perl-Sys-CPU perl-Sys-MemInfo"
+MAINTAINER="Geno Bob"
+EMAIL="geno.bob@gmail.com"
diff --git a/system/ZoneMinder/doinst.sh b/system/ZoneMinder/doinst.sh
index 1b16b9b8f2..3d3b339c80 100644
--- a/system/ZoneMinder/doinst.sh
+++ b/system/ZoneMinder/doinst.sh
@@ -11,8 +11,8 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-config etc/zm/zm.conf.new
-config etc/zm/zm_apache.conf.new
+config etc/zm.conf.new
+config etc/httpd/extra/zm.conf.new
config etc/logrotate.d/zm.new
config etc/rc.d/rc.zm.new