summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Aranguren2019-12-19 13:42:16 +1100
committerLuis Aranguren2019-12-19 13:42:16 +1100
commitfd18aafe34a001d648568ccc6f4c6e4527b686d9 (patch)
tree955205f1be885b1cd6ceec18f1a266b3bd3a44dc
parentc96f984e4505030adcf6ddb076aef16d9c2b76bd (diff)
downloadaur-fd18aafe34a001d648568ccc6f4c6e4527b686d9.tar.gz
pkgrel=4, Breaking changes for v5.0, removed /opt to make easier to maintain, fixed secrets.ini, included symbolic link /etc/zm->/etc/zoneminder
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD40
2 files changed, 14 insertions, 30 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b0fc640ab2c6..38a78d9a4705 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = zmeventnotification-git
pkgdesc = Event Notification Server sits along with ZoneMinder and offers real time notifications, support for push notifications as well as Machine Learning powered recognition + hooks
- pkgver = v4.6.1.r20.gf70308a
- pkgrel = 3
+ pkgver = v4.6.1.r58.geab8548
+ pkgrel = 4
url = https://github.com/pliablepixels/zmeventnotification
arch = x86_64
license = GPL
diff --git a/PKGBUILD b/PKGBUILD
index 67b582a557a3..febb8802a2b2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,8 @@
pkgname=zmeventnotification-git
_pkgname=zmeventnotification
-pkgver=v4.6.1.r20.gf70308a
-pkgrel=3
+pkgver=v4.6.1.r58.geab8548
+pkgrel=4
pkgdesc='Event Notification Server sits along with ZoneMinder and offers real time notifications, support for push notifications as well as Machine Learning powered recognition + hooks'
arch=('x86_64')
url='https://github.com/pliablepixels/zmeventnotification'
@@ -38,29 +38,9 @@ pkgver() {
prepare () {
cd $_pkgname
- #objectconfig.ini
- sed -i "s|/etc/zm|/etc/zoneminder|" hook/objectconfig.ini
- sed -i "s|/var/lib/zmeventnotification/models|/opt/zmeventnotification/models|" hook/objectconfig.ini
- sed -i "s|models=yolo,face|models=yolo|" hook/objectconfig.ini
-
- #zmeventnotification.ini
- sed -i "s|/etc/zm|/etc/zoneminder|" zmeventnotification.ini
- sed -i "s|/var/lib/zmeventnotification/bin/zm_detect_wrapper.sh|/opt/zmeventnotification/bin/zm_detect_wrapper.sh|" zmeventnotification.ini
- sed -i "s|/etc/apache2/ssl/yourportal|/etc/ssl/private|" zmeventnotification.ini
#secrets.ini
sed -i "s|ZM_PORTAL=https://portal/zm|ZM_PORTAL=http://127.0.0.1:8095|" secrets.ini
- sed -i "s|URL=https://portal/zm|ZM_PORTAL=http://your_website|" secrets.ini
-
- #zm_detect_wrapper.sh
- sed -i "s|/etc/zm|/etc/zoneminder|" hook/zm_detect_wrapper.sh
- sed -i "s|/var/lib|/opt|" hook/zm_detect_wrapper.sh
-
- #zmeventnotification.pl
- sed -i "s|/etc/zm/zmeventnotification.ini|/etc/zoneminder/zmeventnotification.ini|" zmeventnotification.pl
-
- #zm_train_faces.py
- sed -i "s|/etc/zm/objectconfig.ini|/etc/zoneminder/objectconfig.ini|" hook/zm_train_faces.py
}
build() {
@@ -75,18 +55,19 @@ package() {
#Folder structure
mkdir -p "${pkgdir}/var/lib/zmeventnotification/push" 2>/dev/null
- mkdir -p "${pkgdir}/opt/zmeventnotification/bin" 2>/dev/null
+ mkdir -p "${pkgdir}/var/lib/zmeventnotification/bin" 2>/dev/null
mkdir -p "${pkgdir}/var/lib/zmeventnotification/images" 2>/dev/null
mkdir -p "${pkgdir}/var/lib/zmeventnotification/known_faces" 2>/dev/null
- mkdir -p "${pkgdir}/opt/zmeventnotification/misc" 2>/dev/null
+ mkdir -p "${pkgdir}/var/lib/zmeventnotification/misc" 2>/dev/null
#Yolo
- install -Dm644 ${srcdir}/yolo* --target-directory "${pkgdir}/opt/zmeventnotification/models/yolov3/"
+ install -Dm644 ${srcdir}/yolo* --target-directory "${pkgdir}/var/lib/zmeventnotification/models/yolov3/"
#ML Hooks
- install -Dm 755 hook/zm_detect_wrapper.sh "${pkgdir}/opt/zmeventnotification/bin/zm_detect_wrapper.sh"
- install -Dm 755 hook/zm_detect.py "${pkgdir}/opt/zmeventnotification/bin/zm_detect.py"
- install -Dm 755 hook/zm_train_faces.py "${pkgdir}/opt/zmeventnotification/bin/zm_train_faces.py"
+ install -Dm 755 hook/zm_event_start.sh "${pkgdir}/var/lib/zmeventnotification/bin/zm_event_start.sh"
+ install -Dm 755 hook/zm_event_end.sh "${pkgdir}/var/lib/zmeventnotification/bin/zm_event_end.sh"
+ install -Dm 755 hook/zm_detect.py "${pkgdir}/var/lib/zmeventnotification/bin/zm_detect.py"
+ install -Dm 755 hook/zm_train_faces.py "${pkgdir}/var/lib/zmeventnotification/bin/zm_train_faces.py"
cd hook
python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
cd ..
@@ -102,6 +83,9 @@ package() {
#webserver should access
chown -R http:http "${pkgdir}/var/lib/zmeventnotification"
+ #symbolic link /etc/zm to /etc/zoneminder
+ ln -s "/etc/zoneminder" "${pkgdir}/etc/zm"
+
#Notes
#Disabled SSL and Authnetication in zmeventnotificaiton.ini
#Make a guide so people fill secrets.ini ZM_USER ZM_PASSWORD ZMES_PICTURE_URL or link to he website