summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAlexander Michalopoulos2020-01-18 15:38:44 +0200
committerAlexander Michalopoulos2020-01-18 15:38:44 +0200
commit43d4d3410eb4ac2133d1101aa49324a26c672045 (patch)
tree8eca96708993226d070f61135c7c8b9726a772c2 /PKGBUILD
parent9eed1a3ab974ac0348e5d13212439652cc929e0e (diff)
downloadaur-43d4d3410eb4ac2133d1101aa49324a26c672045.tar.gz
v=1.34.0,r=1 - Multiple breaking changes, details in the PKGBUILD'
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD167
1 files changed, 84 insertions, 83 deletions
diff --git a/PKGBUILD b/PKGBUILD
index e0aadcba310e..3434997e183e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -14,101 +14,98 @@
-### Important notes for version 1.32.x ###
+
+### Important notes for version 1.34.x ###
+#
+# 1) From now on, this package will only install ZoneMinder itself. In other words, this means that after the setup is complete, ZoneMinder
+# will NOT be fully deployed and thus will NOT be able to function properly without manual intervention.
+#
+# As a bare minimum, on a fresh install you will also need to at least install and configure a MySQL-compatible server and a web server, as well
+# as perform some other small tweaks needed to finalize the setup (e.g. you will need to refresh systemd's tmpfiles and, if you'll be using Nginx,
+# you will also need to install and configure fcgiwrap, spawn-fcgi and multiwatch).
+#
+# For more detailed info on how to configure ZoneMinder, you should check the following links:
#
-# 1) git-clone for CakePHP and Crud sources was replaced with published precompiled packages, as follows:
-# - CakePHP-Enum-Behaviour is pulled from the ZoneMinder repo, because a change is needed that has not yet been merged upstream.
-# - Crud is pulled from its official repo, since Pull Request #582 has been merged as required by the ZoneMinder devs.
+# * https://wiki.archlinux.org/index.php/ZoneMinder
+# * https://zoneminder.readthedocs.io/en/latest/
#
-# 2) By default, ZoneMinder now runs at localhost:8095 instead of localhost/zm (this can be changed by editing the provided conf files).
+# Also, a separate script (zmsetup.sh) is now provided to help with automating the above procedure, if so desired.
#
-# 3) Apache was switched out in favor of Nginx, but remains as an optional dependency.
+# 2) As an extension to the above, there is now no hard dependency on either Apache, Nginx or MariaDB.
+#
+# 3) ZoneMinder's webroot has been relocated from /srv/zoneminder to /usr/share/webapps/zoneminder. The default configuration files have
+# been adjusted for this change, but if you've ever manually edited your local copies then they will not be automatically overwritten with the new
+# versions, which means updating to 1.34 will probably break your existing setup. Do look for any rogue .pacsave files in /etc after you update!
+#
+# Bug reports and packaging suggestions are always welcome at https://aur.archlinux.org/packages/zoneminder/
-#######################################################################################################################
-# #
-# If you're upgrading from a release older than 1.32.0: #
-# #
-# Due to the many breaking changes in new releases (both upstream and in the packaging), it's recommended to backup #
-# any existing ZoneMinder databases and perform a clean installation. Failure to do so may have very weird results. #
-# #
-#######################################################################################################################
pkgname=zoneminder
-pkgver=1.32.3
-pkgrel=3
+pkgver=1.34.0
+pkgrel=1
pkgdesc='A full-featured, open source, state-of-the-art video surveillance software system'
-arch=('x86_64')
-url='https://zoneminder.com/'
+arch=('any')
+url='https://www.zoneminder.com/'
license=('GPL2')
depends=('polkit' 'ffmpeg' 'libmp4v2'
'php-apcu' 'php-fpm' 'php-gd'
- 'perl-archive-zip' 'perl-data-dump' 'perl-date-manip' 'perl-dbd-mysql' 'perl-device-serialport' 'perl-file-slurp' 'perl-image-info'
- 'perl-libwww' 'perl-mime-lite' 'perl-mime-tools' 'perl-number-bytes-human' 'perl-sys-meminfo' 'perl-sys-mmap'
+ 'perl-archive-zip' 'perl-data-dump' 'perl-date-manip' 'perl-datetime' 'perl-dbd-mysql' 'perl-device-serialport' 'perl-file-slurp'
+ 'perl-image-info' 'perl-libwww' 'perl-mime-lite' 'perl-mime-tools' 'perl-net-sftp-foreign' 'perl-number-bytes-human' 'perl-php-serialization'
+ 'perl-sys-cpu' 'perl-sys-meminfo' 'perl-sys-mmap' 'perl-uri-encode'
# Needed for ONVIF support
'perl-class-load' 'perl-data-uuid' 'perl-io-socket-multicast' 'perl-soap-wsdl' 'perl-xml-parser'
# Needed for SSL support
'perl-lwp-protocol-https'
- # Apparently needed for Telemetry support
- 'perl-json-maybexs'
- # Unverified dependencies. So far not installing them hasn't raised any red flags, but I can't be 100% sure whether they're leftovers from
- # previous ZoneMinder incarnations or if they're needed for proper operation during runtime, so for the time being I'm leaving them in.
- 'perl-net-sftp-foreign' 'perl-php-serialization' 'perl-sys-cpu' 'perl-uri-encode'
-
- # Remove the following line if you don't need Nginx
- 'nginx-mainline' 'fcgiwrap' 'spawn-fcgi' 'multiwatch'
-
- # Remove the following line if you don't need MariaDB
- 'mariadb'
-
+ # Needed for Telemetry support
+ 'perl-json-maybexs'
+ # Needed for encryption
+ 'perl-crypt-eksblowfish' 'perl-data-entropy'
)
-makedepends=('cmake')
-optdepends=('apache: alternative web server'
- 'vlc: provides libvlc (may achieve better performance with some camera models)')
+makedepends=('cmake' 'git')
+optdepends=('mariadb'
+ 'apache'
+ 'nginx'
+ 'fcgiwrap: required if using nginx'
+ 'spawn-fcgi: required if using nginx'
+ 'multiwatch: required if using nginx'
+ 'pod2man: required for Docker support'
+ 'vlc: provides libvlc, may achieve better performance with some camera models')
conflicts=('zoneminder-git')
backup=("etc/nginx/sites-available/$pkgname.conf"
"etc/httpd/conf/extra/$pkgname.conf"
"etc/php/conf.d/$pkgname.ini")
install=$pkgname.install
-source=("https://github.com/ZoneMinder/ZoneMinder/archive/$pkgver.tar.gz"
- "https://github.com/FriendsOfCake/crud/archive/v3.2.0.tar.gz"
- "https://github.com/ZoneMinder/CakePHP-Enum-Behavior/archive/1.0-zm.tar.gz"
+source=("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")
-sha256sums=('9a7e61c529a6269ff0344403369b160b8c8da48615c4172377c465da0b0074b1'
- '55be29e1eccb44d4ad0db8b23c37cec50f5341f8e498583d472ed1f0493876e3'
- 'dbd231e97b950c698f0f501d6a53c7291c9985e766b09e3afe00cfe69a969f44'
- # zoneminder-nginx.conf
- 'be503e5cedf42383122a1f96a6e00e25d473f8c1c536c000db748dbde12c88b0'
- # zoneminder-httpd.conf
- '0753527da658bb4025509c03923f21f7995cedb09008d64f1568fd1d5c2ec46b'
- # zoneminder-php.ini
- '479f290d3c92938cd929020ad140d613814b912b4302c2758be6446ebfb8a4ac'
- # zoneminder.service
+ "fcgiwrap-multiwatch.service"
+ "zmsetup.sh")
+sha256sums=('SKIP'
+ 'c60e855428a56cc327214aa13d02a70011bf3b63a94a0d845b1c5ea1fab28ad2'
+ '1f0d2276861065caf0b6c030ba27a6edb6a2988c7a1ac0fdf4e8fcb856972715'
+ '2d7f5ac073687be75c7724b0acd3785d8c358e4f65341e60d39eb6006f31389b'
'3e4de227e3154dffa887f2286c339ab3cf456f6d74a400b2786192b7e2b129c0'
- # zoneminder-tmpfile.conf
'b69ac1deaaf3cf84b4ae4dbab794e1b062823de817f1e3a816ccf5438db440c0'
- # fcgiwrap-multiwatch.service
- 'e95f9bef77aef647dd633bd9ad75dc099b6d7184684e133f2f20702de83a6260')
+ 'e95f9bef77aef647dd633bd9ad75dc099b6d7184684e133f2f20702de83a6260'
+ 'ac92fc44d3b6a90eeeed42aaf1b4b992a45168db1eb5be48444c635d6c1d3ab6')
prepare () {
- cd $pkgname-$pkgver
+ cd $pkgname
- # Move extra PHP plugins into place
- cp -R $srcdir/crud-3.2.0/* web/api/app/Plugin/Crud
- cp -R $srcdir/CakePHP-Enum-Behavior-1.0-zm/* web/api/app/Plugin/CakePHP-Enum-Behavior
+ # Download and move extra PHP plugins into place
+ git submodule update --init --recursive
# Fix the launcher
sed -i 's|localhost/zm|localhost:8095|g' misc/$pkgname.desktop.in
}
build() {
- cd $pkgname-$pkgver
+ cd $pkgname
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DZM_CONFIG_DIR=/etc/$pkgname \
@@ -119,65 +116,69 @@ build() {
-DZM_TMPDIR=/var/tmp/$pkgname \
-DZM_CONTENTDIR=/var/lib/$pkgname \
-DZM_CACHEDIR=/var/lib/$pkgname/cache \
- -DZM_WEBDIR=/srv/$pkgname/www \
- -DZM_CGIDIR=/srv/$pkgname/cgi-bin \
+ -DZM_WEBDIR=/usr/share/webapps/$pkgname/www \
+ -DZM_CGIDIR=/usr/share/webapps/$pkgname/cgi-bin \
-DZM_WEB_USER=http .
make
}
package() {
- cd $pkgname-$pkgver
+ cd $pkgname
make DESTDIR=$pkgdir install
# Set Polkit directory permissions in accordance with Arch policy
- chmod 750 $pkgdir/usr/share/polkit-1/rules.d
- chown root:polkitd $pkgdir/usr/share/polkit-1/rules.d
+ chmod 750 $pkgdir/usr/share/polkit-1/rules.d
+ chown root:polkitd $pkgdir/usr/share/polkit-1/rules.d
# Create ZM_LOGDIR
- install -dm775 -o http -g http $pkgdir/var/log/$pkgname
+ install -dm755 -o http -g http $pkgdir/var/log/$pkgname
# Create ZM_CONTENTDIR and its subfolders
- install -dm775 -o http -g http $pkgdir/var/lib/$pkgname/{cache,events,images}
+ install -dm775 -o http -g http $pkgdir/var/lib/$pkgname/{cache,events,images}
# Link ZM_CGIDIR and ZM_CACHEDIR inside ZM_WEBDIR and set correct permissions
- ln -sf /srv/$pkgname/cgi-bin $pkgdir/srv/$pkgname/www
- ln -sf /var/lib/$pkgname/cache $pkgdir/srv/$pkgname/www
- chown -Rh http:http $pkgdir/srv/$pkgname
+ ln -sf /usr/share/webapps/$pkgname/cgi-bin $pkgdir/usr/share/webapps/$pkgname/www
+ ln -sf /var/lib/$pkgname/cache $pkgdir/usr/share/webapps/$pkgname/www
+ chown -Rh http:http $pkgdir/usr/share/webapps/$pkgname
# Link ZM_WEBDIR/api/app/tmp to ZM_TMPDIR
- ln -sf /var/tmp/$pkgname $pkgdir/srv/$pkgname/www/api/app/tmp
+ ln -sf /var/tmp/$pkgname $pkgdir/usr/share/webapps/$pkgname/www/api/app/tmp
# Temporary fix for hardcoded /zm/ links (credit goes to @Kubax on AUR)
- ln -sf /srv/$pkgname/www $pkgdir/srv/$pkgname/www/zm
+ ln -sf /usr/share/webapps/$pkgname/www $pkgdir/usr/share/webapps/$pkgname/www/zm
# Set correct permissions for ZM_CONFIG_DIR & ZM_CONFIG_SUBDIR
- chmod -R 755 $pkgdir/etc/$pkgname
- chmod 644 $pkgdir/etc/$pkgname/zm.conf
- chmod 644 $pkgdir/etc/$pkgname/conf.d/*
-
- # Install Nginx conf file
+ chmod -R 755 $pkgdir/etc/$pkgname
+ chmod 644 $pkgdir/etc/$pkgname/zm.conf
+ chmod 644 $pkgdir/etc/$pkgname/conf.d/*
+
+
+ # Nginx conf file
install -Dm644 $srcdir/$pkgname-nginx.conf $pkgdir/etc/nginx/sites-available/$pkgname.conf
- # Install Apache conf file
+ # Apache conf file
install -Dm644 $srcdir/$pkgname-httpd.conf $pkgdir/etc/httpd/conf/extra/$pkgname.conf
- # Install PHP-FPM ini file
- install -Dm644 $srcdir/$pkgname-php.ini $pkgdir/etc/php/conf.d/$pkgname.ini
-
- # Install systemd service
+ # systemd service
install -Dm644 $srcdir/$pkgname.service $pkgdir/usr/lib/systemd/system/$pkgname.service
- # Install systemd tmpfile
+ # systemd tmpfile
install -Dm644 $srcdir/$pkgname-tmpfile.conf $pkgdir/usr/lib/tmpfiles.d/$pkgname.conf
- # Install fcgiwrap-multiwatch service
+ # php.ini file
+ 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
- # Install logrotate conf file
+ # zoneminder-setup.sh
+ install -Dm755 $srcdir/zmsetup.sh $pkgdir/usr/bin/zmsetup.sh
+
+ # logrotate conf file
install -Dm644 misc/logrotate.conf $pkgdir/etc/logrotate.d/$pkgname
- # Copy default database schemas
+ # database schemas
install -Dm644 db/zm*.sql $pkgdir/usr/share/$pkgname/db
}