From bc8986e4e2b000156dd643362b900b1e5ed62084 Mon Sep 17 00:00:00 2001
From: Britney Fransen <brfransen@gmail.com>
Date: Wed, 15 Apr 2015 15:39:14 +0000
Subject: zoneminder: fix path for http srv dir

---
 abs/core/zoneminder/PKGBUILD           | 21 +++++++++++----------
 abs/core/zoneminder/zoneminder.install | 10 +++++-----
 2 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/abs/core/zoneminder/PKGBUILD b/abs/core/zoneminder/PKGBUILD
index 686ffb0..e5c6b5d 100644
--- a/abs/core/zoneminder/PKGBUILD
+++ b/abs/core/zoneminder/PKGBUILD
@@ -11,7 +11,7 @@
 pkgbase=zoneminder
 pkgname=zoneminder
 pkgver=1.28.0
-pkgrel=4
+pkgrel=5
 pkgdesc='Capture, analyse, record and monitor video security cameras'
 arch=( i686 x86_64 mips64el arm )
      
@@ -68,8 +68,8 @@ build() {
     cd $srcdir/ZoneMinder-$pkgver
 
     cmake -DCMAKE_INSTALL_PREFIX=/usr \
-        -DZM_CGIDIR=/data/srv/http/cgi-bin \
-        -DZM_WEBDIR=/data/srv/http/zoneminder \
+        -DZM_CGIDIR=/data/srv/httpd/cgi-bin \
+        -DZM_WEBDIR=/data/srv/httpd/zoneminder \
         -DZM_WEB_USER=http \
         -DZM_CONTENTDIR=/var/cache/zoneminder \
         -DZM_LOGDIR=/var/log/zoneminder \
@@ -100,21 +100,22 @@ package() {
     for i in events images temp; do
         mkdir $pkgdir/var/cache/$pkgbase/$i
         # chown -v    http.http                $pkgdir/var/cache/$pkgbase/$i
-        ln -s /var/cache/$pkgbase/$i         $pkgdir/data/srv/http/$pkgbase/$i
-        chown -v --no-dereference http.http  $pkgdir/data/srv/http/$pkgbase/$i
+        ln -s /var/cache/$pkgbase/$i         $pkgdir/data/srv/httpd/$pkgbase/$i
+        chown -v --no-dereference http.http  $pkgdir/data/srv/httpd/$pkgbase/$i
     done
 
     # Create a link to the Zoneminder cgi binaries
-    ln -sv /data/srv/http/cgi-bin $pkgdir/data/srv/http/$pkgbase
+    ln -sv /data/srv/httpd/cgi-bin $pkgdir/data/srv/httpd/$pkgbase
 
-    chown -h http.http $pkgdir/data/srv/http/{cgi-bin,$pkgbase,$pkgbase/cgi-bin}
+    chown -h http.http $pkgdir/data/srv/httpd/{cgi-bin,$pkgbase,$pkgbase/cgi-bin}
 
     # Link Cambozola
-    ln -s /usr/share/cambozola/cambozola.jar $pkgdir/data/srv/http/$pkgbase
+    ln -s /usr/share/cambozola/cambozola.jar $pkgdir/data/srv/httpd/$pkgbase
 
     # Install configuration files
-    mkdir -p $pkgdir/etc/httpd/conf/extra
-    install -D -m 644 $srcdir/httpd-$pkgbase.conf $pkgdir/etc/httpd/conf/extra
+# don't need these in LinHES as we use lighttpd not apache
+#    mkdir -p $pkgdir/etc/httpd/conf/extra
+#    install -D -m 644 $srcdir/httpd-$pkgbase.conf $pkgdir/etc/httpd/conf/extra
     mkdir -p $pkgdir/usr/lib/systemd/system
     install -D -m 644 $srcdir/$pkgbase.service    $pkgdir/usr/lib/systemd/system
     install -D -m 644 COPYING                     $pkgdir/usr/share/license/$pkgbase
diff --git a/abs/core/zoneminder/zoneminder.install b/abs/core/zoneminder/zoneminder.install
index e074c32..a086b96 100644
--- a/abs/core/zoneminder/zoneminder.install
+++ b/abs/core/zoneminder/zoneminder.install
@@ -18,14 +18,14 @@ install_db() {
 pre_install() {
     set -e
     abort=false
-    if [ -L /data/srv/http/zoneminder/events ]; then
-        l=$(readlink /data/srv/http/zoneminder/events)
+    if [ -L /data/srv/httpd/zoneminder/events ]; then
+        l=$(readlink /data/srv/httpd/zoneminder/events)
         if [ $l != /var/cache/zoneminder/events ]; then
             abort=true
         fi
     fi
-    if [ -L /data/srv/http/zoneminder/images ]; then
-        l=$(readlink /data/srv/http/zoneminder/images)
+    if [ -L /data/srv/httpd/zoneminder/images ]; then
+        l=$(readlink /data/srv/httpd/zoneminder/images)
         if [ $l != /var/cache/zoneminder/images ]; then
             abort=true
         fi
@@ -33,7 +33,7 @@ pre_install() {
     if [ $abort = true ]; then
         cat >&2 << EOF
 Aborting installation of zoneminder due to non-default symlinks in
-/data/srv/http/zoneminder for the images and/or events directory, which could
+/data/srv/httpd/zoneminder for the images and/or events directory, which could
 result in loss of data. Please move your data in each of these directories to
 /var/cache/zoneminder before installing zoneminder from the package.
 EOF
-- 
cgit v0.12

