summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNocifer2022-06-09 22:15:03 +0300
committerNocifer2022-06-09 22:15:03 +0300
commit4518117c66253961cb50b42045de9ebc7e258072 (patch)
tree13cf593ebb3b3107439936c895832df9c0249808
parentf3c0fa38d4bbee1772b3e3549cfabb182f32d22d (diff)
downloadaur-4518117c66253961cb50b42045de9ebc7e258072.tar.gz
v=1.36.19,r=1
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD66
-rw-r--r--zmsetup.sh159
-rw-r--r--zoneminder-tmpfile.conf2
-rw-r--r--zoneminder.install8
-rw-r--r--zoneminder.service16
6 files changed, 46 insertions, 224 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 21c34fd47584..76fc15b8f1fc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,12 @@
pkgbase = zoneminder
pkgdesc = A full-featured, open source, state-of-the-art video surveillance software system
- pkgver = 1.36.18
+ pkgver = 1.36.19
pkgrel = 1
url = https://www.zoneminder.com/
install = zoneminder.install
arch = any
license = GPL2
makedepends = cmake
- makedepends = git
depends = polkit
depends = ffmpeg
depends = php-apcu
@@ -54,21 +53,21 @@ pkgbase = zoneminder
backup = etc/nginx/sites-available/zoneminder.conf
backup = etc/httpd/conf/extra/zoneminder.conf
backup = etc/php/conf.d/zoneminder.ini
- source = zoneminder-git::git+https://github.com/ZoneMinder/zoneminder.git#tag=1.36.18
+ source = ZoneMinder.tar.gz::https://github.com/ZoneMinder/zoneminder/archive/refs/tags/1.36.19.tar.gz
+ source = CakePHP.tar.gz::https://github.com/ZoneMinder/CakePHP-Enum-Behavior/archive/refs/tags/1.0-zm.tar.gz
+ source = Crud.tar.gz::https://github.com/FriendsOfCake/crud/archive/refs/tags/v3.2.0.tar.gz
+ source = RtspServer.zip::https://github.com/ZoneMinder/RtspServer/archive/refs/heads/master.zip
source = zoneminder-nginx.conf
source = zoneminder-httpd.conf
source = zoneminder-php.ini
- source = zoneminder.service
- source = zoneminder-tmpfile.conf
source = fcgiwrap-multiwatch.service
- source = zmsetup.sh
- sha256sums = SKIP
+ sha256sums = 0271afe97a24e879102e5efd935ff817c54b87e044a5c3c356a61bac3faed3f7
+ sha256sums = dbd231e97b950c698f0f501d6a53c7291c9985e766b09e3afe00cfe69a969f44
+ sha256sums = 55be29e1eccb44d4ad0db8b23c37cec50f5341f8e498583d472ed1f0493876e3
+ sha256sums = 57556adbeec7eebf1d00f7873930e144094ab26442d0852b63c1397f4b3af6d5
sha256sums = c60e855428a56cc327214aa13d02a70011bf3b63a94a0d845b1c5ea1fab28ad2
sha256sums = 1f0d2276861065caf0b6c030ba27a6edb6a2988c7a1ac0fdf4e8fcb856972715
sha256sums = 2d7f5ac073687be75c7724b0acd3785d8c358e4f65341e60d39eb6006f31389b
- sha256sums = 3e4de227e3154dffa887f2286c339ab3cf456f6d74a400b2786192b7e2b129c0
- sha256sums = b69ac1deaaf3cf84b4ae4dbab794e1b062823de817f1e3a816ccf5438db440c0
sha256sums = e95f9bef77aef647dd633bd9ad75dc099b6d7184684e133f2f20702de83a6260
- sha256sums = 255374c400e01c7666cc7b3e1f06da8445dc57afda631868d33ced62ba631c98
pkgname = zoneminder
diff --git a/PKGBUILD b/PKGBUILD
index e243b32a3632..d001caf68c6b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,7 +13,7 @@
# Orginally based on a Debian Squeeze package
pkgname=zoneminder
-pkgver=1.36.18
+pkgver=1.36.19
pkgrel=1
pkgdesc='A full-featured, open source, state-of-the-art video surveillance software system'
arch=('any')
@@ -33,7 +33,7 @@ depends=('polkit' 'ffmpeg'
# Needed for encryption
'perl-crypt-eksblowfish' 'perl-data-entropy'
)
-makedepends=('cmake' 'git')
+makedepends=('cmake')
optdepends=('mariadb'
'apache'
'nginx'
@@ -49,35 +49,42 @@ backup=("etc/nginx/sites-available/${pkgname}.conf"
"etc/httpd/conf/extra/${pkgname}.conf"
"etc/php/conf.d/${pkgname}.ini")
install=${pkgname}.install
-source=("${pkgname}-git::git+https://github.com/ZoneMinder/zoneminder.git#tag=${pkgver}"
- "zoneminder-nginx.conf"
- "zoneminder-httpd.conf"
- "zoneminder-php.ini"
- "zoneminder.service"
- "zoneminder-tmpfile.conf"
- "fcgiwrap-multiwatch.service"
- "zmsetup.sh")
-sha256sums=('SKIP'
+source=("ZoneMinder.tar.gz::https://github.com/ZoneMinder/zoneminder/archive/refs/tags/${pkgver}.tar.gz"
+ 'CakePHP.tar.gz::https://github.com/ZoneMinder/CakePHP-Enum-Behavior/archive/refs/tags/1.0-zm.tar.gz'
+ 'Crud.tar.gz::https://github.com/FriendsOfCake/crud/archive/refs/tags/v3.2.0.tar.gz'
+ 'RtspServer.zip::https://github.com/ZoneMinder/RtspServer/archive/refs/heads/master.zip'
+ 'zoneminder-nginx.conf'
+ 'zoneminder-httpd.conf'
+ 'zoneminder-php.ini'
+ 'fcgiwrap-multiwatch.service')
+sha256sums=('0271afe97a24e879102e5efd935ff817c54b87e044a5c3c356a61bac3faed3f7'
+ 'dbd231e97b950c698f0f501d6a53c7291c9985e766b09e3afe00cfe69a969f44'
+ '55be29e1eccb44d4ad0db8b23c37cec50f5341f8e498583d472ed1f0493876e3'
+ '57556adbeec7eebf1d00f7873930e144094ab26442d0852b63c1397f4b3af6d5'
'c60e855428a56cc327214aa13d02a70011bf3b63a94a0d845b1c5ea1fab28ad2'
'1f0d2276861065caf0b6c030ba27a6edb6a2988c7a1ac0fdf4e8fcb856972715'
'2d7f5ac073687be75c7724b0acd3785d8c358e4f65341e60d39eb6006f31389b'
- '3e4de227e3154dffa887f2286c339ab3cf456f6d74a400b2786192b7e2b129c0'
- 'b69ac1deaaf3cf84b4ae4dbab794e1b062823de817f1e3a816ccf5438db440c0'
- 'e95f9bef77aef647dd633bd9ad75dc099b6d7184684e133f2f20702de83a6260'
- '255374c400e01c7666cc7b3e1f06da8445dc57afda631868d33ced62ba631c98')
+ 'e95f9bef77aef647dd633bd9ad75dc099b6d7184684e133f2f20702de83a6260')
prepare () {
- cd ${pkgname}-git
-
- # Download and move extra PHP plugins into place
- git submodule update --init --recursive
+ cd ${pkgname}-${pkgver}
# Fix the launcher
sed -i 's|localhost/zm|localhost:8095|g' misc/${pkgname}.desktop.in
+
+ # Tweak the systemd service file
+ sed -i 's|After=network.target mysqld.service httpd.service|After=network.target mysqld.service httpd.service nginx.service|g' misc/${pkgname}.service.in
+ sed -i 's|Requires=mysqld.service httpd.service|Wants=mysqld.service httpd.service nginx.service|g' misc/${pkgname}.service.in
+
+ # Move third-party plugins into place
+ mv ../CakePHP-Enum-Behavior-1.0-zm/* web/api/app/Plugin/CakePHP-Enum-Behavior
+ mv ../crud-3.2.0/* web/api/app/Plugin/Crud
+ mv ../RtspServer-master/* dep/RtspServer
+
}
build() {
- cd ${pkgname}-git
+ cd ${pkgname}-${pkgver}
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DZM_CONFIG_DIR=/etc/${pkgname} \
@@ -96,7 +103,7 @@ build() {
}
package() {
- cd ${pkgname}-git
+ cd ${pkgname}-${pkgver}
make DESTDIR=${pkgdir} install
@@ -126,26 +133,23 @@ package() {
chmod 644 ${pkgdir}/etc/${pkgname}/zm.conf
chmod 644 ${pkgdir}/etc/${pkgname}/conf.d/*
- # Nginx conf file
+ # Nginx
install -Dm644 $srcdir/${pkgname}-nginx.conf ${pkgdir}/etc/nginx/sites-available/${pkgname}.conf
- # Apache conf file
+ # Apache
install -Dm644 $srcdir/${pkgname}-httpd.conf ${pkgdir}/etc/httpd/conf/extra/${pkgname}.conf
- # systemd service
- install -Dm644 $srcdir/${pkgname}.service ${pkgdir}/usr/lib/systemd/system/${pkgname}.service
-
- # systemd tmpfile
- install -Dm644 $srcdir/${pkgname}-tmpfile.conf ${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf
-
# php.ini extension
install -Dm644 $srcdir/${pkgname}-php.ini ${pkgdir}/etc/php/conf.d/${pkgname}.ini
# fcgiwrap-multiwatch service
install -Dm644 $srcdir/fcgiwrap-multiwatch.service ${pkgdir}/usr/lib/systemd/system/fcgiwrap-multiwatch.service
- # optional install script
- install -Dm755 $srcdir/zmsetup.sh ${pkgdir}/usr/bin/zmsetup.sh
+ # systemd service
+ install -Dm644 misc/${pkgname}.service ${pkgdir}/usr/lib/systemd/system/${pkgname}.service
+
+ # systemd tmpfile
+ install -Dm644 misc/${pkgname}-tmpfiles.conf ${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf
# logrotate conf file
install -Dm644 misc/logrotate.conf ${pkgdir}/etc/logrotate.d/${pkgname}
diff --git a/zmsetup.sh b/zmsetup.sh
deleted file mode 100644
index 01c92c0c41d2..000000000000
--- a/zmsetup.sh
+++ /dev/null
@@ -1,159 +0,0 @@
-#!/usr/bin/bash
-
-choice="$1"
-
-echo "WARNING: This script is heavilly WIP. Caveat emptor."
-echo
-echo "Please report any bugs you find at https://aur.archlinux.org/packages/zoneminder/"
-echo
-
-if [[ $EUID -ne 0 ]]
-then
- echo "ERROR: This script must be run as root."
- exit 1
-fi
-
-case "$choice" in
-
- --nginx )
-
- systemctl daemon-reload
-
- # Ensure Nginx, fcgiwrap, spawn-fcgi and multiwatch are installed
- if [[ "$(pacman -Qs nginx)" = *"local/nginx"* ]] && [[ "$(pacman -Qs fcgiwrap)" = *"local/fcgiwrap"* ]] && [[ "$(pacman -Qs spawn-fcgi)" = *"local/spawn-fcgi"* ]] && [[ "$(pacman -Qs multiwatch)" = *"local/multiwatch"* ]]
- then
- # Ensure the main conf file is present
- if [ -f /etc/nginx/nginx.conf ]
- then
- # Configure Nginx with the folder structure used in Debian-based distributions
- if ( ! grep -q 'sites-enabled' /etc/nginx/nginx.conf )
- then
- sed -i 's|http {|http {\'$'\n include sites-enabled/*.conf;|g' /etc/nginx/nginx.conf
- fi
-
- # Create the sites-enabled folder if it's not already created
- if [ ! -d /etc/nginx/sites-enabled ]
- then
- mkdir -p /etc/nginx/sites-enabled
- fi
-
- # Enable ZoneMinder's server block if it's not already enabled
- if [ ! -f /etc/nginx/sites-enabled/zoneminder.conf ]
- then
- ln -sf /etc/nginx/sites-{available,enabled}/zoneminder.conf
- fi
-
- # Start Nginx
- systemctl is-active --quiet nginx && systemctl stop nginx
- systemctl restart --quiet nginx && echo "* Nginx successfully configured"
- else
- echo "ERROR: Nginx is installed but /etc/nginx/nginx.conf was not found"
- exit 1
- fi
-
- ### fcgiwrap ###
-
- # By default fcgiwrap is configured to launch in 10 instances via spawn-fcgi and multiwatch. This should be
- # enough for ZoneMinder to operate with 3 cameras. If you need more than 10 simultaneous CGI threads, edit the
- # provided fcgiwrap-multiwatch.service file and increase the number of instances to whatever suits your needs.
-
- systemctl is-active --quiet fcgiwrap.socket && systemctl stop fcgiwrap.socket
- systemctl is-active --quiet fcgiwrap && systemctl stop fcgiwrap
- systemctl is-active --quiet fcgiwrap-multiwatch && systemctl stop fcgiwrap-multiwatch
- systemctl restart --quiet fcgiwrap-multiwatch && echo "* fcgiwrap-multiwatch successfully configured"
- else
- echo "ERROR: You must install Nginx, fcgiwrap, spawn-fcgi and multiwatch before using this script with the --nginx flag"
- exit 1
- fi
- ;;
-
- --apache )
-
- systemctl daemon-reload
-
- # Ensure Apache is installed
- if [[ "$(pacman -Qs apache)" = *"local/apache"* ]]
- then
- # Ensure the main conf file is present
- if [ -f /etc/httpd/conf/httpd.conf ]
- then
- # Enable mod_proxy
- sed -i 's|#LoadModule proxy_module modules/mod_proxy.so|LoadModule proxy_module modules/mod_proxy.so|g' /etc/httpd/conf/httpd.conf
- # Enable mod_proxy_fcgi
- sed -i 's|#LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so|LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so|g' /etc/httpd/conf/httpd.conf
- # Enable mod_rewrite
- sed -i 's|#LoadModule rewrite_module modules/mod_rewrite.so|LoadModule rewrite_module modules/mod_rewrite.so|g' /etc/httpd/conf/httpd.conf
- # Enable mod_cgid
- sed -i 's|#LoadModule cgid_module modules/mod_cgid.so|LoadModule cgid_module modules/mod_cgid.so|g' /etc/httpd/conf/httpd.conf
-
- # Enable ZoneMinder's VirtualHost if it's not already enabled
- if ( ! grep -q 'zoneminder.conf' /etc/httpd/conf/httpd.conf )
- then
- echo "Include conf/extra/zoneminder.conf" >> /etc/httpd/conf/httpd.conf
- fi
-
- # Start Apache
- systemctl is-active --quiet httpd && systemctl stop httpd
- systemctl restart --quiet httpd && echo "* Apache successfully configured"
- else
- echo "ERROR: Apache is installed but /etc/httpd/conf/httpd.conf' was not found"
- exit 1
- fi
- else
- echo "ERROR: You must install Apache before using this script with the --apache flag"
- exit 1
- fi
- ;;
-
- * )
-
- echo "Usage: $0 [--nginx|--apache]"
- exit 1
-esac
-
-# Ensure MariaDB is installed
-if [[ "$(pacman -Qs mariadb)" = *"local/mariadb "* ]]
-then
- # Initialize MariaDB's default database if it's not already initialized
- if [ ! -d /var/lib/mysql/mysql ]
- then
- systemctl is-active --quiet mariadb && systemctl stop mariadb
- mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql 2> /dev/null
- fi
-
- # Start MariaDB
- systemctl restart --quiet mariadb
-
- # Create ZoneMinder's database & user if they do not exist
- if [ ! -d /var/lib/mysql/zm ]
- then
- # Check for database root password
- if [[ "$(mysql -uroot -e "select * from mysql.user;" 2>&1)" = *"Access denied"* ]]
- then
- # If a database root password is set
- echo "* Secure MariaDB installation found, please enter the database root password."
- echo
- mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
- echo
- echo "* Enter the password one more time..."
- echo
- mysql -uroot -p -e "grant select,insert,update,delete,create,drop,alter,index,lock tables,alter routine,create routine,trigger,execute on zm.* to 'zmuser'@localhost identified by 'zmpass';"
- echo
- else
- # If a database root password is not set
- mysql -uroot < /usr/share/zoneminder/db/zm_create.sql
- mysql -uroot -e "grant select,insert,update,delete,create,drop,alter,index,lock tables,alter routine,create routine,trigger,execute on zm.* to 'zmuser'@localhost identified by 'zmpass';"
- fi
- fi
- echo "* MariaDB successfully configured"
-else
- echo "* Skipping MariaDB"
-fi
-
-systemctl restart php-fpm && echo "* php-fpm successfully configured"
-
-echo
-
-systemctl is-active --quiet zoneminder && systemctl stop zoneminder
-systemd-tmpfiles --create
-systemctl start zoneminder && echo " All done! ZoneMinder is (hopefully) listening at http://localhost:8095"
diff --git a/zoneminder-tmpfile.conf b/zoneminder-tmpfile.conf
deleted file mode 100644
index c2e27aa1e62c..000000000000
--- a/zoneminder-tmpfile.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-D /run/zoneminder 0775 http http
-D /var/tmp/zoneminder 0775 http http
diff --git a/zoneminder.install b/zoneminder.install
index 83e300144f2e..986c99774847 100644
--- a/zoneminder.install
+++ b/zoneminder.install
@@ -18,15 +18,11 @@ post_install() {
echo "4) After the previous steps are complete, you will also need to refresh systemd's tmpfiles."
echo
echo
- echo " For more detailed info on how to configure ZoneMinder, you should check the following links:"
+ echo " More information on how to setup and use ZoneMinder can be obtained at the following links:"
echo
- echo " * https://wiki.archlinux.org/index.php/ZoneMinder"
+ echo " * https://wiki.archlinux.org/title/ZoneMinder"
echo " * https://zoneminder.readthedocs.io/en/latest/"
echo
- echo " You can also run '/usr/bin/zmsetup.sh' if you wish to automate part or all of the configuration process."
- echo
- echo " Bug reports and packaging suggestions are always welcome at https://aur.archlinux.org/packages/zoneminder/"
- echo
}
post_upgrade() {
diff --git a/zoneminder.service b/zoneminder.service
deleted file mode 100644
index 46ec4b2452df..000000000000
--- a/zoneminder.service
+++ /dev/null
@@ -1,16 +0,0 @@
-[Unit]
-Description=ZoneMinder - CCTV Monitoring and Recording System
-After=network.target mariadb.service
-Wants=mariadb.service
-
-[Service]
-User=http
-Type=forking
-ExecStart=/usr/bin/zmpkg.pl start
-ExecReload=/usr/bin/zmpkg.pl restart
-ExecStop=/usr/bin/zmpkg.pl stop
-PIDFile=/run/zoneminder/zm.pid
-Environment=TZ=:/etc/localtime
-
-[Install]
-WantedBy=multi-user.target