diff -ruN pure/multimedia/zoneminder/Makefile workshop/multimedia/zoneminder/Makefile --- pure/multimedia/zoneminder/Makefile 2020-07-03 22:30:11.000000000 +0000 +++ workshop/multimedia/zoneminder/Makefile 2020-10-10 14:21:26.627313000 +0000 @@ -1,8 +1,7 @@ # $FreeBSD: head/multimedia/zoneminder/Makefile 541152 2020-07-03 22:30:11Z jbeich $ PORTNAME= zoneminder -PORTVERSION= 1.34.9 -PORTREVISION= 1 +PORTVERSION= 1.34.21 CATEGORIES= multimedia MAINTAINER= bsd@abinet.ru @@ -46,14 +45,16 @@ USE_RC_SUBR= zoneminder USE_PHP= json pdo_mysql session gd sockets ctype opcache openssl hash -OPTIONS_DEFINE= NLS V4L DOCS +OPTIONS_DEFINE= NLS V4L OPTIONS_SUB= yes NLS_USES= gettext NLS_CONFIGURE_ENABLE= nls V4L_BUILD_DEPENDS= ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat V4L_LIB_DEPENDS= libv4l2.so:multimedia/libv4l +PKGMESSAGE= ${MASTERDIR}/pkg-message PLIST_SUB= WWWOWN="${WWWOWN}" WWWGRP="${WWWGRP}" +SUB_FILES= pkg-message SHEBANG_FILES= scripts/zmaudit.pl.in \ scripts/zmcamtool.pl.in \ @@ -72,8 +73,6 @@ scripts/zmonvif-probe.pl.in \ scripts/zmrecover.pl.in -PORTDOCS= README.FreeBSD - CMAKE_ARGS+= -DZM_PERL_MM_PARMS=INSTALLDIRS=site \ -DZM_CONFIG_DIR=${PREFIX}/etc \ -DZM_CONFIG_SUBDIR=${PREFIX}/etc/zoneminder \ @@ -102,8 +101,6 @@ post-extract: ${CP} -R ${WRKSRC_crud}/* ${WRKSRC}/web/api/app/Plugin/Crud ${CP} -R ${WRKSRC_crud_plugin}/* ${WRKSRC}/web/api/app/Plugin/CakePHP-Enum-Behavior - ${CP} ${FILESDIR}/README.FreeBSD ${WRKSRC} - ${CP} ${FILESDIR}/README.FreeBSD ${PKGMESSAGE} ${REINPLACE_CMD} -e 's|/dev/shm|/tmp|g' ${WRKSRC}/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in post-patch: @@ -121,9 +118,5 @@ ${MKDIR} ${STAGEDIR}/var/db/zoneminder ${MKDIR} ${STAGEDIR}/var/run/zm ${MKDIR} ${STAGEDIR}/var/tmp/zm - -post-install-DOCS-on: - ${MKDIR} ${STAGEDIR}${DOCSDIR} - cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} .include diff -ruN pure/multimedia/zoneminder/distinfo workshop/multimedia/zoneminder/distinfo --- pure/multimedia/zoneminder/distinfo 2020-04-11 10:54:26.000000000 +0000 +++ workshop/multimedia/zoneminder/distinfo 2020-10-09 09:57:17.961911000 +0000 @@ -1,6 +1,6 @@ -TIMESTAMP = 1586081021 -SHA256 (zoneminder-zoneminder-1.34.9_GH0.tar.gz) = 446cd622d5168bdae21ae108b380825cd9591064bf6b4e0679a7acb8eb5caa92 -SIZE (zoneminder-zoneminder-1.34.9_GH0.tar.gz) = 10386489 +TIMESTAMP = 1602237427 +SHA256 (zoneminder-zoneminder-1.34.21_GH0.tar.gz) = 3abb0b92ffd4bf109f6a8f60e2e7196f304e8b7caf8e24c3fe4d2041696c5310 +SIZE (zoneminder-zoneminder-1.34.21_GH0.tar.gz) = 10406006 SHA256 (zoneminder-crud-0bd63fb_GH0.tar.gz) = d4c82d714ea74606726d11be973b17d3f9b57ad6c6559e1a29affa60c6f3a579 SIZE (zoneminder-crud-0bd63fb_GH0.tar.gz) = 73129 SHA256 (zoneminder-CakePHP-Enum-Behavior-ea90c0c_GH0.tar.gz) = 3a9006c7c59f2b864ce628df4725b241fc23cfd9abc56e746acbd22d850f5ab1 diff -ruN pure/multimedia/zoneminder/files/README.FreeBSD workshop/multimedia/zoneminder/files/README.FreeBSD --- pure/multimedia/zoneminder/files/README.FreeBSD 2020-02-24 09:43:34.000000000 +0000 +++ workshop/multimedia/zoneminder/files/README.FreeBSD 1970-01-01 00:00:00.000000000 +0000 @@ -1,184 +0,0 @@ - -ZoneMinder is a free, open source Closed-circuit television software -application developed for Unix-like operating systems which supports -IP, USB and Analog cameras. - -New installs -============ - -ZoneMinder requires a MySQL (or MySQL forks) database backend and -a http server, capable to execute PHP and CGI scripts. - -To simplify things, we assume, that you use MySQL and NGINX on -the same server. - -1. Preliminary steps - -1.1 Install databases/mysql57-server or newer - You may choose your favourite method - ports or packages here. - - ZoneMinder use very simple queries, however it tends to write to - the database quite a lot depending on your capture mode and number - of cameras. So tweak your MySQL instance accordantly - - Now, enable and start MySQL - sysrc mysql_server_enable="YES" - service mysql-server start - -1.2 Install www/nginx - We provide an example for an HTTP install, however, you should use - HTTPS if you plan to expose your installation to the public. There - are plenty guides how to do it and security/letsencrypt.sh is a - good way to get a valid SSL certificate. Probably, your installation - will be behind reverse proxy, so this example should work for you. - - Please, notive the following issues with ZM: - - - web interface has several hardcoded /zm in url generation, so it is - mandatory to serve your installtion from /zm subfolder - - if behind reverse proxy, HTTP_X_FORWARDED_PROTO must be supplied or link - generation will use http:// - - Your server block should include the following: - - server { - listen 80; - - root /usr/local/www/zoneminder; - index index.php - gzip off; - - location /cgi-bin/nph-zms { - - include fastcgi_params; - fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_pass unix:/var/run/fcgiwrap/fcgiwrap.sock; - } - - location /zm/cache { - - alias /var/cache/zoneminder; - } - - location /zm { - - alias /usr/local/www/zoneminder; - - location ~ \.php$ { - - if (!-f $request_filename) { return 404; } - include fastcgi_params; - fastcgi_param SCRIPT_FILENAME $request_filename; - fastcgi_index index.php; - fastcgi_pass unix:/var/run/php-fpm.sock; - } - - location ~ \.(jpg|jpeg|gif|png|ico)$ { - access_log off; - expires 33d; - } - - location /zm/api/ { - alias /usr/local/www/zoneminder; - rewrite ^/zm/api(.+)$ /zm/api/app/webroot/index.php?p=$1 last; - } - } - } - - Enable and start NGINX - sysrc nginx_enable="YES" - service nginx start - -1.3 Install www/fcgiwrap - As NGINX lacks it's own CGI wrapper, we need external one. Please - note that ZoneMinder's montage page use simultaneous access to all - cameras, so you need to use at least as many fcgiwrap workers as - your number of cameras. The following example assumes you have 4. - - Enable and start FcgiWrap - sysrc fcgiwrap_enable="YES" - sysrc fcgiwrap_user="www" - sysrc fcgiwrap_socket_owner="www" - sysrc fcgiwrap_flags="-c 4" - -1.4 PHP is installed as a dependency to ZoneMinder. However, you should - tweak some of it's settings. - Edit /usr/local/etc/php-fpm.conf and set - - listen = /var/run/php-fpm.sock - listen.owner = www - listen.group = www - env[PATH] = /usr/local/bin:/usr/bin:/bin - - If you want to set another path for the socket file, make sure you - change it in your NGINX config well. The env[PATH] needs to be set - to locate the zip utility as ZoneMinder's export functions rely on - exec(). Sorry, chroot folks. - - PHP throws warning if date.timezone option is not set. The best place - to do it is to create new ini file in /usr/local/etc/php with overrides - - date.timezone = "UTC" - - Enable and start php-fpm - sysrc php_fpm_enable="YES" - service php-fpm start - -1.5 ZoneMinder constantly keeps the last N frames from its cameras to - preserve them when alarm occurs. This can be a performance hog if - placed on spindle drive. The best practice is put it on tmpfs. - See https://www.freebsd.org/cgi/man.cgi?query=tmpfs for more - information. - - ZoneMinder will use /tmp for default. If you plan to change it, see - ZM_PATH_MAP setting. - - Mapping /tmp to tmpfs is actually a recommended step under FreeBSD. - Edit /etc/fstab and add the following: - - tmpfs /tmp tmpfs rw,nosuid,mode=01777 0 0 - - The size of temporary files depends on your number of cameras - number and frames you plan to keep. My 12 3Mbit cameras with 25 - last frames consumes 6 GB. - -2. ZoneMinder installation - - Connect to MySQL under root and create zm user and populate database. - - mysql -u root -p - - CREATE DATABASE zm; - GRANT ALL PRIVILEGES ON zm.* TO 'zmuser'@'localhost' IDENTIFIED BY 'zmpass'; - FLUSH PRIVILEGES; - quit; - - mysql -u root -p zm < /usr/local/share/zoneminder/db/zm_create.sql - -2.1 If you have chosen to change the ZoneMinder MySQL credentials to something - other than zmuser/zmpass then you must now edit /usr/local/etc/zm.conf. Change - ZM_DB_USER and ZM_DB_PASS to the values you created in the previous step. - - Enable and start ZoneMinder - sysrc zoneminder_enable="YES" - service zoneminder start - -Upgrades -======== - -1. Stop ZoneMinder - service zoneminder stop - -2. Upgrade database - sudo -u www zmupdate.pl - -3. Start ZoneMinder - service zoneminder start - -Upgrading from www/zoneminder 1.32.x -===================================================== - -Before proceeding to upgrade sequence listed above, - -1. Connect to mysql server with root and issue - set global log_bin_trust_function_creators=1; diff -ruN pure/multimedia/zoneminder/files/pkg-message.in workshop/multimedia/zoneminder/files/pkg-message.in --- pure/multimedia/zoneminder/files/pkg-message.in 1970-01-01 00:00:00.000000000 +0000 +++ workshop/multimedia/zoneminder/files/pkg-message.in 2020-10-10 13:44:11.283771000 +0000 @@ -0,0 +1,176 @@ +[ +{ type: install + message: <