summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/zoneminder
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core-testing/zoneminder')
-rw-r--r--abs/core-testing/zoneminder/PKGBUILD21
-rwxr-xr-xabs/core-testing/zoneminder/run6
-rw-r--r--abs/core-testing/zoneminder/zm.conf.patch4
-rw-r--r--abs/core-testing/zoneminder/zoneminder.install40
4 files changed, 28 insertions, 43 deletions
diff --git a/abs/core-testing/zoneminder/PKGBUILD b/abs/core-testing/zoneminder/PKGBUILD
index 5071e81..94a543a 100644
--- a/abs/core-testing/zoneminder/PKGBUILD
+++ b/abs/core-testing/zoneminder/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=zoneminder
pkgver=1.23.3
-pkgrel=7
+pkgrel=10
pkgdesc="Capture, analyse, record and monitor video security cameras."
arch=('i686')
url="http://www.zoneminder.com"
@@ -26,11 +26,12 @@ source=(http://www2.zoneminder.com/downloads/ZoneMinder-$pkgver.tar.gz \
customdb \
mootools.v1.11.js \
http://www.charliemouse.com:8080/code/cambozola/cambozola-0.50.tar.gz \
- zmeventdump)
+ zmeventdump \
+ run)
noextract=()
md5sums=('ee803f0f71d6e67adf602c3557fb6bc9'
'af8631abe20cd7dcab1a023af7d4f3e8'
- '246852035905589617b9e0dc63759d27'
+ '1a6c94411f8adb53a10dc7c19c3bbf02'
'320dd41725945218de0672f899e1d739'
'818cec2eba7e1efb3f5c410f6dd8d528'
'f9720872736f26d17bc49d8725b75ae4'
@@ -51,11 +52,11 @@ build() {
./configure --prefix=/usr \
--sysconfdir=/etc \
- --with-webuser=nobody \
- --with-webgroup=nobody \
+ --with-webuser=http \
+ --with-webgroup=http \
--with-mysql=/usr \
- --with-webdir=/home/httpd/html/zm \
- --with-cgidir=/home/httpd/cgi-bin \
+ --with-webdir=/data/srv/httpd/htdocs/zm \
+ --with-cgidir=/data/srv/httpd/htdocs/cgi-bin \
--bindir=/usr/lib/zm/bin
patch -p1 < $startdir/src/Makefile.patch
@@ -71,9 +72,9 @@ build() {
install -D -m 700 $startdir/src/zmeventdump $startdir/pkg/etc/cron.hourly/zmeventdump
tar -zxf $startdir/src/cambozola-0.50.tar.gz
- install -m 644 cambozola-0.50/dist/cambozola.jar $startdir/pkg/home/httpd/html/zm/cambozola.jar
+ install -m 644 cambozola-0.50/dist/cambozola.jar $startdir/pkg/data/srv/httpd/htdocs/zm/cambozola.jar
- install $startdir/src/mootools.v1.11.js $startdir/pkg/home/httpd/html/zm/mootools.js
+ install $startdir/src/mootools.v1.11.js $startdir/pkg/data/srv/httpd/htdocs/zm/mootools.js
install -D -m 700 $startdir/src/customdb $startdir/pkg/usr/lib/zm/upgrade/customdb
install -D db/zm*.sql $startdir/pkg/usr/lib/zm/upgrade/
@@ -84,6 +85,8 @@ build() {
-o -name ".packlist" \
-o -name "*.bs" \
|xargs -i rm -f {}
+ mkdir -p $pkgdir/etc/sv/zm
+ install -D -m 755 $srcdir/run $pkgdir/etc/sv/zm
}
diff --git a/abs/core-testing/zoneminder/run b/abs/core-testing/zoneminder/run
new file mode 100755
index 0000000..e458bc8
--- /dev/null
+++ b/abs/core-testing/zoneminder/run
@@ -0,0 +1,6 @@
+#!/bin/bash
+export TERM=linux
+. /etc/rc.conf
+. /etc/rc.d/functions
+stat_runit "Starting ZoneMinder"
+exec /etc/rc.d/zm start
diff --git a/abs/core-testing/zoneminder/zm.conf.patch b/abs/core-testing/zoneminder/zm.conf.patch
index b3406a8..f7a9870 100644
--- a/abs/core-testing/zoneminder/zm.conf.patch
+++ b/abs/core-testing/zoneminder/zm.conf.patch
@@ -13,8 +13,8 @@
# ZoneMinder database user
-ZM_DB_USER=@ZM_DB_USER@
-+ZM_DB_USER=
++ZM_DB_USER=mythtv
# ZoneMinder database password
-ZM_DB_PASS=@ZM_DB_PASS@
-+ZM_DB_PASS=
++ZM_DB_PASS=mythtv
diff --git a/abs/core-testing/zoneminder/zoneminder.install b/abs/core-testing/zoneminder/zoneminder.install
index 27ba60a..1f3cfc0 100644
--- a/abs/core-testing/zoneminder/zoneminder.install
+++ b/abs/core-testing/zoneminder/zoneminder.install
@@ -7,46 +7,20 @@ pre_install() {
## arg 1: the new package version
post_install() {
-chown nobody.nobody /home/httpd/html/zm/events
-chown nobody.nobody /home/httpd/html/zm/images
-chown nobody.nobody /home/httpd/html/zm/temp
-chown nobody.nobody /etc/zm.conf
+chown http.http /data/srv/httpd/htdocs/zm/events
+chown http.http /data/srv/httpd/htdocs/zm/images
+chown http.http /data/srv/httpd/htdocs/zm/temp
+chown http.http /etc/zm.conf
cat << EOF
Note:
-==> Edit /etc/zm.conf to define a user and password for
+==> mythtv has been defined in /etc/zm.conf as user and password for
==> The zoneminder (zm) database
==> To initialize the ZoneMinder database run (as root)
==> /usr/lib/zm/bin/zminit
EOF
-cat /etc/php/php.ini |grep "^extension=mysql.so" >/dev/null || cat << EOF
-==> You must edit /etc/php/php.ini and uncomment "extension=mysql.so"
-==> so php and MySQL can play together.
-
-EOF
-cat /etc/php/php.ini |grep "^short_open_tag = On" >/dev/null || cat << EOF
-==> You must edit /etc/php/php.ini and set short_open_tag = On
-==> or ZoneMinder will not work
-
-EOF
-
-
-cat /etc/php/php.ini |grep "^open_basedir.*/etc/" >/dev/null || cat << EOF
-==> You must edit /etc/php/php.ini and add to it open_basedir "/etc/" as such:
-==> open_basedir = /home/:/tmp/:/usr/share/pear/:/etc/
-==> Otherwise ZoneMinder will be unable to read /etc/zm.conf
-
-EOF
-
-cat /etc/httpd/conf/httpd.conf |grep "^LoadModule php" >/dev/null || cat << EOF
-Note:
-==> You must edit /etc/httpd/conf/httpd.conf and uncomment the line
-==> #LoadModule php5_module modules/libphp5.so
-
-EOF
-
cat /etc/sysctl.conf |grep "kernel.shmall" >/dev/null || cat << EOF
==> To raise the limit on shared memory for zoneminder
==> add these lines to /etc/sysctl.conf
@@ -78,7 +52,8 @@ post_upgrade() {
# Reuse the old config
[ -f /etc/zm.conf.pacnew ] && cat /etc/zm.conf | sed -e "s/^ZM_VERSION=.*$/ZM_VERSION=1.23.3/" > /tmp/zm.conf
[ -f /etc/zm.conf.pacsave ] && cat /etc/zm.conf.pacsave | sed -e "s/^ZM_VERSION=.*$/ZM_VERSION=1.23.3/" > /tmp/zm.conf
-[ -f /tmp/zm.conf ] && mv -f /tmp/zm.conf /etc/zm.conf && chown -R nobody.nobody /etc/zm.conf
+[ -f /tmp/zm.conf ] && mv -f /tmp/zm.conf /etc/zm.conf && chown -R http.http /etc/zm.conf
+add_service.sh zm
}
## arg 1: the old package version
pre_remove() {
@@ -88,6 +63,7 @@ pre_remove() {
## arg 1: the old package version
post_remove() {
echo
+ remove_service.sh zm
}
# vim:set ts=2 sw=2 et: