summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Michalopoulos2020-10-13 13:06:00 +0300
committerAlexander Michalopoulos2020-10-13 13:06:00 +0300
commita877a613b8fef44b32f7ba4d6efaee5d9e281c26 (patch)
tree1b7d25f7297694d8c1c6e7a01f753deba141d814
parent7c20faac9463406c1b48ad7dfb050f7541897a91 (diff)
downloadaur-a877a613b8fef44b32f7ba4d6efaee5d9e281c26.tar.gz
v=6.0.1,r=1
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD130
-rw-r--r--zmeventnotification.install26
3 files changed, 122 insertions, 59 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b5ad998b31dd..3ed3e97f9f20 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = zmeventnotification
- pkgdesc = A Machine Learning powered, Secure Websocket & MQTT based event notification server for ZoneMinder
- pkgver = 5.15.6
- pkgrel = 2
+ pkgdesc = A machine learning powered, secure websocket & MQTT based event notification server for ZoneMinder
+ pkgver = 6.0.1
+ pkgrel = 1
url = https://github.com/pliablepixels/zmeventnotification
install = zmeventnotification.install
arch = any
@@ -24,22 +24,39 @@ pkgbase = zmeventnotification
depends = python-requests
depends = python-scikit-learn
depends = python-shapely
+ depends = python-mysql-connector
+ depends = python-psutil
+ depends = python-sqlalchemy
+ depends = qt5-base
conflicts = zmeventnotification-git
backup = etc/zoneminder/zmeventnotification.ini
backup = etc/zoneminder/secrets.ini
backup = etc/zoneminder/objectconfig.ini
- source = git+https://github.com/pliablepixels/zmeventnotification.git#tag=v5.15.6
+ backup = etc/zoneminder/es_rules.json
+ source = git+https://github.com/pliablepixels/zmeventnotification.git#tag=v6.0.1
source = https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov3.cfg
source = https://raw.githubusercontent.com/pjreddie/darknet/master/data/coco.names
source = https://pjreddie.com/media/files/yolov3.weights
source = https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov3-tiny.cfg
source = https://pjreddie.com/media/files/yolov3-tiny.weights
+ source = https://raw.githubusercontent.com/AlexeyAB/darknet/master/cfg/yolov4.cfg
+ source = https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.weights
+ source = https://raw.githubusercontent.com/AlexeyAB/darknet/master/cfg/yolov4-tiny.cfg
+ source = https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights
+ source = https://dl.google.com/coral/canned_models/coco_labels.txt
+ source = https://github.com/google-coral/edgetpu/raw/master/test_data/ssd_mobilenet_v2_coco_quant_postprocess_edgetpu.tflite
sha256sums = SKIP
sha256sums = 22489ea38575dfa36c67a90048e8759576416a79d32dc11e15d2217777b9a953
sha256sums = 634a1132eb33f8091d60f2c346ababe8b905ae08387037aed883953b7329af84
sha256sums = 523e4e69e1d015393a1b0a441cef1d9c7659e3eb2d7e15f793f060a21b32f297
sha256sums = 84eb7a675ef87c906019ff5a6e0effe275d175adb75100dcb47f0727917dc2c7
sha256sums = dccea06f59b781ec1234ddf8d1e94b9519a97f4245748a7d4db75d5b7080a42c
+ sha256sums = a6d0f8e5c62cc8378384f75a8159b95fa2964d4162e33351b00ac82e0fc46a34
+ sha256sums = e8a4f6c62188738d86dc6898d82724ec0964d0eb9d2ae0f0a9d53d65d108d562
+ sha256sums = 6cbf5ece15235f66112e0bedebb324f37199b31aee385b7e18f0bbfb536b258e
+ sha256sums = 037676f0d929c24e1bd9a0037fe30dc416fc26e0ca2a4491a44d024873316061
+ sha256sums = 93f235896748537fc71325a070ee32e9a0afda2481ceb943559325619763fa6d
+ sha256sums = 232775917b5e0162b25c07bb1502ec3bbdeb5d0f1a835aba3097d5a2f4fc11e1
pkgname = zmeventnotification
diff --git a/PKGBUILD b/PKGBUILD
index 4c31d4da9b44..9a45862b6846 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,20 +1,26 @@
# Maintainer: Nocifer <apmichalopoulos at gmail dot com>
pkgname=zmeventnotification
-pkgver=5.15.6
-pkgrel=2
-pkgdesc='A Machine Learning powered, Secure Websocket & MQTT based event notification server for ZoneMinder'
+pkgver=6.0.1
+pkgrel=1
+pkgdesc='A machine learning powered, secure websocket & MQTT based event notification server for ZoneMinder'
arch=('any')
url='https://github.com/pliablepixels/zmeventnotification'
license=('GPL')
depends=('opencv' 'perl-config-inifiles' 'perl-crypt-eksblowfish' 'perl-json' 'perl-lwp-protocol-https' 'perl-net-mqtt-simple'
'perl-net-websocket-server' 'python-face_recognition' 'python-gifsicle' 'python-future' 'python-imageio' 'python-imageio-ffmpeg'
- 'python-imutils' 'python-pyzm-git' 'python-requests' 'python-scikit-learn' 'python-shapely')
+ 'python-imutils' 'python-pyzm-git' 'python-requests' 'python-scikit-learn' 'python-shapely'
+ # ¯\_(ツ)_/¯
+ 'python-mysql-connector' 'python-psutil' 'python-sqlalchemy' 'qt5-base'
+ # Uncomment the next line to enable support for the Google Coral Edge TPU
+ #'edgetpu_api'
+ )
makedepends=('git')
conflicts=('zmeventnotification-git')
backup=('etc/zoneminder/zmeventnotification.ini'
'etc/zoneminder/secrets.ini'
- 'etc/zoneminder/objectconfig.ini')
+ 'etc/zoneminder/objectconfig.ini'
+ 'etc/zoneminder/es_rules.json')
install=$pkgname.install
source=("git+https://github.com/pliablepixels/$pkgname.git#tag=v$pkgver"
# YOLOv3
@@ -25,17 +31,30 @@ source=("git+https://github.com/pliablepixels/$pkgname.git#tag=v$pkgver"
"https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov3-tiny.cfg"
#"https://raw.githubusercontent.com/pjreddie/darknet/master/data/coco.names"
"https://pjreddie.com/media/files/yolov3-tiny.weights"
- # YOLOv4 (not yet enabled because it requires an OpenCV version newer than the current stable 4.3.0)
- #"https://raw.githubusercontent.com/AlexeyAB/darknet/master/cfg/yolov4.cfg"
+ # YOLOv4
+ "https://raw.githubusercontent.com/AlexeyAB/darknet/master/cfg/yolov4.cfg"
#"https://raw.githubusercontent.com/pjreddie/darknet/master/data/coco.names"
- #"https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.weights"
+ "https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.weights"
+ # YOLOv4 Tiny
+ "https://raw.githubusercontent.com/AlexeyAB/darknet/master/cfg/yolov4-tiny.cfg"
+ #"https://raw.githubusercontent.com/pjreddie/darknet/master/data/coco.names"
+ "https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights"
+ # Google Coral Edge TPU
+ "https://dl.google.com/coral/canned_models/coco_labels.txt"
+ "https://github.com/google-coral/edgetpu/raw/master/test_data/ssd_mobilenet_v2_coco_quant_postprocess_edgetpu.tflite"
)
sha256sums=('SKIP'
'22489ea38575dfa36c67a90048e8759576416a79d32dc11e15d2217777b9a953'
'634a1132eb33f8091d60f2c346ababe8b905ae08387037aed883953b7329af84'
'523e4e69e1d015393a1b0a441cef1d9c7659e3eb2d7e15f793f060a21b32f297'
'84eb7a675ef87c906019ff5a6e0effe275d175adb75100dcb47f0727917dc2c7'
- 'dccea06f59b781ec1234ddf8d1e94b9519a97f4245748a7d4db75d5b7080a42c')
+ 'dccea06f59b781ec1234ddf8d1e94b9519a97f4245748a7d4db75d5b7080a42c'
+ 'a6d0f8e5c62cc8378384f75a8159b95fa2964d4162e33351b00ac82e0fc46a34'
+ 'e8a4f6c62188738d86dc6898d82724ec0964d0eb9d2ae0f0a9d53d65d108d562'
+ '6cbf5ece15235f66112e0bedebb324f37199b31aee385b7e18f0bbfb536b258e'
+ '037676f0d929c24e1bd9a0037fe30dc416fc26e0ca2a4491a44d024873316061'
+ '93f235896748537fc71325a070ee32e9a0afda2481ceb943559325619763fa6d'
+ '232775917b5e0162b25c07bb1502ec3bbdeb5d0f1a835aba3097d5a2f4fc11e1')
prepare() {
cd $pkgname
@@ -43,65 +62,76 @@ prepare() {
# Change the default upstream ZM address to match the one used by the ZoneMinder package in the AUR
sed -i 's|https://portal/zm|http://localhost:8095|g' secrets.ini
- # Hackilly disable SSL by default (because it requires the user to first generate an SSL certificate or the notification server won't work)
- sed -i '111s|enable = yes|enable = no|g' zmeventnotification.ini
+ # Hackilly disable SSL by default (because it requires the user to first generate a real SSL certificate or the notification server won't work)
+ sed -i '124s|enable = yes|enable = no|g' zmeventnotification.ini
}
package() {
# Create the folder structure
- install -dm755 $pkgdir/etc/zoneminder
- install -dm755 $pkgdir/usr/bin
- install -dm755 $pkgdir/var/lib/$pkgname
- install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/bin
- install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/push
- install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/contrib
- install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/images
- install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/mlapi
- install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/known_faces
- install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/unknown_faces
- install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/models/yolov3
- install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/models/tinyyolo
- install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/models/yolov4
- install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/misc
+ install -dm755 $pkgdir/etc/zoneminder
+ install -dm755 $pkgdir/usr/bin
+ install -dm755 $pkgdir/var/lib/$pkgname
+ install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/bin
+ install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/push
+ install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/contrib
+ install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/images
+ install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/mlapi
+ install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/known_faces
+ install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/unknown_faces
+ install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/models/yolov3
+ install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/models/tinyyolov3
+ install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/models/yolov4
+ install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/models/tinyyolov4
+ install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/models/coral_edgetpu
+ install -dm755 -o http -g http $pkgdir/var/lib/$pkgname/misc
# Move the object recognition model files into place
- install -m644 yolov3.cfg $pkgdir/var/lib/$pkgname/models/yolov3
- install -m644 coco.names $pkgdir/var/lib/$pkgname/models/yolov3
- install -m644 yolov3.weights $pkgdir/var/lib/$pkgname/models/yolov3
+ install -m644 yolov3.cfg $pkgdir/var/lib/$pkgname/models/yolov3
+ install -m644 coco.names $pkgdir/var/lib/$pkgname/models/yolov3
+ install -m644 yolov3.weights $pkgdir/var/lib/$pkgname/models/yolov3
+
+ install -m644 yolov3-tiny.cfg $pkgdir/var/lib/$pkgname/models/tinyyolov3
+ install -m644 coco.names $pkgdir/var/lib/$pkgname/models/tinyyolov3
+ install -m644 yolov3-tiny.weights $pkgdir/var/lib/$pkgname/models/tinyyolov3
+
+ install -m644 yolov4.cfg $pkgdir/var/lib/$pkgname/models/yolov4
+ install -m644 coco.names $pkgdir/var/lib/$pkgname/models/yolov4
+ install -m644 yolov4.weights $pkgdir/var/lib/$pkgname/models/yolov4
- install -m644 yolov3-tiny.cfg $pkgdir/var/lib/$pkgname/models/tinyyolo
- install -m644 coco.names $pkgdir/var/lib/$pkgname/models/tinyyolo
- install -m644 yolov3-tiny.weights $pkgdir/var/lib/$pkgname/models/tinyyolo
+ install -m644 yolov4-tiny.cfg $pkgdir/var/lib/$pkgname/models/tinyyolov4
+ install -m644 coco.names $pkgdir/var/lib/$pkgname/models/tinyyolov4
+ install -m644 yolov4-tiny.weights $pkgdir/var/lib/$pkgname/models/tinyyolov4
- # See comment in source section for why these are disabled
- #install -m644 yolov4.cfg $pkgdir/var/lib/$pkgname/models/yolov4
- #install -m644 coco.names $pkgdir/var/lib/$pkgname/models/yolov4
- #install -m644 yolov4.weights $pkgdir/var/lib/$pkgname/models/yolov4
+ install -m644 coco_labels.txt $pkgdir/var/lib/$pkgname/models/coral_edgetpu/coco_indexed.names
+ install -m644 ssd_mobilenet_v2_coco_quant_postprocess_edgetpu.tflite $pkgdir/var/lib/$pkgname/models/coral_edgetpu
# Move the rest of the files into place
cd $pkgname
- install -m755 -o http -g http zmeventnotification.pl $pkgdir/usr/bin
-
- install -m755 -o http -g http pushapi_plugins/pushapi_pushover.py $pkgdir/var/lib/$pkgname/bin
-
- install -m755 -o http -g http hook/zm_event_start.sh $pkgdir/var/lib/$pkgname/bin
- install -m755 -o http -g http hook/zm_event_end.sh $pkgdir/var/lib/$pkgname/bin
- install -m755 -o http -g http hook/zm_detect.py $pkgdir/var/lib/$pkgname/bin
- install -m755 -o http -g http hook/zm_train_faces.py $pkgdir/var/lib/$pkgname/bin
+ install -m755 -o http -g http zmeventnotification.pl $pkgdir/usr/bin
- install -m644 -o http -g http docs/guides/contrib_guidelines.rst $pkgdir/var/lib/$pkgname/contrib
- install -m755 -o http -g http contrib/* $pkgdir/var/lib/$pkgname/contrib
+ install -m755 -o http -g http pushapi_plugins/pushapi_pushover.py $pkgdir/var/lib/$pkgname/bin
- install -m644 zmeventnotification.ini $pkgdir/etc/zoneminder/
- install -m644 secrets.ini $pkgdir/etc/zoneminder/
- install -m644 hook/objectconfig.ini $pkgdir/etc/zoneminder/
+ install -m755 -o http -g http hook/zm_event_start.sh $pkgdir/var/lib/$pkgname/bin
+ install -m755 -o http -g http hook/zm_event_end.sh $pkgdir/var/lib/$pkgname/bin
+ install -m755 -o http -g http hook/zm_detect.py $pkgdir/var/lib/$pkgname/bin
+ install -m755 -o http -g http hook/zm_train_faces.py $pkgdir/var/lib/$pkgname/bin
+
+ # Optional script to migrate your settings from 5.15.x to 6.x.x (read the official documentation for instructions)
+ install -m755 -o http -g http hook/config_upgrade.py $pkgdir/var/lib/$pkgname/bin
+
+ install -m644 -o http -g http docs/guides/contrib_guidelines.rst $pkgdir/var/lib/$pkgname/contrib
+ install -m755 -o http -g http contrib/* $pkgdir/var/lib/$pkgname/contrib
+
+ install -m644 zmeventnotification.ini $pkgdir/etc/zoneminder/
+ install -m644 secrets.ini $pkgdir/etc/zoneminder/
+ install -m644 hook/objectconfig.ini $pkgdir/etc/zoneminder/
+ install -m644 es_rules.json $pkgdir/etc/zoneminder/
# Temp fix for hardcoded /zm/ links in the configuration files
- ln -sf /etc/zoneminder $pkgdir/etc/zm
+ ln -sf /etc/zoneminder $pkgdir/etc/zm
# Install the accompanying Python package zmes_hooks
cd hook
-
python setup.py install --root="${pkgdir}/" --optimize=1
}
diff --git a/zmeventnotification.install b/zmeventnotification.install
index 95b1220b4db5..74a49f17ee54 100644
--- a/zmeventnotification.install
+++ b/zmeventnotification.install
@@ -2,26 +2,42 @@ post_install() {
echo
echo " ZoneMinder Event Notification Server has been installed but some additional steps are required:"
echo
+ echo "0) This software is heavilly WIP, so you should take it for granted that each and every new release"
+ echo " will probably contain some breaking changes that will require manual intervention on your part."
+ echo
+ echo " May the following link be a light to you in dark places, when all other lights go out:"
+ echo
+ echo " https://zmeventnotification.readthedocs.io/en/stable/guides/breaking.html"
+ echo
echo "1) If your ZoneMinder instance is not located at http://localhost:8095, or if you have locked it behind"
echo " a password, you should make sure to edit /etc/zoneminder/secrets.ini and fill in any required info."
echo
- echo " Better yet, because that file contains various useful tidbits, it wouldn't hurt to check it out anyway"
- echo " and become familiar with it."
+ echo " Better yet, because that file also contains some other very useful tidbits, it wouldn't hurt to"
+ echo " check it out anyway and become familiar with it."
echo
echo "2) You should also take a look at /etc/zoneminder/objectconfig.ini and /etc/zoneminder/zmeventnotification.ini"
echo " which contain the settings for the OpenCV object recognition algorithms and for the server itself, respectively."
echo
echo " Especially the former, objectconfig.ini, is the go-to file if you want to set up your cameras so they can"
- echo " utilize OpenCV and take advantage of its superb object recognition capabilities."
+ echo " utilize OpenCV and properly take advantage of its superb object recognition capabilities."
echo
echo "3) After you're done with the previous steps, you are highly encouraged to verify that the server has been"
echo " properly installed and configured by first launching it once manually. To do so, run the following:"
echo
echo " sudo -u http /usr/bin/zmeventnotification.pl"
echo
+ echo "4) -------------------------- EdgeTPU note ----------------------------"
echo
- echo " For more detailed info you should read the official documentation:"
+ echo " Note that while Coral Edge TPU support has been added, the expectation"
+ echo " is that you have properly followed the instructions at:"
echo
- echo " https://zmeventnotification.readthedocs.io/en/latest/"
+ echo " https://coral.ai/docs/accelerator/get-started/"
echo
+ echo " If you don't, things will break. Further, you also need to make sure"
+ echo " your web user (Arch default is 'http') has access to the Coral device."
+ echo
+}
+
+post_upgrade() {
+ post_install
}