aboutsummaryrefslogtreecommitdiff
path: root/multimedia/zoneminder
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2014-07-26 20:06:40 +0000
committerKurt Jaeger <pi@FreeBSD.org>2014-07-26 20:06:40 +0000
commite578190ffd4b5c21a686df3bcbb91fe431814ca7 (patch)
tree043f4fc0825c9ab44f6b8258cbd7b3051aadace0 /multimedia/zoneminder
parentea1aa9cbfc1854697dacad0ab128674ae7ea37a2 (diff)
downloadports-e578190ffd4b5c21a686df3bcbb91fe431814ca7.tar.gz
ports-e578190ffd4b5c21a686df3bcbb91fe431814ca7.zip
Notes
Diffstat (limited to 'multimedia/zoneminder')
-rw-r--r--multimedia/zoneminder/Makefile87
-rw-r--r--multimedia/zoneminder/files/patch-Makefile.in56
-rw-r--r--multimedia/zoneminder/files/patch-src_zm_comms.h10
-rw-r--r--multimedia/zoneminder/files/patch-src_zm_logger.cpp9
-rw-r--r--multimedia/zoneminder/files/patch-src_zm_remote_camera.h9
-rw-r--r--multimedia/zoneminder/pkg-plist41
6 files changed, 159 insertions, 53 deletions
diff --git a/multimedia/zoneminder/Makefile b/multimedia/zoneminder/Makefile
index 585cfa45ed6d..8f7f8944072a 100644
--- a/multimedia/zoneminder/Makefile
+++ b/multimedia/zoneminder/Makefile
@@ -3,7 +3,7 @@
PORTNAME= zoneminder
PORTVERSION= 1.25.0
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= multimedia
MASTER_SITES= http://www2.zoneminder.com/downloads/ \
http://www.zoneminder.com/downloads/
@@ -30,11 +30,13 @@ BUILD_DEPENDS= ${LOCALBASE}/bin/php-config:${PORTSDIR}/lang/php5-extensions \
p5-MIME-Tools>=0:${PORTSDIR}/mail/p5-MIME-Tools \
${LOCALBASE}/include/linux/videodev.h:${PORTSDIR}/multimedia/v4l_compat
-USES= perl5
+USES= perl5 shebangfix
GNU_CONFIGURE= yes
USE_PHP= json mysql session
USE_MYSQL= yes
USE_RC_SUBR= zoneminder
+USE_GCC= any
+USE_PERL5= run build fixpacklist
CFLAGS+= -I${LOCALBASE}/include/ffmpeg0 -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib/ffmpeg0
@@ -52,13 +54,42 @@ CONFIGURE_ENV= ZM_DB_HOST=${DB_HOST} \
ZM_DB_NAME=${DB_NAME} \
ZM_DB_USER=${DB_USER} \
ZM_DB_PASS=${DB_PASS} \
- ZM_SSL_LIB="openssl"
+ ZM_SSL_LIB="openssl" \
+ ZM_LOGDIR=${M_LOGDIR} \
+ ZM_RUNDIR=${M_RUNDIR} \
+ ZM_TMPDIR=${M_TMPDIR}
DB_HOST?= localhost
DB_NAME?= zm
DB_USER?= zmuser
DB_PASS?= zmpass
+#
+# These variables default to to the defaults specified in the
+# original distributed ZoneMinder/configure.ac
+#
+M_LOGDIR?= /var/log/zm
+M_RUNDIR?= /var/run/zm
+M_TMPDIR?= /tmp/zm
+
+PLIST_SUB= ZM_LOGDIR=${M_LOGDIR} \
+ ZM_RUNDIR=${M_RUNDIR} \
+ ZM_TMPDIR=${M_TMPDIR} \
+ WEB_USER=${WWWOWN} \
+ WEB_GROUP=${WWWGRP}
+
+SHEBANG_FILES= scripts/zmdc.pl.in \
+ scripts/zmaudit.pl.in \
+ scripts/zmfilter.pl.in \
+ scripts/zmtrigger.pl.in \
+ scripts/zmx10.pl.in \
+ scripts/zmwatch.pl.in \
+ scripts/zmpkg.pl.in \
+ scripts/zmupdate.pl.in \
+ scripts/zmvideo.pl.in \
+ scripts/zmcontrol.pl.in \
+ scripts/zmtrack.pl.in
+
PORTDOCS= AUTHORS \
COPYING \
ChangeLog \
@@ -68,34 +99,6 @@ PORTDOCS= AUTHORS \
README.FreeBSD \
TODO
-MAN3PREFIX?= ${PREFIX}/lib/perl5/${PERL_VER}
-MAN3= ZoneMinder::Trigger::Connection.3 \
- ZoneMinder::Control::Ncs370.3 \
- ZoneMinder::Trigger::Channel::Serial.3 \
- ZoneMinder.3 \
- ZoneMinder::Config.3 \
- ZoneMinder::Control::mjpgStreamer.3 \
- ZoneMinder::Control::PanasonicIP.3 \
- ZoneMinder::Base.3 \
- ZoneMinder::Trigger::Channel::Unix.3 \
- ZoneMinder::Control::AxisV2.3 \
- ZoneMinder::Trigger::Channel.3 \
- ZoneMinder::Memory.3 \
- ZoneMinder::Trigger::Channel::File.3 \
- ZoneMinder::Database.3 \
- ZoneMinder::Control::PelcoD.3 \
- ZoneMinder::Control::Visca.3 \
- ZoneMinder::Trigger::Channel::Inet.3 \
- ZoneMinder::Trigger::Connection::Example.3 \
- ZoneMinder::Trigger::Channel::Spawning.3 \
- ZoneMinder::Control.3 \
- ZoneMinder::General.3 \
- ZoneMinder::Trigger::Channel::Handle.3 \
- ZoneMinder::ConfigAdmin.3 \
- ZoneMinder::ConfigData.3 \
- ZoneMinder::Logger.3
-
-NO_STAGE= yes
.include <bsd.port.pre.mk>
.if ${ARCH}=="i386"
@@ -123,19 +126,31 @@ post-patch:
${WRKSRC}/configure
${REINPLACE_CMD} -e 's,ZM_V4L2,ZM_HAS_V4L2,g' ${WRKSRC}//web/skins/classic/views/monitorprobe.php
+PKGMESSAGE= ${WRKDIR}/pkg-message
pre-build:
${CP} ${FILESDIR}/videodev.h ${WRKSRC}/src
${CP} ${FILESDIR}/zm_fbsd_camera.cpp ${WRKSRC}/src
${TOUCH} ${WRKSRC}/src/zm_fbsd_camera.h
${CP} ${FILESDIR}/README.FreeBSD ${WRKSRC}
+ ${CP} ${FILESDIR}/README.FreeBSD ${PKGMESSAGE}
post-install:
-.if !defined(NOPORTDOCS)
- ${MKDIR} ${DOCSDIR}
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${CP} ${WRKSRC}/db/zm_create.sql ${STAGEDIR}${DOCSDIR}
.for i in ${PORTDOCS}
- ${INSTALL_DATA} ${WRKSRC}/$i ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/$i ${STAGEDIR}${DOCSDIR}
.endfor
-.endif
- ${CAT} ${FILESDIR}/README.FreeBSD
+ -${RM} -f ${STAGEDIR}${PREFIX}/lib/perl5/${PERL_VER}/mach/perllocal.pod
+ ${MKDIR} -m 0700 -p ${STAGEDIR}${M_TMPDIR}
+ ${CHOWN} ${WWWOWN}:${WWWGRP} ${STAGEDIR}${M_TMPDIR}
+ ${MKDIR} -m 0755 -p ${STAGEDIR}${M_RUNDIR}
+ ${CHOWN} ${WWWOWN}:${WWWGRP} ${STAGEDIR}${M_RUNDIR}
+ ${MKDIR} -m 0755 -p ${STAGEDIR}${M_LOGDIR}
+ ${CHOWN} ${WWWOWN}:${WWWGRP} ${STAGEDIR}${M_LOGDIR}
+
+pre-deinstall:
+ -${RMDIR} ${STAGEDIR}${M_RUNDIR}
+ -${RMDIR} ${STAGEDIR}${M_TMPDIR}
+ -${RMDIR} ${STAGEDIR}${M_LOGDIR}
.include <bsd.port.post.mk>
diff --git a/multimedia/zoneminder/files/patch-Makefile.in b/multimedia/zoneminder/files/patch-Makefile.in
index 5e925ceafc7a..0d52fcd1b442 100644
--- a/multimedia/zoneminder/files/patch-Makefile.in
+++ b/multimedia/zoneminder/files/patch-Makefile.in
@@ -1,6 +1,6 @@
---- Makefile.in.orig 2011-04-27 18:25:46.000000000 +0400
-+++ Makefile.in 2011-05-05 17:28:47.671178104 +0400
-@@ -275,7 +275,7 @@ AUTOMAKE_OPTIONS = gnu
+--- Makefile.in.orig 2011-08-23 08:10:37.000000000 -0700
++++ Makefile.in 2014-07-24 13:33:49.000000000 -0700
+@@ -275,7 +275,7 @@
webuser = @WEB_USER@
webgroup = @WEB_GROUP@
sysconf_DATA = \
@@ -9,7 +9,7 @@
SUBDIRS = \
src \
-@@ -343,7 +343,7 @@ $(srcdir)/config.h.in: $(am__configure_
+@@ -343,7 +343,7 @@
distclean-hdr:
-rm -f config.h stamp-h1
@@ -18,3 +18,51 @@
cd $(top_builddir) && $(SHELL) ./config.status $@
zmconfgen.pl: $(top_builddir)/config.status $(srcdir)/zmconfgen.pl.in
cd $(top_builddir) && $(SHELL) ./config.status $@
+@@ -742,7 +742,6 @@
+
+ install-data-am:
+ @$(NORMAL_INSTALL)
+- $(MAKE) $(AM_MAKEFLAGS) install-data-hook
+ install-dvi: install-dvi-recursive
+
+ install-dvi-am:
+@@ -789,7 +788,6 @@
+
+ uninstall-am: uninstall-sysconfDATA
+ @$(NORMAL_INSTALL)
+- $(MAKE) $(AM_MAKEFLAGS) uninstall-hook
+ .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
+ ctags-recursive install-am install-data-am install-strip \
+ tags-recursive uninstall-am
+@@ -801,29 +799,17 @@
+ distclean distclean-generic distclean-hdr distclean-tags \
+ distcleancheck distdir distuninstallcheck dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+- install-data-am install-data-hook install-dvi install-dvi-am \
++ install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ install-sysconfDATA installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
+- tags-recursive uninstall uninstall-am uninstall-hook \
++ tags-recursive uninstall uninstall-am \
+ uninstall-sysconfDATA
+
+
+-# Yes, you are correct. This is a HACK!
+-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 )
+- ( if ! test -e $(ZM_LOGDIR); then mkdir -p $(ZM_LOGDIR); fi; if test "$(ZM_LOGDIR)" != "/var/log"; then chown $(webuser):$(webgroup) $(ZM_LOGDIR); chmod u+w $(ZM_LOGDIR); fi )
+-
+-uninstall-hook:
+- @-( cd $(DESTDIR)$(webdir); rm -rf events graphics images sounds temp )
+- @-( if test "$(ZM_RUNDIR)" != "/var/run"; then rm -rf $(ZM_RUNDIR); fi )
+- @-( if test "$(ZM_TMPDIR)" != "/tmp"; then rm -rf $(ZM_TMPDIR); fi )
+- @-( if test "$(ZM_LOGDIR)" != "/var/log"; then rm -rf $(ZM_LOGDIR); fi )
+
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/multimedia/zoneminder/files/patch-src_zm_comms.h b/multimedia/zoneminder/files/patch-src_zm_comms.h
index 12aaf767cb9c..439c1d2cd266 100644
--- a/multimedia/zoneminder/files/patch-src_zm_comms.h
+++ b/multimedia/zoneminder/files/patch-src_zm_comms.h
@@ -1,6 +1,6 @@
---- src/zm_comms.h.orig 2009-03-20 15:07:00.000000000 +0300
-+++ src/zm_comms.h 2011-04-08 17:48:07.410804476 +0400
-@@ -26,10 +26,11 @@
+--- src/zm_comms.h.orig 2009-10-14 06:08:49.000000000 -0700
++++ src/zm_comms.h 2014-07-23 08:26:15.000000000 -0700
+@@ -26,9 +26,12 @@
#include <netdb.h>
#include <errno.h>
#include <sys/un.h>
@@ -8,9 +8,9 @@
+#include <sys/socket.h>
#include <set>
#include <vector>
--
+#include <sys/uio.h>
+#include <netinet/in.h>
++#include <string.h>
+
class CommsException : public Exception
{
- public:
diff --git a/multimedia/zoneminder/files/patch-src_zm_logger.cpp b/multimedia/zoneminder/files/patch-src_zm_logger.cpp
index 1c0d742ecd07..ff138b1a0951 100644
--- a/multimedia/zoneminder/files/patch-src_zm_logger.cpp
+++ b/multimedia/zoneminder/files/patch-src_zm_logger.cpp
@@ -1,14 +1,15 @@
---- src/zm_logger.cpp.orig 2011-06-28 15:07:35.000000000 +0400
-+++ src/zm_logger.cpp 2012-02-03 01:42:44.626851425 +0400
-@@ -33,6 +33,7 @@
+--- src/zm_logger.cpp.orig 2011-06-28 04:07:35.000000000 -0700
++++ src/zm_logger.cpp 2014-07-23 00:23:50.000000000 -0700
+@@ -33,6 +33,8 @@
#include <signal.h>
#include <stdarg.h>
#include <errno.h>
+#include <sys/thr.h>
++#include <unistd.h>
bool Logger::smInitialised = false;
Logger *Logger::smInstance = 0;
-@@ -515,8 +516,12 @@
+@@ -515,8 +517,12 @@
#endif
pid_t tid;
diff --git a/multimedia/zoneminder/files/patch-src_zm_remote_camera.h b/multimedia/zoneminder/files/patch-src_zm_remote_camera.h
index 7c0920b27713..2efa986f67ed 100644
--- a/multimedia/zoneminder/files/patch-src_zm_remote_camera.h
+++ b/multimedia/zoneminder/files/patch-src_zm_remote_camera.h
@@ -1,6 +1,6 @@
---- src/zm_remote_camera.h.orig 2009-05-28 12:47:59.000000000 +0400
-+++ src/zm_remote_camera.h 2011-04-08 17:48:07.392807144 +0400
-@@ -21,7 +21,7 @@
+--- src/zm_remote_camera.h.orig 2009-06-02 00:59:26.000000000 -0700
++++ src/zm_remote_camera.h 2014-07-23 00:39:49.000000000 -0700
+@@ -21,9 +21,10 @@
#define ZM_REMOTE_CAMERA_H
#include "zm_camera.h"
@@ -8,4 +8,7 @@
+#include <netinet/in.h>
#include <string>
#include <netdb.h>
++#include <unistd.h>
+ //
+ // Class representing 'remote' cameras, i.e. those which are
diff --git a/multimedia/zoneminder/pkg-plist b/multimedia/zoneminder/pkg-plist
index a74b4b32302b..31fd0bf603ec 100644
--- a/multimedia/zoneminder/pkg-plist
+++ b/multimedia/zoneminder/pkg-plist
@@ -16,8 +16,35 @@ bin/zmvideo.pl
bin/zmwatch.pl
bin/zmx10.pl
@unexec if cmp -s %D/etc/zm.conf.sample %D/etc/zm.conf; then rm -f %D/etc/zm.conf; fi
+@mode 0600
etc/zm.conf.sample
-lib/perl5/%%PERL_VER%%/%%PERL_ARCH%%/perllocal.pod
+@mode
+%%DOCSDIR%%/zm_create.sql
+%%PERL5_MAN3%%/ZoneMinder.3.gz
+%%PERL5_MAN3%%/ZoneMinder::Base.3.gz
+%%PERL5_MAN3%%/ZoneMinder::Config.3.gz
+%%PERL5_MAN3%%/ZoneMinder::ConfigAdmin.3.gz
+%%PERL5_MAN3%%/ZoneMinder::ConfigData.3.gz
+%%PERL5_MAN3%%/ZoneMinder::Control.3.gz
+%%PERL5_MAN3%%/ZoneMinder::Control::AxisV2.3.gz
+%%PERL5_MAN3%%/ZoneMinder::Control::Ncs370.3.gz
+%%PERL5_MAN3%%/ZoneMinder::Control::PanasonicIP.3.gz
+%%PERL5_MAN3%%/ZoneMinder::Control::PelcoD.3.gz
+%%PERL5_MAN3%%/ZoneMinder::Control::Visca.3.gz
+%%PERL5_MAN3%%/ZoneMinder::Control::mjpgStreamer.3.gz
+%%PERL5_MAN3%%/ZoneMinder::Database.3.gz
+%%PERL5_MAN3%%/ZoneMinder::General.3.gz
+%%PERL5_MAN3%%/ZoneMinder::Logger.3.gz
+%%PERL5_MAN3%%/ZoneMinder::Memory.3.gz
+%%PERL5_MAN3%%/ZoneMinder::Trigger::Channel.3.gz
+%%PERL5_MAN3%%/ZoneMinder::Trigger::Channel::File.3.gz
+%%PERL5_MAN3%%/ZoneMinder::Trigger::Channel::Handle.3.gz
+%%PERL5_MAN3%%/ZoneMinder::Trigger::Channel::Inet.3.gz
+%%PERL5_MAN3%%/ZoneMinder::Trigger::Channel::Serial.3.gz
+%%PERL5_MAN3%%/ZoneMinder::Trigger::Channel::Spawning.3.gz
+%%PERL5_MAN3%%/ZoneMinder::Trigger::Channel::Unix.3.gz
+%%PERL5_MAN3%%/ZoneMinder::Trigger::Connection.3.gz
+%%PERL5_MAN3%%/ZoneMinder::Trigger::Connection::Example.3.gz
%%SITE_PERL%%/ZoneMinder.pm
%%SITE_PERL%%/ZoneMinder/Base.pm
%%SITE_PERL%%/ZoneMinder/Config.pm
@@ -320,3 +347,15 @@ lib/perl5/%%PERL_VER%%/%%PERL_ARCH%%/perllocal.pod
@dirrm %%SITE_PERL%%/ZoneMinder/Memory
@dirrm %%SITE_PERL%%/ZoneMinder/Control
@dirrm %%SITE_PERL%%/ZoneMinder
+@exec mkdir -m 0700 -p %%ZM_TMPDIR%%/fgfhfh
+@exec chown %%WEB_USER%% %%ZM_TMPDIR%%
+@exec chgrp %%WEB_GROUP%% %%ZM_TMPDIR%%
+@exec mkdir -m 0755 -p %%ZM_RUNDIR%%
+@exec chown %%WEB_USER%% %%ZM_RUNDIR%%
+@exec chgrp %%WEB_GROUP%% %%ZM_RUNDIR%%
+@exec mkdir -m 0755 -p %%ZM_LOGDIR%%
+@exec chown %%WEB_USER%% %%ZM_LOGDIR%%
+@exec chgrp %%WEB_GROUP%% %%ZM_LOGDIR%%
+@unexec rmdir %%ZM_RUNDIR%%
+@unexec rmdir %%ZM_TMPDIR%%
+@unexec rmdir %%ZM_LOGDIR%%