summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTroy Will2016-01-03 17:31:06 -0800
committerTroy Will2016-01-03 17:31:06 -0800
commit19655686e5c85fdc077f040b47f62f1987d7cba8 (patch)
tree376d6705b86dcd12c213c79b968becb94b9e2dc1
parentbadd28193679ba301cc590f61e7836a74b150414 (diff)
downloadaur-19655686e5c85fdc077f040b47f62f1987d7cba8.tar.gz
Add prepare function to checkout needed submodules
-rw-r--r--PKGBUILD35
-rw-r--r--httpd-zoneminder.conf4
-rw-r--r--zoneminder.service4
3 files changed, 24 insertions, 19 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 1376f4a37b4..a3a7b29e08a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,5 +1,4 @@
# Maintainer: Troy Will <troydwill at gmail dot com>
-# Contributor: Charles Spence IV <cspence@unomaha.edu>
# Contributor: /dev/rs0 </dev/rs0@secretco.de.com>
# Contributor: Jacek Burghardt <jacek@hebe.us>
# Contributor: Vojtech Aschenbrenner <v@asch.cz>
@@ -7,11 +6,13 @@
# Contributor: Ross melin <rdmelin@gmail.com>
# Contributor (Parabola): Márcio Silva <coadde@lavabit.com>
# Contributor (Parabola): André Silva <emulatorman@lavabit.com>
+# Contributor: Charles Spence IV <cspence@unomaha.edu>
+# Contributor: Joe Julian <me@joejulian.name>
# Orginally based on a Debian Squeeze package
_pkgname=zoneminder
pkgname=zoneminder-git
-pkgver=1.28.100
-pkgrel=4
+pkgver=1.29.0
+pkgrel=1
pkgdesc='Capture, analyse, record and monitor video security cameras'
arch=( i686 x86_64 mips64el arm armv7h )
backup=( etc/zm.conf )
@@ -46,14 +47,20 @@ source=(
)
# Because the source is not static, skip Git checksum:
sha256sums=('SKIP'
- 'c2ca71ec57e53da040de61ff212ac063574e5ddfb4c333b70be060d5ec26c62c'
- '7eb2f26246e240e23502da44854d5ed14485aa11bc448ad73e9b57fee13f00a3'
+ 'ff7382b38ac07dadead0ad4d583e3dbcf8da4aaa06b76d048ee334f69f95db67'
+ '043d77a995553c533d62f48db4b719d29cf6c7074f215d866130e97be57ed646'
'cc8af737c3c07750fc71317c81999376e4bbb39da883780164a8747b3d7c95a7'
)
pkgver() {
cd "$_pkgname"
- printf "%s.r%s.%s.%s" "$pkgver" "$(git rev-list --count HEAD)" "$pkgrel" "$(git rev-parse --short HEAD)"
+ # See https://wiki.archlinux.org/index.php/VCS_package_guidelines#The_pkgver.28.29_function
+ git describe --long --tags | sed 's/^v-//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare () {
+ cd $srcdir/$_pkgname
+ git submodule update --init --recursive
}
build() {
@@ -70,8 +77,8 @@ build() {
-DZM_CONTENTDIR=/var/cache/zoneminder \
-DZM_LOGDIR=/var/log/zoneminder \
-DZM_RUNDIR=/run/zoneminder \
- -DZM_TMPDIR=/srv/zoneminder/tmp \
- -DZM_SOCKDIR=/srv/zoneminder/socks .
+ -DZM_TMPDIR=/var/lib/zoneminder/temp \
+ -DZM_SOCKDIR=/var/lib/zoneminder/sock .
make V=0
}
@@ -90,13 +97,13 @@ package() {
mkdir -pv $pkgdir/var/{cache/zoneminder,log/zoneminder}
chown -Rv http.http $pkgdir/var/{cache/zoneminder,log/zoneminder}
- mkdir -v $pkgdir/srv/zoneminder
- chown -v http.http $pkgdir/srv/zoneminder
- mkdir -v $pkgdir/srv/zoneminder/socks
- chown -v http.http $pkgdir/srv/zoneminder/socks
+ # corresponds to -DZM_SOCKDIR=/var/lib/zoneminder/sock
+ mkdir -pv $pkgdir/var/lib/zoneminder/sock
+ chown -v http.http $pkgdir/var/lib/zoneminder/sock
- mkdir -pv $pkgdir/srv/zoneminder/tmp
- chown -v http.http $pkgdir/srv/zoneminder/tmp
+ # corresponds to -DZM_TMPDIR=/var/lib/zoneminder/temp
+ mkdir -pv $pkgdir/var/lib/zoneminder/temp
+ chown -v http.http $pkgdir/var/lib/zoneminder/temp
chown -v http.http $pkgdir/etc/zm.conf
chmod 0700 $pkgdir/etc/zm.conf
diff --git a/httpd-zoneminder.conf b/httpd-zoneminder.conf
index 7e6c8e37508..41b364f1316 100644
--- a/httpd-zoneminder.conf
+++ b/httpd-zoneminder.conf
@@ -7,8 +7,8 @@ Alias /zm "/srv/http/zoneminder"
AllowOverride None
Order allow,deny
Allow from all
- # Provide PHP access to important directories
- php_admin_value open_basedir "/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/etc/zm.conf:/srv/http/zoneminder/:/var/cache/zoneminder/:/srv/zoneminder/socks/:/var/log/zoneminder/"
+ # Provide PHP directory and file access, see http://php.net/manual/en/ini.core.php#ini.open-basedir
+ php_admin_value open_basedir "/tmp/:/etc/zm.conf:/srv/http/zoneminder/:/var/cache/zoneminder/:/var/lib/zoneminder/:/var/log/zoneminder/"
</Directory>
ScriptAlias /cgi-bin "/srv/http/cgi-bin"
diff --git a/zoneminder.service b/zoneminder.service
index 4ba74584450..48268f1391d 100644
--- a/zoneminder.service
+++ b/zoneminder.service
@@ -1,5 +1,3 @@
-# ZoneMinder systemd unit file for Arch Linux
-
[Unit]
Description=ZoneMinder CCTV recording and security system
After=network.target mysqld.service httpd.service
@@ -11,7 +9,7 @@ Type=forking
ExecStart=/usr/bin/zmpkg.pl start
ExecReload=/usr/bin/zmpkg.pl restart
ExecStop=/usr/bin/zmpkg.pl stop
-PIDFile="/srv/zoneminder/zm.pid"
+PIDFile=/run/zoneminder/zm.pid
[Install]
WantedBy=multi-user.target