Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions

10
security/zoneminder/DESCR Normal file
View File

@@ -0,0 +1,10 @@
ZoneMinder is intended for use in single or multi-camera video security
applications, including commercial or home CCTV, theft prevention and child,
family member or home monitoring and other domestic care scenarios such as
nanny cam installations. It supports capture, analysis, recording, and
monitoring of video data coming from one or more video or network cameras
attached to a 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 DIY 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.

View File

@@ -0,0 +1,52 @@
===========================================================================
$NetBSD: MESSAGE,v 1.2 2013/03/15 02:56:56 dsainty Exp $
All documentation for ZoneMinder is now online at:
http://www.zoneminder.com/wiki/index.php/Documentation
Performance:
ZoneMinder benefits dramatically from using libjpeg-turbo. Consider
building from Pkgsrc with:
JPEG_DEFAULT=libjpeg-turbo
To get ZoneMinder started a MySQL database is required.
First, create a MySQL user "zmuser":
echo "create user 'zmuser'@'localhost' identified by 'zmpass';" | mysql -u root
The default password is "zmpass". You may change this to something else, and
update ZM_DB_PASS in ${PKG_SYSCONFDIR}/zm.conf.
Create the initial database via:
mysql -u root < ${PREFIX}/share/zoneminder/db/zm_create.sql
Assign rights to the "zmuser" user via:
echo "grant all on * to 'zmuser';" | mysql -u root zm
Upgrade a database from an older version of ZoneMinder via:
zmupdate.pl -u root [-p <password>]
To enable the web interface via Apache, add the following line to httpd.conf:
Include ${PREFIX}/share/examples/zoneminder/apache/zoneminder.conf
Also follow the configuration instructions for www/ap-php and
databases/php-mysql packages. Use pkg_info to read their MESSAGE files.
PHP may log warnings if the PHP date.timezone configuration is not set.
Consider assigning a default system time zone to date.timezone in
${PKG_SYSCONFDIR}/php.ini.
===========================================================================

View File

