diff options
author | Luis Aranguren | 2019-12-18 16:42:51 +1100 |
---|---|---|
committer | Luis Aranguren | 2019-12-18 16:42:51 +1100 |
commit | 699f655c64f2170a5862ec67a75127f0023bcbc1 (patch) | |
tree | 6a3591fa5f62644e46d7e1f43d28bda24823dbed | |
download | aur-699f655c64f2170a5862ec67a75127f0023bcbc1.tar.gz |
v4.6.1.r20.gf70308a
-rw-r--r-- | .SRCINFO | 47 | ||||
-rw-r--r-- | PKGBUILD | 102 |
2 files changed, 149 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..aa2240630989 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,47 @@ +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 = 1 + url = https://github.com/pliablepixels/zmeventnotification + arch = x86_64 + license = GPL + license = MIT + makedepends = cmake + makedepends = wget + makedepends = git + depends = perl-crypt-mysql + depends = perl-config-inifiles + depends = perl-crypt-eksblowfish + depends = perl-net-websocket-server + depends = perl-json + depends = perl-lwp-protocol-https + depends = perl-io-socket-ssl + depends = perl-net-mqtt-simple + depends = perl-config-inifiles + depends = opencv + depends = geos + depends = hdf5 + depends = python-numpy + depends = python-imutils + depends = python-pyzm-git + depends = python-sqlalchemy + depends = python-psutil + depends = python-future + depends = python-shapely + depends = python-mysql-connector + depends = python-sklearn-bayes + depends = python-face_recognition + backup = etc/zoneminder/objectconfig.ini + backup = etc/zoneminder/secrets.ini + backup = etc/zoneminder/zmeventnotification.ini + source = git://github.com/pliablepixels/zmeventnotification.git + source = https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov3.cfg + source = yolov3_classes.txt::https://raw.githubusercontent.com/pjreddie/darknet/master/data/coco.names + source = https://pjreddie.com/media/files/yolov3.weights + sha256sums = SKIP + sha256sums = SKIP + sha256sums = SKIP + sha256sums = 523e4e69e1d015393a1b0a441cef1d9c7659e3eb2d7e15f793f060a21b32f297 + +pkgname = zmeventnotification-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..92f4d0830ca7 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,102 @@ +# Maintainer: Luis Aranguren <pizzaman@hotmail.com> + +pkgname=zmeventnotification-git +_pkgname=zmeventnotification +pkgver=v4.6.1.r20.gf70308a +pkgrel=1 +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' +license=('GPL' 'MIT') +depends=('perl-crypt-mysql' 'perl-config-inifiles' 'perl-crypt-eksblowfish' 'perl-net-websocket-server' 'perl-json' 'perl-lwp-protocol-https' + 'perl-io-socket-ssl' 'perl-net-mqtt-simple' 'perl-config-inifiles' 'opencv' + #hooks + 'geos' 'hdf5' 'python-numpy' 'python-imutils' 'python-pyzm-git' 'python-sqlalchemy' 'python-psutil' 'python-future' 'python-shapely' 'python-mysql-connector' + 'python-sklearn-bayes' 'python-face_recognition' +) +makedepends=('cmake' 'wget' 'git') +optdepends=() +conflicts=() +backup=('etc/zoneminder/objectconfig.ini' 'etc/zoneminder/secrets.ini' 'etc/zoneminder/zmeventnotification.ini') +NoUpgrade=('etc/zoneminder/objectconfig.ini' 'etc/zoneminder/secrets.ini' 'etc/zoneminder/zmeventnotification.ini') +install= +source=("git://github.com/pliablepixels/$_pkgname.git" + 'https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolov3.cfg' + 'yolov3_classes.txt::https://raw.githubusercontent.com/pjreddie/darknet/master/data/coco.names' + 'https://pjreddie.com/media/files/yolov3.weights' +) +sha256sums=('SKIP' + 'SKIP' + 'SKIP' + '523e4e69e1d015393a1b0a441cef1d9c7659e3eb2d7e15f793f060a21b32f297' +) + +pkgver() { + cd "$_pkgname" + git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +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|/opt|" zmeventnotification.ini + sed -i "s|/etc/apache2/ssl/yourportal|/etc/ssl/private|" zmeventnotification.ini + + #secrets.ini + sed -i "s|URL=https://portal/zm|ZM_PORTAL=http://your_website|" secrets.ini + sed -i "s|ZM_PORTAL=https://portal/zm|ZM_PORTAL=http://127.0.0.1:8095|" 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 +} + +build() { + cd $_pkgname/hook + python setup.py build +} + +package() { + cd $_pkgname + #bin + install -Dm 755 zmeventnotification.pl "${pkgdir}/usr/bin/zmeventnotification.pl" + + #Folder structure + mkdir -p "${pkgdir}/opt/zmeventnotification/push" 2>/dev/null + mkdir -p "${pkgdir}/opt/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 + + #Yolo + install -Dm644 ${srcdir}/yolo* --target-directory "${pkgdir}/opt/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" + cd hook + python setup.py install --root="$pkgdir/" --optimize=1 --skip-build + cd .. + + #ES config files + mkdir -p "${pkgdir}/etc/zoneminder" 2>/dev/null + install --backup=numbered -m 644 zmeventnotification.ini "${pkgdir}/etc/zoneminder/" + install --backup=numbered -m 644 secrets.ini "${pkgdir}/etc/zoneminder/" + + #Hook config files + install --backup=numbered -m 644 hook/objectconfig.ini "${pkgdir}/etc/zoneminder/" + + #webserver should access + chown -R http:http "${pkgdir}/var/lib/zmeventnotification" + + #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 +} |