summaryrefslogtreecommitdiff
path: root/pcr/zoneminder/PKGBUILD
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-10-21 09:47:14 -0700
committerroot <root@rshg054.dnsready.net>2012-10-21 09:47:14 -0700
commit80b6d46a5c9da3f9d0db207d9d0adc265899a915 (patch)
treeeaf8b2d4c68199a03ca2b86a234539300ceb920d /pcr/zoneminder/PKGBUILD
parent159f9396cc5a7cb168fad9f3dc0e43bd790fdaeb (diff)
Sun Oct 21 09:47:14 PDT 2012
Diffstat (limited to 'pcr/zoneminder/PKGBUILD')
-rw-r--r--pcr/zoneminder/PKGBUILD84
1 files changed, 53 insertions, 31 deletions
diff --git a/pcr/zoneminder/PKGBUILD b/pcr/zoneminder/PKGBUILD
index bb850eec2..64c3f94b0 100644
--- a/pcr/zoneminder/PKGBUILD
+++ b/pcr/zoneminder/PKGBUILD
@@ -8,7 +8,7 @@
pkgname=zoneminder
pkgver=1.25.0
-pkgrel=17
+pkgrel=19
pkgdesc='Capture, analyse, record and monitor video security cameras'
arch=(i686 x86_64 mips64el)
backup=(etc/zm.conf etc/httpd/conf/extra/httpd-zm.conf)
@@ -31,7 +31,7 @@ source=(
)
md5sums=(
eaefa14befd482154970541252aa1a39
- 25ad042b501aaad98cbe4e05ca0a96c2
+ 72380d8793a784ec24cb6809aea4a739
034b61cda8849fc3001849e76ef26041
7487cc72ead82aea0bc78f2e4106ae1a
81c8be870260142e2633eedf73c72040
@@ -39,27 +39,49 @@ md5sums=(
build() {
cd $srcdir/ZoneMinder-$pkgver
- export CPPFLAGS=-D__STDC_CONSTANT_MACROS \
+ export CPPFLAGS=-D__STDC_CONSTANT_MACROS\
ZM_SSL_LIB=gnutls
# Patch for GCC 4.7.x
- sed -i -e 's/^#include <errno.h>/#include <errno.h>\n#include <unistd.h>/' src/zm_logger.cpp
- sed -i -e 's/^#include <pthread.h>/#include <pthread.h>\n#include <unistd.h>/' src/zm_thread.h
+ sed -i -e 's/^#include <errno.h>/#include <errno.h>\n#include <unistd.h>/'\
+ src/zm_logger.cpp || read
+ sed -i -e 's/^#include <pthread.h>/#include <pthread.h>\n#include <unistd.h>/'\
+ src/zm_thread.h || read
+
+ # Patch for automake 1.12
+ sed -i -e '/am__api_version=/ s/1.11/1.12/'\
+ configure || read
# Patch for disable ZM_CHECK_FOR_UPDATES
- sed -i -e '/ZM_CHECK_FOR_UPDATES/,+1 s/yes/no/' scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in
+ sed -i -e '/ZM_CHECK_FOR_UPDATES/,+1 s/yes/no/'\
+ scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in || read
# Patch for support html5 video and flv
sed -i -e '/ZM_MPEG_LIVE_FORMAT/,+1 s/swf/webm/;/ZM_MPEG_REPLAY_FORMAT/,+1 s/swf/webm/;
/ZM_FFMPEG_FORMATS/,+1 s/mpg mpeg wmv asf avi\* mov swf 3gp\*\*/mpg mpeg wmv asf avi\* mov flv swf 3gp\*\* webm ogg h254/'\
- scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in
+ scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in || read
+
+ # Patch for change path
+ sed -i -e '/ZM_PATH_SOCKS/,+1 s/tmp\/zm/run/;
+ /ZM_PATH_LOGS/,+1 s/zm/zonemider/;
+ /ZM_PATH_SWAP/,+1 s/zm/zonemider/'\
+ scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in || read
+
+ # Patch for v4l1 compat
+ sed -i -e "s/$ENV{SHELL} = \'\/bin\/sh\' if exists $ENV{SHELL};/$ENV{SHELL} = \'\/bin\/sh\' if exists $ENV{SHELL};\n$ENV{LD_PRELOAD} = \'\/usr\/lib\/libv4l\/v4l1compat.so\' ;/"\
+ scripts/zmdc.pl.in || read
+
+ # Patch for add more socket tries
+ sed -i -e '/$max_socket_tries/ s/3/15/'\
+ web/ajax/stream.php || read
# Patch for wrong "suppported"
- sed -i -e 's/suppported/supported/' src/zm_local_camera.cpp
+ sed -i -e 's/suppported/supported/'\
+ src/zm_local_camera.cpp || read
# Patch for type cast in linux-libre kernel 3.5
sed -i -e 's/enum v4l2_buf_type type = v4l2_data.fmt.type;/enum v4l2_buf_type type = (v4l2_buf_type)v4l2_data.fmt.type;/'\
- src/zm_local_camera.cpp
+ src/zm_local_camera.cpp || read
# Patch for drop custom perl install paths
sed -i -e '/# Slight hack for non-standard perl install paths/,+10 d;
@@ -93,22 +115,22 @@ build() {
/ ( cd $(DESTDIR)$(sysconfdir); chown $(webuser):$(webgroup) $(sysconf_DATA); chmod 600 $(sysconf_DATA) )/d;
/ ( if ! test -e $(ZM_RUNDIR); then mkdir -p $(ZM_RUNDIR); fi; if test "$(ZM_RUNDIR)" != "\/var\/run"; then chown $(webuser):$(webgroup) $(ZM_RUNDIR); chmod u+w $(ZM_RUNDIR); fi )/d;
/ ( if ! test -e $(ZM_TMPDIR); then mkdir -m 700 -p $(ZM_TMPDIR); fi; if test "$(ZM_TMPDIR)" != "\/tmp"; then chown $(webuser):$(webgroup) $(ZM_TMPDIR); chmod u+w $(ZM_TMPDIR); fi )/d;
- / ( if ! test -e $(ZM_LOGDIR); then mkdir -p $(ZM_LOGDIR); fi; if test "$(ZM_LOGDIR)" != "\/var\/log"; then chown $(webuser):$(webgroup) $(ZM_LOGDIR); chmod u+w $(ZM_LOGDIR); fi )/,+1 d' \
+ / ( if ! test -e $(ZM_LOGDIR); then mkdir -p $(ZM_LOGDIR); fi; if test "$(ZM_LOGDIR)" != "\/var\/log"; then chown $(webuser):$(webgroup) $(ZM_LOGDIR); chmod u+w $(ZM_LOGDIR); fi )/,+1 d'\
Makefile.{am,in}
- ./configure --prefix=/usr \
- --build \
- --enable-crashtrace=no \
- --enable-debug=no \
- --enable-mmap=yes \
- --sysconfdir=/etc \
- --with-cgidir=/usr/lib/$pkgname/cgi-bin \
- --with-ffmpeg=/usr \
- --with-libarch=lib \
- --with-mysql=/usr \
- --with-webdir=/usr/share/$pkgname/www \
- --with-webgroup=http \
- --with-webhost=localhost \
+ ./configure --prefix=/usr\
+ --enable-crashtrace=no\
+ --enable-debug=no\
+ --enable-mmap=yes\
+ --sysconfdir=/etc\
+ --with-cgidir=/srv/http/cgi-bin\
+ --with-extralibs='-L/usr/lib -L/usr/lib/mysql'\
+ --with-ffmpeg=/usr\
+ --with-libarch=lib\
+ --with-mysql=/usr\
+ --with-webdir=/srv/http/$pkgname\
+ --with-webgroup=http\
+ --with-webhost=localhost\
--with-webuser=http
make V=0
@@ -117,22 +139,22 @@ build() {
package() {
cd $srcdir/ZoneMinder-$pkgver
- make DESTDIR=$pkgdir install
+ make DESTDIR=$pkgdir RUNDIR=$pkdir/run ZM_RUNDIR=$pkgdir/run install
- mkdir -p $pkgdir/{etc/{httpd/conf/extra,rc.d},usr/{lib/{systemd/system,$pkgname/cgi-bin},share/{license/$pkgname,$pkgname/{db,www}}},var/{cache/$pkgname,log/zm}}
+ mkdir -p $pkgdir/{etc/{httpd/conf/extra,rc.d},srv/http/{cgi-bin,$pkgname},usr/{lib/systemd/system,share/{license/$pkgname,$pkgname/db}},var/{cache/$pkgname,log/$pkgname}}
- chown -R http.http $pkgdir/{etc/zm.conf,var/{cache/$pkgname,log/zm}}
+ chown -R http.http $pkgdir/{etc/zm.conf,var/{cache/$pkgname,log/$pkgname}}
for i in events images temp; do
- mv $pkgdir/usr/share/$pkgname/www/$i $pkgdir/var/cache/$pkgname/$i
- ln -s /var/cache/$pkgname/$i $pkgdir/usr/share/$pkgname/www/$i
+ mv $pkgdir/srv/http/$pkgname/$i $pkgdir/var/cache/$pkgname/$i
+ ln -s /var/cache/$pkgname/$i $pkgdir/srv/http/$pkgname/$i
done
- ln -s /usr/lib/$pkgname/cgi-bin $pkgdir/usr/share/$pkgname/www
- ln -s /usr/share/cambozola/cambozola.jar $pkgdir/usr/share/$pkgname/www
+ ln -s /srv/http/cgi-bin $pkgdir/srv/http/$pkgname
+ ln -s /usr/share/cambozola/cambozola.jar $pkgdir/srv/http/$pkgname
install -D -m 644 $srcdir/httpd-zm.conf $pkgdir/etc/httpd/conf/extra
- install -D -m 644 $srcdir/zm.rc.d $pkgdir/etc/rc.d/zm
+ install -D -m 644 $srcdir/zm.rc.d $pkgdir/etc/rc.d/${pkgname}d
install -D -m 644 $srcdir/$pkgname.service $pkgdir/usr/lib/systemd/system
install -D -m 644 COPYING $pkgdir/usr/share/license/$pkgname
install -D -m 644 db/zm*.sql $pkgdir/usr/share/$pkgname/db