@@ -0,0 +1,192 @@
# $NetBSD: Makefile,v 1.5 2013/05/31 12:41:58 wiz Exp $
#
DISTNAME= ZoneMinder-1.25.0
PKGNAME= ${DISTNAME:S/ZoneMinder-/zoneminder-/}
PKGREVISION= 2
CATEGORIES= security
MASTER_SITES= http://www2.zoneminder.com/downloads/
MAINTAINER= dsainty@NetBSD.org
HOMEPAGE= http://www.zoneminder.com/
COMMENT= Video camera security and surveillance solution
LICENSE= gnu-gpl-v2
PKG_DESTDIR_SUPPORT= user-destdir
PKG_OPTIONS_VAR= PKG_OPTIONS.zoneminder
PKG_SUPPORTED_OPTIONS= apache
PKG_SUGGESTED_OPTIONS= apache
.include "../../mk/bsd.options.mk"
GNU_CONFIGURE= yes
USE_LANGUAGES= c c++
USE_TOOLS+= aclocal autoconf autoheader automake gmake perl
# MIME::Entity is needed from p5-MIME-tools
# LWP::UserAgent is needed from p5-libwww
DEPENDS+= p5-Archive-Zip-[0-9]*:../../archivers/p5-Archive-Zip
DEPENDS+= p5-Date-Manip-[0-9]*:../../devel/p5-Date-Manip
DEPENDS+= p5-Device-SerialPort-[0-9]*:../../comms/p5-Device-SerialPort
DEPENDS+= p5-DBD-mysql-[0-9]*:../../databases/p5-DBD-mysql
DEPENDS+= p5-MIME-Lite-[0-9]*:../../mail/p5-MIME-Lite
DEPENDS+= p5-MIME-tools-[0-9]*:../../mail/p5-MIME-tools
DEPENDS+= p5-PHP-Serialization-[0-9]*:../../devel/p5-PHP-Serialization
DEPENDS+= p5-Time-HiRes-[0-9]*:../../time/p5-Time-HiRes
DEPENDS+= p5-libwww-[0-9]*:../../www/p5-libwww
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
ZM_HTTPD_ROOT= share/zoneminder/htdocs
PLIST_SUBST+= ZM_HTTPD_ROOT=${ZM_HTTPD_ROOT:Q}
OWN_DIRS+= ${ZM_HTTPD_ROOT:Q}
ZM_HTTPD_CGIBIN= libexec/zoneminder/cgi-bin
PLIST_SUBST+= ZM_HTTPD_CGIBIN=${ZM_HTTPD_CGIBIN:Q}
BUILD_DEFS+= ZM_HTTPD_CGIBIN
OWN_DIRS+= ${ZM_HTTPD_CGIBIN:Q}
INSTALLATION_DIRS+= share/zoneminder ${ZM_HTTPD_ROOT}
INSTALLATION_DIRS+= libexec/zoneminder ${ZM_HTTPD_CGIBIN}
BUILD_DEFS+= VARBASE
CONFIGURE_ARGS+= --with-webdir=${PREFIX}/${ZM_HTTPD_ROOT:Q}
CONFIGURE_ARGS+= --with-cgidir=${PREFIX}/${ZM_HTTPD_CGIBIN:Q}
CONFIGURE_ARGS+= --with-mysql=${BUILDLINK_PREFIX.mysql-client}
CONFIGURE_ARGS+= --localstatedir=${VARBASE}
CONFIGURE_ENV+= OPT_NETPBM=yes
CONFIGURE_ENV+= PATH_NETPBM=${PREFIX}/bin/pnmscale
.include "../../multimedia/ffmpeg010/buildlink3.mk"
CONFIGURE_ARGS+= --with-ffmpeg=${BUILDLINK_PREFIX.ffmpeg010}
CONFIGURE_ENV+= PATH_FFMPEG=${BUILDLINK_PREFIX.ffmpeg010}/bin/ffmpeg010
CONFIGURE_ENV+= OPT_FFMPEG=yes
# The backtrace requires Linux's unportable <execinfo.h> header.
CONFIGURE_ARGS+= --enable-crashtrace=no
# Need Perl Sys::Mmap module for (default) mmap support.
CONFIGURE_ARGS+= --enable-mmap=no
# This is somewhat awkward. ffmpeg's libavformat/avformat.h requires
# constant macros from stdint.h, but these are only defined under C++ if
# __STDC_CONSTANT_MACROS is requested, so we have to do that on behalf
# of ffmpeg. Failure to do so causes configure time failures, and
# build failures complaining about UINT64_C not being defined.
CFLAGS+= -D__STDC_CONSTANT_MACROS
# Since MySQL uses openssl, use the same library instead of defaulting to
# gnutls.
CONFIGURE_ENV+= ZM_SSL_LIB=openssl
# Control where run-time state (PID file) gets stored.
CONFIGURE_ENV+= ZM_RUNDIR=${VARBASE}/run
.if !empty(PKG_OPTIONS:Mapache)
.include "../../mk/apache.mk"
PKG_USERS_VARS+= APACHE_USER
PKG_GROUPS_VARS+= APACHE_GROUP
BUILD_DEFS+= APACHE_USER APACHE_GROUP
# This directory contains no useful state, so use MAKE_DIRS instead of
# OWN_DIRS.
MAKE_DIRS_PERMS+= ${VARBASE}/run/zm ${ROOT_USER} ${APACHE_GROUP} 775
CONFIGURE_ARGS+= --with-webuser=${APACHE_USER}
CONFIGURE_ARGS+= --with-webgroup=${APACHE_GROUP}
# If we're using Apache we're going to need PHP, and PHP MySQL support.
.include "../../lang/php/phpversion.mk"
DEPENDS+= ${APACHE_PKG_PREFIX}-${PHP_PKG_PREFIX}-[0-9]*:../../www/ap-php
DEPENDS+= ${PHP_PKG_PREFIX}-mysql-[0-9]*:../../databases/php-mysql
.endif
# This directory contains state, so use OWN_DIRS instead of MAKE_DIRS.
ZM_CACHE= ${VARBASE}/cache/zoneminder
OWN_DIRS_PERMS+= ${ZM_CACHE} ${ROOT_USER} ${ROOT_GROUP} 755
OWN_DIRS_PERMS+= ${ZM_CACHE}/temp ${ROOT_USER} ${APACHE_GROUP} 775
OWN_DIRS_PERMS+= ${ZM_CACHE}/images ${ROOT_USER} ${APACHE_GROUP} 775
OWN_DIRS_PERMS+= ${ZM_CACHE}/events ${ROOT_USER} ${APACHE_GROUP} 775
REPLACE_PERL+= scripts/zmaudit.pl.in
REPLACE_PERL+= scripts/zmcontrol.pl.in
REPLACE_PERL+= scripts/zmdc.pl.in
REPLACE_PERL+= scripts/zmfilter.pl.in
REPLACE_PERL+= scripts/zmpkg.pl.in
REPLACE_PERL+= scripts/zmtrack.pl.in
REPLACE_PERL+= scripts/zmtrigger.pl.in
REPLACE_PERL+= scripts/zmupdate.pl.in
REPLACE_PERL+= scripts/zmvideo.pl.in
REPLACE_PERL+= scripts/zmwatch.pl.in
REPLACE_PERL+= scripts/zmx10.pl.in
SUBST_CLASSES+= dbpaths-path
SUBST_MESSAGE.dbpaths-path= Adjusting default paths in configuration.
SUBST_STAGE.dbpaths-path= pre-configure
SUBST_FILES.dbpaths-path= db/zm_create.sql.in
SUBST_SED.dbpaths-path= -e 's|/usr/local/bin/|${PREFIX}/bin/|g'
SUBST_SED.dbpaths-path+= -e 's|/usr/bin|${PREFIX}/bin|g'
SUBST_SED.dbpaths-path+= -e 's|/cgi-bin/nph-zms|/zm/cgi-bin/nph-zms|g'
# Required to find the 'mysql' client executable.
SUBST_CLASSES+= script-path
SUBST_MESSAGE.script-path= Adjusting paths in scripts.
SUBST_STAGE.script-path= pre-configure
SUBST_FILES.script-path= scripts/zmupdate.pl.in
SUBST_SED.script-path= -e 's|/usr/local/bin|${PREFIX}/bin|g'
SUBST_CLASSES+= files
SUBST_STAGE.files= pre-configure
SUBST_FILES.files= zoneminder.conf
SUBST_SED.files= -e "s|@ZM_HTTPD_ROOT@|${PREFIX}/${ZM_HTTPD_ROOT}|g"
SUBST_SED.files+= -e "s|@ZM_HTTPD_CGIBIN@|${PREFIX}/${ZM_HTTPD_CGIBIN}|g"
SUBST_MESSAGE.files= Fixing ZoneMinder configuration file for Apache.
post-extract:
${CP} ${FILESDIR}/zoneminder.conf ${WRKSRC}/zoneminder.conf
pre-configure:
set -e; cd ${WRKSRC}; \
aclocal; autoheader; automake -a --foreign -i; autoconf
#
# Arrange for module.mk to perform its magic here on top of the non-Perl
# build tasks.
#
PERL5_REQD+= 5.6.0
PERL5_CONFIGURE= no
PERL5_CONFIGURE_DIRS= ${WRKSRC}/scripts/ZoneMinder
PERL5_PACKLIST= auto/ZoneMinder/.packlist
.include "../../lang/perl5/module.mk"
post-configure: perl5-configure
EGDIR= share/examples/${PKGBASE}
INSTALLATION_DIRS+= ${EGDIR} ${EGDIR}/config ${EGDIR}/apache
CONF_FILES+= ${PREFIX}/${EGDIR}/config/zm.conf ${PKG_SYSCONFDIR}/zm.conf
INSTALLATION_DIRS+= bin share/examples/rc.d share/zoneminder/db
post-install:
${INSTALL_DATA} ${WRKSRC}/zoneminder.conf ${DESTDIR}${PREFIX}/${EGDIR}/apache/zoneminder.conf
${INSTALL_DATA} ${WRKSRC}/zm.conf ${DESTDIR}${PREFIX}/${EGDIR}/config/zm.conf
${INSTALL_SCRIPT} ${WRKSRC}/scripts/zm ${DESTDIR}${PREFIX}/share/examples/rc.d/zoneminder
${INSTALL_DATA} ${WRKSRC}/db/*.sql ${DESTDIR}${PREFIX}/share/zoneminder/db/
rmdir ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/events || true
rmdir ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/images || true
${LN} -s ${ZM_CACHE}/temp ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/temp
${LN} -s ${ZM_CACHE}/events ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/events
${LN} -s ${ZM_CACHE}/images ${DESTDIR}${PREFIX}/${ZM_HTTPD_ROOT:Q}/images
.include "../../mk/dlopen.buildlink3.mk"
.include "../../mk/jpeg.buildlink3.mk"
.include "../../mk/mysql.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../archivers/bzip2/buildlink3.mk"
.include "../../devel/pcre/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../graphics/netpbm/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

300
security/zoneminder/PLIST Normal file
View File

@@ -0,0 +1,300 @@
@comment $NetBSD: PLIST,v 1.1 2013/03/15 02:01:47 dsainty Exp $
bin/zma
bin/zmaudit.pl
bin/zmc
bin/zmcontrol.pl
bin/zmdc.pl
bin/zmf
bin/zmfilter.pl
bin/zmfix
bin/zmpkg.pl
bin/zmstreamer
bin/zmtrack.pl
bin/zmtrigger.pl
bin/zmu
bin/zmupdate.pl
bin/zmvideo.pl
bin/zmwatch.pl
bin/zmx10.pl
${ZM_HTTPD_CGIBIN}/nph-zms
${ZM_HTTPD_CGIBIN}/zms
share/examples/rc.d/zoneminder
share/examples/zoneminder/apache/zoneminder.conf
share/examples/zoneminder/config/zm.conf
share/zoneminder/db/zm_create.sql
share/zoneminder/db/zm_update-0.0.1.sql
share/zoneminder/db/zm_update-0.9.10.sql
share/zoneminder/db/zm_update-0.9.11.sql
share/zoneminder/db/zm_update-0.9.12.sql
share/zoneminder/db/zm_update-0.9.13.sql
share/zoneminder/db/zm_update-0.9.15.sql
share/zoneminder/db/zm_update-0.9.16.sql
share/zoneminder/db/zm_update-0.9.7.sql
share/zoneminder/db/zm_update-0.9.8.sql
share/zoneminder/db/zm_update-0.9.9.sql
share/zoneminder/db/zm_update-1.17.1.sql
share/zoneminder/db/zm_update-1.17.2.sql
share/zoneminder/db/zm_update-1.18.0.sql
share/zoneminder/db/zm_update-1.18.1.sql
share/zoneminder/db/zm_update-1.19.0.sql
share/zoneminder/db/zm_update-1.19.1.sql
share/zoneminder/db/zm_update-1.19.2.sql
share/zoneminder/db/zm_update-1.19.3.sql
share/zoneminder/db/zm_update-1.19.4.sql
share/zoneminder/db/zm_update-1.19.5.sql
share/zoneminder/db/zm_update-1.20.0.sql
share/zoneminder/db/zm_update-1.20.1.sql
share/zoneminder/db/zm_update-1.21.0.sql
share/zoneminder/db/zm_update-1.21.1.sql
share/zoneminder/db/zm_update-1.21.2.sql
share/zoneminder/db/zm_update-1.21.3.sql
share/zoneminder/db/zm_update-1.21.4.sql
share/zoneminder/db/zm_update-1.22.0.sql
share/zoneminder/db/zm_update-1.22.1.sql
share/zoneminder/db/zm_update-1.22.2.sql
share/zoneminder/db/zm_update-1.22.3.sql
share/zoneminder/db/zm_update-1.23.0.sql
share/zoneminder/db/zm_update-1.23.1.sql
share/zoneminder/db/zm_update-1.23.2.sql
share/zoneminder/db/zm_update-1.23.3.sql
share/zoneminder/db/zm_update-1.24.0.sql
share/zoneminder/db/zm_update-1.24.1.sql
share/zoneminder/db/zm_update-1.24.2.sql
share/zoneminder/db/zm_update-1.24.3.sql
share/zoneminder/db/zm_update-1.24.4.sql
${ZM_HTTPD_ROOT}/ajax/alarm.php
${ZM_HTTPD_ROOT}/ajax/control.php
${ZM_HTTPD_ROOT}/ajax/event.php
${ZM_HTTPD_ROOT}/ajax/log.php
${ZM_HTTPD_ROOT}/ajax/status.php
${ZM_HTTPD_ROOT}/ajax/stream.php
${ZM_HTTPD_ROOT}/ajax/zone.php
${ZM_HTTPD_ROOT}/css/overlay.css
${ZM_HTTPD_ROOT}/css/reset.css
${ZM_HTTPD_ROOT}/css/spinner.css
${ZM_HTTPD_ROOT}/events
${ZM_HTTPD_ROOT}/graphics/favicon.ico
${ZM_HTTPD_ROOT}/graphics/spinner.gif
${ZM_HTTPD_ROOT}/graphics/transparent.gif
${ZM_HTTPD_ROOT}/images
${ZM_HTTPD_ROOT}/includes/actions.php
${ZM_HTTPD_ROOT}/includes/config.php
${ZM_HTTPD_ROOT}/includes/control_functions.php
${ZM_HTTPD_ROOT}/includes/database.php
${ZM_HTTPD_ROOT}/includes/functions.php
${ZM_HTTPD_ROOT}/includes/lang.php
${ZM_HTTPD_ROOT}/includes/logger.php
${ZM_HTTPD_ROOT}/index.php
${ZM_HTTPD_ROOT}/js/logger.js
${ZM_HTTPD_ROOT}/js/mootools.ext.js
${ZM_HTTPD_ROOT}/js/overlay.js
${ZM_HTTPD_ROOT}/lang/big5_big5.php
${ZM_HTTPD_ROOT}/lang/cn_zh.php
${ZM_HTTPD_ROOT}/lang/cs_cz.php
${ZM_HTTPD_ROOT}/lang/de_de.php
${ZM_HTTPD_ROOT}/lang/dk_dk.php
${ZM_HTTPD_ROOT}/lang/en_gb.php
${ZM_HTTPD_ROOT}/lang/en_us.php
${ZM_HTTPD_ROOT}/lang/es_ar.php
${ZM_HTTPD_ROOT}/lang/et_ee.php
${ZM_HTTPD_ROOT}/lang/fr_fr.php
${ZM_HTTPD_ROOT}/lang/he_il.php
${ZM_HTTPD_ROOT}/lang/hu_hu.php
${ZM_HTTPD_ROOT}/lang/it_it.php
${ZM_HTTPD_ROOT}/lang/ja_jp.php
${ZM_HTTPD_ROOT}/lang/nl_nl.php
${ZM_HTTPD_ROOT}/lang/pl_pl.php
${ZM_HTTPD_ROOT}/lang/pt_br.php
${ZM_HTTPD_ROOT}/lang/ro_ro.php
${ZM_HTTPD_ROOT}/lang/ru_ru.php
${ZM_HTTPD_ROOT}/lang/se_se.php
${ZM_HTTPD_ROOT}/skins/classic/css/control.css
${ZM_HTTPD_ROOT}/skins/classic/css/export.css
${ZM_HTTPD_ROOT}/skins/classic/css/skin.css
${ZM_HTTPD_ROOT}/skins/classic/graphics/arrow-d.gif
${ZM_HTTPD_ROOT}/skins/classic/graphics/arrow-dl.gif
${ZM_HTTPD_ROOT}/skins/classic/graphics/arrow-dr.gif
${ZM_HTTPD_ROOT}/skins/classic/graphics/arrow-l-d.gif
${ZM_HTTPD_ROOT}/skins/classic/graphics/arrow-l-u.gif
${ZM_HTTPD_ROOT}/skins/classic/graphics/arrow-l.gif
${ZM_HTTPD_ROOT}/skins/classic/graphics/arrow-r.gif
${ZM_HTTPD_ROOT}/skins/classic/graphics/arrow-s-d.gif
${ZM_HTTPD_ROOT}/skins/classic/graphics/arrow-s-u.gif
${ZM_HTTPD_ROOT}/skins/classic/graphics/arrow-u.gif
${ZM_HTTPD_ROOT}/skins/classic/graphics/arrow-ul.gif
${ZM_HTTPD_ROOT}/skins/classic/graphics/arrow-ur.gif
${ZM_HTTPD_ROOT}/skins/classic/graphics/center.gif
${ZM_HTTPD_ROOT}/skins/classic/graphics/point-g.gif
${ZM_HTTPD_ROOT}/skins/classic/graphics/point-o.gif
${ZM_HTTPD_ROOT}/skins/classic/graphics/point-r.gif
${ZM_HTTPD_ROOT}/skins/classic/graphics/seq-d.gif
${ZM_HTTPD_ROOT}/skins/classic/graphics/seq-u.gif
${ZM_HTTPD_ROOT}/skins/classic/includes/config.php
${ZM_HTTPD_ROOT}/skins/classic/includes/control_functions.php
${ZM_HTTPD_ROOT}/skins/classic/includes/export_functions.php
${ZM_HTTPD_ROOT}/skins/classic/includes/functions.php
${ZM_HTTPD_ROOT}/skins/classic/includes/init.php
${ZM_HTTPD_ROOT}/skins/classic/includes/timeline_functions.php
${ZM_HTTPD_ROOT}/skins/classic/js/skin.js
${ZM_HTTPD_ROOT}/skins/classic/js/skin.js.php
${ZM_HTTPD_ROOT}/skins/classic/skin.php
${ZM_HTTPD_ROOT}/skins/classic/views/Makefile.am
${ZM_HTTPD_ROOT}/skins/classic/views/bandwidth.php
${ZM_HTTPD_ROOT}/skins/classic/views/blank.php
${ZM_HTTPD_ROOT}/skins/classic/views/console.php
${ZM_HTTPD_ROOT}/skins/classic/views/control.php
${ZM_HTTPD_ROOT}/skins/classic/views/controlcap.php
${ZM_HTTPD_ROOT}/skins/classic/views/controlcaps.php
${ZM_HTTPD_ROOT}/skins/classic/views/controlpreset.php
${ZM_HTTPD_ROOT}/skins/classic/views/css/console.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/control.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/controlcaps.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/devices.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/event.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/events.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/export.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/filter.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/frame.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/frames.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/groups.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/log.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/monitor.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/montage.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/montage_2wide.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/montage_3wide.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/montage_3wide50enlarge.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/montage_4wide.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/montage_freeform.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/options.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/stats.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/timeline.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/timeline.css.php
${ZM_HTTPD_ROOT}/skins/classic/views/css/video.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/watch.css
${ZM_HTTPD_ROOT}/skins/classic/views/css/zone.css
${ZM_HTTPD_ROOT}/skins/classic/views/cycle.php
${ZM_HTTPD_ROOT}/skins/classic/views/device.php
${ZM_HTTPD_ROOT}/skins/classic/views/devices.php
${ZM_HTTPD_ROOT}/skins/classic/views/donate.php
${ZM_HTTPD_ROOT}/skins/classic/views/error.php
${ZM_HTTPD_ROOT}/skins/classic/views/event.php
${ZM_HTTPD_ROOT}/skins/classic/views/eventdetail.php
${ZM_HTTPD_ROOT}/skins/classic/views/events.php
${ZM_HTTPD_ROOT}/skins/classic/views/export.php
${ZM_HTTPD_ROOT}/skins/classic/views/filter.php
${ZM_HTTPD_ROOT}/skins/classic/views/filtersave.php
${ZM_HTTPD_ROOT}/skins/classic/views/frame.php
${ZM_HTTPD_ROOT}/skins/classic/views/frames.php
${ZM_HTTPD_ROOT}/skins/classic/views/function.php
${ZM_HTTPD_ROOT}/skins/classic/views/group.php
${ZM_HTTPD_ROOT}/skins/classic/views/groups.php
${ZM_HTTPD_ROOT}/skins/classic/views/js/Makefile.am
${ZM_HTTPD_ROOT}/skins/classic/views/js/console.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/console.js.php
${ZM_HTTPD_ROOT}/skins/classic/views/js/control.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/controlpreset.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/controlpreset.js.php
${ZM_HTTPD_ROOT}/skins/classic/views/js/cycle.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/cycle.js.php
${ZM_HTTPD_ROOT}/skins/classic/views/js/devices.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/donate.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/donate.js.php
${ZM_HTTPD_ROOT}/skins/classic/views/js/event.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/event.js.php
${ZM_HTTPD_ROOT}/skins/classic/views/js/events.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/events.js.php
${ZM_HTTPD_ROOT}/skins/classic/views/js/export.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/export.js.php
${ZM_HTTPD_ROOT}/skins/classic/views/js/filter.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/filter.js.php
${ZM_HTTPD_ROOT}/skins/classic/views/js/group.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/groups.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/log.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/login.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/monitor.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/monitor.js.php
${ZM_HTTPD_ROOT}/skins/classic/views/js/monitorpreset.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/monitorprobe.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/montage.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/montage.js.php
${ZM_HTTPD_ROOT}/skins/classic/views/js/options.js.php
${ZM_HTTPD_ROOT}/skins/classic/views/js/postlogin.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/state.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/state.js.php
${ZM_HTTPD_ROOT}/skins/classic/views/js/timeline.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/timeline.js.php
${ZM_HTTPD_ROOT}/skins/classic/views/js/user.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/version.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/version.js.php
${ZM_HTTPD_ROOT}/skins/classic/views/js/video.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/video.js.php
${ZM_HTTPD_ROOT}/skins/classic/views/js/watch.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/watch.js.php
${ZM_HTTPD_ROOT}/skins/classic/views/js/zone.js
${ZM_HTTPD_ROOT}/skins/classic/views/js/zone.js.php
${ZM_HTTPD_ROOT}/skins/classic/views/log.php
${ZM_HTTPD_ROOT}/skins/classic/views/login.php
${ZM_HTTPD_ROOT}/skins/classic/views/logout.php
${ZM_HTTPD_ROOT}/skins/classic/views/monitor.php
${ZM_HTTPD_ROOT}/skins/classic/views/monitorpreset.php
${ZM_HTTPD_ROOT}/skins/classic/views/monitorprobe.php
${ZM_HTTPD_ROOT}/skins/classic/views/montage.php
${ZM_HTTPD_ROOT}/skins/classic/views/none.php
${ZM_HTTPD_ROOT}/skins/classic/views/optionhelp.php
${ZM_HTTPD_ROOT}/skins/classic/views/options.php
${ZM_HTTPD_ROOT}/skins/classic/views/postlogin.php
${ZM_HTTPD_ROOT}/skins/classic/views/settings.php
${ZM_HTTPD_ROOT}/skins/classic/views/state.php
${ZM_HTTPD_ROOT}/skins/classic/views/stats.php
${ZM_HTTPD_ROOT}/skins/classic/views/status.php
${ZM_HTTPD_ROOT}/skins/classic/views/timeline.php
${ZM_HTTPD_ROOT}/skins/classic/views/user.php
${ZM_HTTPD_ROOT}/skins/classic/views/version.php
${ZM_HTTPD_ROOT}/skins/classic/views/video.php
${ZM_HTTPD_ROOT}/skins/classic/views/watch.php
${ZM_HTTPD_ROOT}/skins/classic/views/zone.php
${ZM_HTTPD_ROOT}/skins/classic/views/zones.php
${ZM_HTTPD_ROOT}/skins/mobile/css/skin.css
${ZM_HTTPD_ROOT}/skins/mobile/includes/config.php
${ZM_HTTPD_ROOT}/skins/mobile/includes/control_functions.php
${ZM_HTTPD_ROOT}/skins/mobile/includes/functions.php
${ZM_HTTPD_ROOT}/skins/mobile/includes/init.php
${ZM_HTTPD_ROOT}/skins/mobile/skin.php
${ZM_HTTPD_ROOT}/skins/mobile/views/console.php
${ZM_HTTPD_ROOT}/skins/mobile/views/css/console.css
${ZM_HTTPD_ROOT}/skins/mobile/views/devices.php
${ZM_HTTPD_ROOT}/skins/mobile/views/error.php
${ZM_HTTPD_ROOT}/skins/mobile/views/event.php
${ZM_HTTPD_ROOT}/skins/mobile/views/eventdetails.php
${ZM_HTTPD_ROOT}/skins/mobile/views/events.php
${ZM_HTTPD_ROOT}/skins/mobile/views/filter.php
${ZM_HTTPD_ROOT}/skins/mobile/views/frame.php
${ZM_HTTPD_ROOT}/skins/mobile/views/function.php
${ZM_HTTPD_ROOT}/skins/mobile/views/login.php
${ZM_HTTPD_ROOT}/skins/mobile/views/montage.php
${ZM_HTTPD_ROOT}/skins/mobile/views/state.php
${ZM_HTTPD_ROOT}/skins/mobile/views/video.php
${ZM_HTTPD_ROOT}/skins/mobile/views/watch.php
${ZM_HTTPD_ROOT}/skins/xml/includes/config.php
${ZM_HTTPD_ROOT}/skins/xml/includes/functions.php
${ZM_HTTPD_ROOT}/skins/xml/includes/init.php
${ZM_HTTPD_ROOT}/skins/xml/skin.php
${ZM_HTTPD_ROOT}/skins/xml/views/actions.php
${ZM_HTTPD_ROOT}/skins/xml/views/console.php
${ZM_HTTPD_ROOT}/skins/xml/views/none.php
${ZM_HTTPD_ROOT}/skins/xml/views/notfound.png
${ZM_HTTPD_ROOT}/temp
${ZM_HTTPD_ROOT}/tools/mootools/mootools-core-1.3.2-nc.js
${ZM_HTTPD_ROOT}/tools/mootools/mootools-core-1.3.2-yc.js
${ZM_HTTPD_ROOT}/tools/mootools/mootools-core.js
${ZM_HTTPD_ROOT}/tools/mootools/mootools-more-1.3.2.1-nc.js
${ZM_HTTPD_ROOT}/tools/mootools/mootools-more-1.3.2.1-yc.js
${ZM_HTTPD_ROOT}/tools/mootools/mootools-more.js
${ZM_HTTPD_ROOT}/views/file.php
${ZM_HTTPD_ROOT}/views/image.php
@pkgdir ${ZM_HTTPD_ROOT}/sounds
@pkgdir ${ZM_HTTPD_ROOT}/skins/mobile/lang
@pkgdir ${ZM_HTTPD_ROOT}/skins/mobile/graphics
@pkgdir ${ZM_HTTPD_ROOT}/skins/mobile/ajax
@pkgdir ${ZM_HTTPD_ROOT}/skins/classic/lang
@pkgdir ${ZM_HTTPD_ROOT}/skins/classic/ajax

View File

@@ -0,0 +1,23 @@
$NetBSD: distinfo,v 1.3 2013/04/29 21:31:12 joerg Exp $
SHA1 (ZoneMinder-1.25.0.tar.gz) = a93a976a5cd82f1e197f4d7bd626d3f0387c4231
RMD160 (ZoneMinder-1.25.0.tar.gz) = 32a4f503770103e55bfe592864c1cab82e7395a6
Size (ZoneMinder-1.25.0.tar.gz) = 1119091 bytes
SHA1 (patch-Makefile_am) = 09b3ba7f9c292ef672506219be66f059290b6405
SHA1 (patch-configure_ac) = 87410ce8bc8fe42e08bf0e32e40b59619f7db90d
SHA1 (patch-scripts_zm_in) = 91809c9a179a0135c432a0ffad7c2d2ddfd512de
SHA1 (patch-src_Makefile_am) = 84999df8b7c80b049e2dd9cb308e12f50ed8285f
SHA1 (patch-src_zm__thread.h) = 8313d3294592fd08c775f612d70cc935e4f64d9a
SHA1 (patch-src_zm__timer.h) = 38dae4f8573c7ae6d459adddf05260ce4b6e2088
SHA1 (patch-src_zm__utils.cpp) = f6a109296146822014d57d39094390adcc5df760
SHA1 (patch-src_zm__utils.h) = 361a69dfd4e2c3e46cf6fea3e1470df2e5cfa446
SHA1 (patch-src_zm_comms_cpp) = d40932a3d0ae4375a649f200d973995d56aa71c7
SHA1 (patch-src_zm_comms_h) = baeb73040ff3ba862f23ad6301de7daba182456e
SHA1 (patch-src_zm_logger_cpp) = 3b0373e9d648d25ef4e3e09429199f654f876ccb
SHA1 (patch-src_zm_remote_camera_h) = c86b6267c295caba71ca72df02c24e6b6cba981f
SHA1 (patch-src_zm_signal_h) = 226e96d4771921a8ad23fbe130a80a43550062d3
SHA1 (patch-src_zm_thread_cpp) = c5f64697c3024c6c382f9ae2c5dbe9c21b529b6e
SHA1 (patch-src_zmc_cpp) = d1046ddfad3a88bdd30501237834ec9e9fbc4c83
SHA1 (patch-src_zmf_cpp) = 77dafa6ef6e9756b975e45b2ca41d1be85f9bf2c
SHA1 (patch-web_Makefile.am) = ddb3815fa1b1799658034789302c8d3840f2b894
SHA1 (patch-web_ajax_stream_php) = e8f811e63bedec03345b74db72c3d8014b3cc7f6

View File

@@ -0,0 +1,18 @@
# This Apache configuration puts ZoneMinder under /zm.
ScriptAlias /zm/cgi-bin/ "@ZM_HTTPD_CGIBIN@/"
<Directory "@ZM_HTTPD_CGIBIN@">
Order allow,deny
Allow from all
</Directory>
Alias /zm "@ZM_HTTPD_ROOT@"
<Directory "@ZM_HTTPD_ROOT@">
php_flag register_globals off
php_flag short_open_tag on
DirectoryIndex index.php
Order allow,deny
Allow from all
</Directory>

View File

@@ -0,0 +1,27 @@
$NetBSD: patch-Makefile_am,v 1.2 2013/03/24 16:47:47 joerg Exp $
Disable the hacks around ownership setup so Pkgsrc can take responsibility.
Don't install zm.conf at all - let Pkgsrc install it into EGDIR.
--- Makefile.am.orig 2011-05-20 09:39:37.000000000 +0000
+++ Makefile.am
@@ -4,8 +4,8 @@ AUTOMAKE_OPTIONS = gnu
webuser = @WEB_USER@
webgroup = @WEB_GROUP@
-sysconf_DATA = \
- zm.conf
+#sysconf_DATA = \
+# zm.conf
SUBDIRS = \
src \
@@ -19,7 +19,7 @@ EXTRA_DIST = \
zmconfgen.pl.in
# Yes, you are correct. This is a HACK!
-install-data-hook:
+pkgsrc-disabled-install-data-hook:
( cd $(DESTDIR)$(sysconfdir); chown $(webuser):$(webgroup) $(sysconf_DATA); chmod 600 $(sysconf_DATA) )
( if ! test -e $(ZM_RUNDIR); then mkdir -p $(ZM_RUNDIR); fi; if test "$(ZM_RUNDIR)" != "/var/run"; then chown $(webuser):$(webgroup) $(ZM_RUNDIR); chmod u+w $(ZM_RUNDIR); fi )
( if ! test -e $(ZM_TMPDIR); then mkdir -m 700 -p $(ZM_TMPDIR); fi; if test "$(ZM_TMPDIR)" != "/tmp"; then chown $(webuser):$(webgroup) $(ZM_TMPDIR); chmod u+w $(ZM_TMPDIR); fi )

View File

@@ -0,0 +1,129 @@
$NetBSD: patch-configure_ac,v 1.2 2013/03/24 16:47:47 joerg Exp $
Set PATH_BUILD to PREFIX/share/zoneminder, so that zmupdate.pl can locate the
database build scripts as installed files, not out of a probably non-existent
build directory. Correct shell syntax. Allow Pkgsrc to manage dlopen()
support.
--- configure.ac.orig 2011-08-23 15:10:32.000000000 +0000
+++ configure.ac
@@ -2,10 +2,10 @@ AC_PREREQ(2.59)
AC_INIT(zm,1.25.0,[http://www.zoneminder.com/forums/ - Please check FAQ first],ZoneMinder,http://www.zoneminder.com/downloads.html)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR(src/zm.h)
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS(config.h)
-PATH_BUILD=`pwd`
-AC_SUBST(PATH_BUILD)
+AC_DEFINE_DIR([DATA_ROOT_DIR],[datarootdir],[Expanded data directory])
+AC_SUBST(PATH_BUILD, "$DATA_ROOT_DIR/zoneminder")
TIME_BUILD=`date +'%s'`
AC_SUBST(TIME_BUILD)
@@ -19,31 +19,31 @@ AC_ARG_VAR(ZM_RUNDIR,[Location of transi
AC_ARG_VAR(ZM_TMPDIR,[Location of temporary files, default /tmp/zm])
AC_ARG_VAR(ZM_LOGDIR,[Location of generated log files, default /var/log/zm])
-if test "$ZM_DB_HOST" == ""; then
+if test "$ZM_DB_HOST" = ""; then
AC_SUBST(ZM_DB_HOST,[localhost])
fi
-if test "$ZM_DB_NAME" == ""; then
+if test "$ZM_DB_NAME" = ""; then
AC_SUBST(ZM_DB_NAME,[zm])
fi
-if test "$ZM_DB_USER" == ""; then
+if test "$ZM_DB_USER" = ""; then
AC_SUBST(ZM_DB_USER,[zmuser])
fi
-if test "$ZM_DB_PASS" == ""; then
+if test "$ZM_DB_PASS" = ""; then
AC_SUBST(ZM_DB_PASS,[zmpass])
fi
-if test "$ZM_SSL_LIB" == ""; then
+if test "$ZM_SSL_LIB" = ""; then
AC_SUBST(ZM_SSL_LIB,gnutls)
fi
-if test "$ZM_MYSQL_ENGINE" == ""; then
+if test "$ZM_MYSQL_ENGINE" = ""; then
AC_SUBST(ZM_MYSQL_ENGINE,MyISAM)
fi
-if test "$ZM_RUNDIR" == ""; then
+if test "$ZM_RUNDIR" = ""; then
AC_SUBST(ZM_RUNDIR,[/var/run/zm])
fi
-if test "$ZM_TMPDIR" == ""; then
+if test "$ZM_TMPDIR" = ""; then
AC_SUBST(ZM_TMPDIR,[/tmp/zm])
fi
-if test "$ZM_LOGDIR" == ""; then
+if test "$ZM_LOGDIR" = ""; then
AC_SUBST(ZM_LOGDIR,[/var/log/zm])
fi
@@ -203,7 +203,7 @@ AC_ARG_ENABLE(mmap,
filesystem which will normally be the case by default.
e.g. --enable-mmap=yes or --disable-mmap])
)
-if test "$ENABLE_MMAP" == "yes"; then
+if test "$ENABLE_MMAP" = "yes"; then
AC_DEFINE(ZM_MEM_MAPPED,1,"Whether to use mapped rather than shared memory")
else
AC_DEFINE(ZM_MEM_MAPPED,0,"Whether to use mapped rather than shared memory")
@@ -254,7 +254,7 @@ AC_CHECK_PROG(OPT_FFMPEG,ffmpeg,yes,no)
AC_PATH_PROG(PATH_FFMPEG,ffmpeg)
AC_CHECK_PROG(OPT_NETPBM,pnmscale,yes,no)
AC_PATH_PROG(PATH_NETPBM,pnmscale)
-if test "$OPT_NETPBM" == "yes"; then
+if test "$OPT_NETPBM" = "yes"; then
PATH_NETPBM=`dirname $PATH_NETPBM`
fi
@@ -262,8 +262,8 @@ fi
AC_CHECK_LIB(mysqlclient,mysql_init,,AC_MSG_ERROR(zm requires libmysqlclient.a))
AC_CHECK_LIB(jpeg,jpeg_start_compress,,AC_MSG_ERROR(zm requires libjpeg.a))
AC_CHECK_LIB(pthread,pthread_create,,AC_MSG_ERROR(zm requires libpthread.a))
-AC_CHECK_LIB(dl,dlsym,,AC_MSG_ERROR(zm requires libdl.a))
-if test "$ZM_SSL_LIB" == "openssl"; then
+#AC_CHECK_LIB(dl,dlsym,,AC_MSG_ERROR(zm requires libdl.a))
+if test "$ZM_SSL_LIB" = "openssl"; then
AC_CHECK_LIB(crypto,MD5,,AC_MSG_WARN([libcrypto.a is required for authenticated streaming - use ZM_SSL_LIB option to select gnutls instead]))
else
AC_CHECK_HEADERS(gcrypt.h,,AC_MSG_WARN(zm requires libgcrypt headers to be installed for gnutls),)
@@ -293,7 +293,7 @@ AC_CHECK_HEADERS(syscall.h,,,)
AC_CHECK_HEADERS(pthread.h,,,)
AC_CHECK_HEADERS(linux/videodev.h,AC_SUBST(ZM_HAS_V4L1,1),AC_SUBST(ZM_HAS_V4L1,0),)
AC_CHECK_HEADERS(linux/videodev2.h,AC_SUBST(ZM_HAS_V4L2,1),AC_SUBST(ZM_HAS_V4L2,0),)
-if test "$ZM_HAS_V4L1" == "1" || test "$ZM_HAS_V4L2" == "1"; then
+if test "$ZM_HAS_V4L1" = "1" || test "$ZM_HAS_V4L2" = "1"; then
AC_SUBST(ZM_HAS_V4L,1)
else
AC_SUBST(ZM_HAS_V4L,0)
@@ -307,7 +307,7 @@ AC_CHECK_HEADERS(libavformat/avformat.h,
AC_CHECK_HEADERS(libswscale/swscale.h,,,)
AC_CHECK_HEADERS(pcre/pcre.h,AC_SUBST(ZM_PCRE,"1"),,)
AC_CHECK_HEADERS(pcre.h,AC_SUBST(ZM_PCRE,"1"),,)
-if test "$ENABLE_MMAP" == "yes"; then
+if test "$ENABLE_MMAP" = "yes"; then
AC_CHECK_HEADERS(sys/mman.h,,,)
AC_CHECK_HEADERS(fcntl.h,,,)
else
@@ -317,7 +317,7 @@ fi
AC_CHECK_HEADERS(zlib.h,,,)
AC_CHECK_DECLS(round,,,[#include <math.h>])
-if test "$ZM_SSL_LIB" == "openssl"; then
+if test "$ZM_SSL_LIB" = "openssl"; then
AC_CHECK_DECLS(MD5,,AC_MSG_ERROR([zm requires openssl/md5.h - use ZM_SSL_LIB option to select gnutls instead]),[#include <stdlib.h>
#include <openssl/md5.h>])
else
@@ -339,7 +339,7 @@ AC_PROG_PERL_MODULES(Time::HiRes,,AC_MSG
AC_PROG_PERL_MODULES(Date::Manip,,AC_MSG_ERROR(zm requires Date::Manip))
AC_PROG_PERL_MODULES(LWP::UserAgent,,AC_MSG_ERROR(zm requires LWP::UserAgent))
AC_PROG_PERL_MODULES(ExtUtils::MakeMaker,,AC_MSG_ERROR(zm requires ExtUtils::MakeMaker))
-if test "$ENABLE_MMAP" == "yes"; then
+if test "$ENABLE_MMAP" = "yes"; then
AC_PROG_PERL_MODULES(Sys::Mmap,,AC_MSG_ERROR(zm requires Sys::Mmap for mapped memory - set --enable-mmap=no to use IPC shared memory instead))
fi

View File

@@ -0,0 +1,51 @@
$NetBSD: patch-scripts_zm_in,v 1.2 2013/03/24 16:47:47 joerg Exp $
/etc/rc.d/init.d/functions doesn't commonly exist.
The LOCKFILE feature appears unused, and requires a /var/lock/subsys directory
we don't have.
--- scripts/zm.in.orig 2011-06-22 10:42:16.000000000 +0000
+++ scripts/zm.in
@@ -4,12 +4,12 @@
# processname: zmpkg.pl
# Source function library.
-. /etc/rc.d/init.d/functions
+#. /etc/rc.d/init.d/functions
prog=ZoneMinder
ZM_CONFIG="@ZM_CONFIG@"
pidfile="@ZM_RUNDIR@"
-LOCKFILE=/var/lock/subsys/zm
+#LOCKFILE=/var/lock/subsys/zm
loadconf()
{
@@ -50,7 +50,7 @@ start()
RETVAL=$?
[ $RETVAL = 0 ] && success || failure
echo
- [ $RETVAL = 0 ] && touch $LOCKFILE
+ #[ $RETVAL = 0 ] && touch $LOCKFILE
return $RETVAL
}
@@ -62,7 +62,7 @@ stop()
RETVAL=$?
[ $RETVAL = 0 ] && success || failure
echo
- [ $RETVAL = 0 ] && rm -f $LOCKFILE
+ #[ $RETVAL = 0 ] && rm -f $LOCKFILE
}
zmstatus()
@@ -103,7 +103,7 @@ case "$1" in
result=`$ZM_PATH_BIN/zmdc.pl check`
if [ "$result" = "running" ]; then
$ZM_PATH_BIN/zmdc.pl shutdown > /dev/null
- rm -f $LOCKFILE
+ #rm -f $LOCKFILE
start
fi
;;

View File

@@ -0,0 +1,18 @@
$NetBSD: patch-src_Makefile_am,v 1.2 2013/03/24 16:47:47 joerg Exp $
Don't pointlessly chown zms. Don't setuid zmfix here, let Pkgsrc deal with
that.
--- src/Makefile.am.orig 2011-06-21 07:40:14.000000000 +0000
+++ src/Makefile.am
@@ -125,8 +125,8 @@ dist-hook:
# Yes, you are correct. This is a HACK!
install-exec-hook:
( cd $(DESTDIR)@bindir@; mkdir -p $(DESTDIR)$(cgidir); mv zms $(DESTDIR)$(cgidir) )
- ( cd $(DESTDIR)$(cgidir); chown $(webuser):$(webgroup) zms; ln -f zms nph-zms )
- ( cd $(DESTDIR)@bindir@; chmod u+s zmfix )
+ ( cd $(DESTDIR)$(cgidir); ln -f zms nph-zms )
+# ( cd $(DESTDIR)@bindir@; chmod u+s zmfix )
uninstall-hook:
( cd $(DESTDIR)$(cgidir); rm -f zms nph-zms )

View File

@@ -0,0 +1,21 @@
$NetBSD: patch-src_zm__thread.h,v 1.2 2013/04/29 21:31:13 joerg Exp $
--- src/zm_thread.h.orig 2009-06-08 09:20:17.000000000 +0000
+++ src/zm_thread.h
@@ -20,6 +20,7 @@
#ifndef ZM_THREAD_H
#define ZM_THREAD_H
+#include <unistd.h>
#include <pthread.h>
#include "zm_exception.h"
#include "zm_utils.h"
@@ -27,7 +28,7 @@
class ThreadException : public Exception
{
public:
- ThreadException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)syscall(224) ) )
+ ThreadException( const std::string &message ) : Exception( stringtf( ("(%d) "+message).c_str(), (long int)syscall(224) ) )
{
}
};

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-src_zm__timer.h,v 1.1 2013/03/24 16:47:47 joerg Exp $
--- src/zm_timer.h.orig 2008-07-25 09:33:24.000000000 +0000
+++ src/zm_timer.h
@@ -30,7 +30,7 @@ private:
class TimerException : public Exception
{
public:
- TimerException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)syscall(224) ) )
+ TimerException( const std::string &message ) : Exception( stringtf( ("(%d) "+message).c_str(), (long int)syscall(224) ) )
{
}
};

View File

@@ -0,0 +1,26 @@
$NetBSD: patch-src_zm__utils.cpp,v 1.1 2013/03/24 16:47:47 joerg Exp $
--- src/zm_utils.cpp.orig 2011-06-21 09:19:11.000000000 +0000
+++ src/zm_utils.cpp
@@ -38,21 +38,6 @@ const std::string stringtf( const char *
return( tempString );
}
-const std::string stringtf( const std::string &format, ... )
-{
- va_list ap;
- char tempBuffer[8192];
- std::string tempString;
-
- va_start(ap, format );
- vsnprintf( tempBuffer, sizeof(tempBuffer), format.c_str() , ap );
- va_end(ap);
-
- tempString = tempBuffer;
-
- return( tempString );
-}
-
bool startsWith( const std::string &haystack, const std::string &needle )
{
return( haystack.substr( 0, needle.length() ) == needle );

View File

@@ -0,0 +1,12 @@
$NetBSD: patch-src_zm__utils.h,v 1.1 2013/03/24 16:47:47 joerg Exp $
--- src/zm_utils.h.orig 2009-06-02 07:59:26.000000000 +0000
+++ src/zm_utils.h
@@ -26,7 +26,6 @@
typedef std::vector<std::string> StringVector;
const std::string stringtf( const char *format, ... );
-const std::string stringtf( const std::string &format, ... );
bool startsWith( const std::string &haystack, const std::string &needle );
StringVector split( const std::string &string, const std::string chars, int limit=0 );

View File

@@ -0,0 +1,16 @@
$NetBSD: patch-src_zm_comms_cpp,v 1.2 2013/03/24 16:47:47 joerg Exp $
Don't attempt to include headers that don't exist.
--- src/zm_comms.cpp.orig 2011-06-21 09:19:10.000000000 +0000
+++ src/zm_comms.cpp
@@ -25,7 +25,9 @@
#include <fcntl.h>
#include <stdarg.h>
//#include <memory.h>
+#ifdef HAVE_ALLOCA_H
#include <alloca.h>
+#endif
#include <string.h>
//#include <unistd.h>
#include <sys/ioctl.h>

View File

@@ -0,0 +1,27 @@
$NetBSD: patch-src_zm_comms_h,v 1.3 2013/04/29 21:31:13 joerg Exp $
extern "C" system headers.
Include missing system headers for NetBSD.
--- src/zm_comms.h.orig 2009-10-14 13:08:49.000000000 +0000
+++ src/zm_comms.h
@@ -22,10 +22,18 @@
#include "zm_exception.h"
+extern "C" {
#include <unistd.h>
#include <netdb.h>
#include <errno.h>
+#include <sys/socket.h>
+#include <sys/uio.h>
#include <sys/un.h>
+#include <netinet/in.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+}
#include <set>
#include <vector>

View File

@@ -0,0 +1,24 @@
$NetBSD: patch-src_zm_logger_cpp,v 1.3 2013/04/29 21:31:13 joerg Exp $
If the system has syscall() but not SYS_gettid [E.g. NetBSD], don't attempt
to use SYS_gettid.
--- src/zm_logger.cpp.orig 2011-06-28 11:07:35.000000000 +0000
+++ src/zm_logger.cpp
@@ -33,6 +33,7 @@
#include <signal.h>
#include <stdarg.h>
#include <errno.h>
+#include <unistd.h>
bool Logger::smInitialised = false;
Logger *Logger::smInstance = 0;
@@ -515,7 +516,7 @@ void Logger::logPrint( bool hex, const c
#endif
pid_t tid;
-#ifdef HAVE_SYSCALL
+#if defined(HAVE_SYSCALL) && defined(SYS_gettid)
if ( (tid = syscall(SYS_gettid)) < 0 ) // Thread/Process id
#endif // HAVE_SYSCALL
tid = getpid(); // Process id

View File

@@ -0,0 +1,18 @@
$NetBSD: patch-src_zm_remote_camera_h,v 1.3 2013/04/29 21:31:13 joerg Exp $
Declare sockaddr_in.
--- src/zm_remote_camera.h.orig 2009-06-02 07:59:26.000000000 +0000
+++ src/zm_remote_camera.h
@@ -22,8 +22,11 @@
#include "zm_camera.h"
+#include <netinet/in.h>
+
#include <string>
#include <netdb.h>
+#include <time.h>
//
// Class representing 'remote' cameras, i.e. those which are

View File

@@ -0,0 +1,14 @@
$NetBSD: patch-src_zm_signal_h,v 1.2 2013/03/24 16:47:47 joerg Exp $
Don't include <execinfo.h> for lack of portability.
--- src/zm_signal.h.orig 2008-07-25 09:33:24.000000000 +0000
+++ src/zm_signal.h
@@ -21,7 +21,6 @@
#define ZM_SIGNAL_H
#include <signal.h>
-#include <execinfo.h>
#include "zm.h"

View File

@@ -0,0 +1,30 @@
$NetBSD: patch-src_zm_thread_cpp,v 1.2 2013/03/24 16:47:47 joerg Exp $
pthread_mutex_timedlock() is not available on NetBSD 5.0, and not required
in ZoneMinder.
--- src/zm_thread.cpp.orig 2011-06-21 09:19:11.000000000 +0000
+++ src/zm_thread.cpp
@@ -72,6 +72,7 @@ void Mutex::lock()
throw ThreadException( stringtf( "Unable to lock pthread mutex: %s", strerror(errno) ) );
}
+#if 0
void Mutex::lock( int secs )
{
struct timespec timeout = getTimeout( secs );
@@ -85,6 +86,7 @@ void Mutex::lock( double secs )
if ( pthread_mutex_timedlock( &mMutex, &timeout ) < 0 )
throw ThreadException( stringtf( "Unable to timedlock pthread mutex: %s", strerror(errno) ) );
}
+#endif
void Mutex::unlock()
{
@@ -336,4 +338,5 @@ void Thread::kill( int signal )
}
// Some explicit template instantiations
-#include "zm_threaddata.cpp"
+template class ThreadData<bool>;
+template class ThreadData<int>;

View File

@@ -0,0 +1,25 @@
$NetBSD: patch-src_zmc_cpp,v 1.2 2013/03/24 16:47:47 joerg Exp $
Use a more appropriate initialisation for a long, and use the definition out
of <limits.h>, for portability.
--- src/zmc.cpp.orig 2011-06-21 09:19:11.000000000 +0000
+++ src/zmc.cpp
@@ -19,7 +19,7 @@
#include <getopt.h>
#include <signal.h>
-#include <values.h>
+#include <limits.h>
#include "zm.h"
#include "zm_db.h"
@@ -224,7 +224,7 @@ int main( int argc, char *argv[] )
sigprocmask( SIG_BLOCK, &block_set, 0 );
for ( int i = 0; i < n_monitors; i++ )
{
- long min_delay = MAXINT;
+ long min_delay = LONG_MAX;
gettimeofday( &now, NULL );
for ( int j = 0; j < n_monitors; j++ )

View File

@@ -0,0 +1,89 @@
$NetBSD: patch-src_zmf_cpp,v 1.2 2013/03/24 16:47:47 joerg Exp $
http://www.zoneminder.com/wiki/index.php/1.24.2_Patches
Fix Incomplete Image errors in zmf
This patch changes the socket reader in zmf from a single read, to a loop
read. Incomplete reads would be reported even though the image writer wrote
the whole image to the socket. The problem was when the read went to read the
image frame from the socket, all the data had not yet been written to the
socket by the writer, so the reader thought there was a problem. The loop
reads from the socket until a full image frame is read, or there is an error.
--- src/zmf.cpp.orig 2011-06-21 09:19:11.000000000 +0000
+++ src/zmf.cpp
@@ -231,16 +231,39 @@ int main( int argc, char *argv[] )
}
Debug( 1, "Read frame header, expecting %ld bytes of image", frame_header.image_length );
static unsigned char image_data[ZM_MAX_IMAGE_SIZE];
- n_bytes = read( sd, image_data, frame_header.image_length );
- if ( n_bytes != (ssize_t)frame_header.image_length )
+
+ // Read for pipe and loop until bytes expected have been read or an error occures
+ int bytes_read = 0;
+ do
{
- if ( n_bytes < 0 )
+ n_bytes = read( sd, image_data+bytes_read, frame_header.image_length-bytes_read );
+ if (n_bytes < 0) break; // break on error
+ if (n_bytes < frame_header.image_length)
{
- Error( "Can't read frame image data: %s", strerror(errno) );
+ // print some informational messages
+ if (bytes_read == 0)
+ {
+ Warning("Image read : Short read %d bytes of %d expected bytes",n_bytes,frame_header.image_length);
+ }
+ else if (bytes_read+n_bytes == frame_header.image_length)
+ {
+ Warning("Image read : Read rest of short read: %d bytes read total of %d bytes",n_bytes,frame_header.image_length);
+ }
+ else
+ {
+ Warning("Image read : continuing, read %d bytes (%d so far)", n_bytes, bytes_read+n_bytes);
+ }
}
- else if ( n_bytes > 0 )
+ bytes_read+= n_bytes;
+ } while (n_bytes>0 && (bytes_read < (ssize_t)frame_header.image_length) );
+
+ // Print errors if there was a problem
+ if ( n_bytes < 1 )
+ {
+ Error( "Only read %d bytes of %d\n", bytes_read, frame_header.image_length);
+ if ( n_bytes < 0 )
{
- Error( "Incomplete read of frame image data, %d bytes only", n_bytes );
+ Error( "Can't read frame image data: %s", strerror(errno) );
}
else
{
@@ -249,16 +272,18 @@ int main( int argc, char *argv[] )
ReopenSocket( sd, monitor->Id() );
continue;
}
+
static char subpath[PATH_MAX] = "";
- if ( config.use_deep_storage )
- {
- struct tm *time = localtime( &frame_header.event_time );
- snprintf( subpath, sizeof(subpath), "%02d/%02d/%02d/%02d/%02d/%02d", time->tm_year-100, time->tm_mon+1, time->tm_mday, time->tm_hour, time->tm_min, time->tm_sec );
- }
- else
- {
- snprintf( subpath, sizeof(subpath), "%ld", frame_header.event_id );
- }
+ if ( config.use_deep_storage )
+ {
+ struct tm *time = localtime( &frame_header.event_time );
+ snprintf( subpath, sizeof(subpath), "%02d/%02d/%02d/%02d/%02d/%02d", time->tm_year-100, time->tm_mon+1, time->tm_mday, time->tm_hour, time->tm_min, time->tm_sec );
+ }
+ else
+ {
+ snprintf( subpath, sizeof(subpath), "%ld", frame_header.event_id );
+ }
+
static char path[PATH_MAX] = "";
snprintf( path, sizeof(path), frame_header.alarm_frame?anal_path:capt_path, subpath, frame_header.frame_id );
Debug( 1, "Got image, writing to %s", path );

View File

@@ -0,0 +1,13 @@
$NetBSD: patch-web_Makefile.am,v 1.1 2013/03/24 16:47:47 joerg Exp $
--- web/Makefile.am.orig 2013-03-24 15:56:43.000000000 +0000
+++ web/Makefile.am
@@ -21,7 +21,7 @@ dist_web_DATA = \
index.php
# Yes, you are correct. This is a HACK!
-install-data-hook:
+pkgsrc-disabled-install-data-hook:
( cd $(DESTDIR)$(webdir); chown $(webuser):$(webgroup) $(dist_web_DATA) )
( cd $(DESTDIR)$(webdir); chown -R $(webuser):$(webgroup) $(SUBDIRS) )
@-( cd $(DESTDIR)$(webdir); if ! test -e events; then mkdir events; fi; chown $(webuser):$(webgroup) events; chmod u+w events )

View File

@@ -0,0 +1,15 @@
$NetBSD: patch-web_ajax_stream_php,v 1.2 2013/03/24 16:47:47 joerg Exp $
http://www.zoneminder.com/forums/viewtopic.php?t=13322
--- web/ajax/stream.php.orig 2011-06-27 11:14:00.000000000 +0000
+++ web/ajax/stream.php
@@ -60,7 +60,7 @@ $wSockets = NULL;
$eSockets = NULL;
$numSockets = @socket_select( $rSockets, $wSockets, $eSockets, intval(MSG_TIMEOUT/1000), (MSG_TIMEOUT%1000)*1000 );
-if ( $numSockets === false )
+if ( $numSockets === false || $numSockets < 0)
{
ajaxError( "socket_select failed: ".socket_strerror(socket_last_error()) );
}