Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

PKGBUILD:zoneminder64

By: a guest on Jul 24th, 2011  |  syntax: None  |  size: 3.35 KB  |  views: 154  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # This is a ZoneMinder PKGBUILD file for x86_64!
  2. # Contributor: Vladimir Ermakov <vooon341@gmail.com>
  3. # Contributor: Ross melin <rdmelin@gmail.com>
  4. # Contributor: Francesco Di Battista <teme.84@gmail.com>
  5.  
  6. pkgname=zoneminder64
  7. pkgver=1.24.4
  8. pkgrel=5
  9. pkgdesc="Capture, analyse, record and monitor video security cameras."
  10. arch=('i686' 'x86_64')
  11. url="http://www.zoneminder.com"
  12. license=('GPL')
  13. groups=()
  14. depends=('apache' 'php' 'mysql' 'pcre' 'openssl' 'ffmpeg' 'perl-php-serialization' 'perl-libwww' 'perl-date-manip' 'perl-unicode-map' 'perl-dbi' 'perl-dbd-mysql' 'perl-io-stringy' 'perl-mime-lite' 'perl-timedate' 'perl-x10' 'perl-time-modules' 'perl-net-smtp-ssl' 'perl-sys-mmap' 'sudo' 'libv4l' 'libjpeg' 'gnutls' 'php-apache')
  15. makedepends=()
  16. provides=(zoneminder)
  17. conflicts=(zoneminder)
  18. replaces=()
  19. backup=(etc/zm.conf)
  20. options=()
  21. install=zoneminder.install
  22. source=(http://www2.zoneminder.com/downloads/ZoneMinder-1.24.4.tar.gz \
  23.         http://downloads.sourceforge.net/sourceforge/jscalendar/jscalendar-1.0.zip \
  24.         http://www.charliemouse.com:8080/code/cambozola/cambozola-latest.tar.gz \
  25.         zm.rc.d \
  26.         Controls_Orbit.sql \
  27.         zminit.arch \
  28.         customdb \
  29.         httpd-zm.conf \
  30.         zmfilter.pl \
  31.         zmeventbackup)
  32.  
  33. build() {
  34.         cd "$srcdir/ZoneMinder-$pkgver"
  35.  
  36.         cat ../Controls_Orbit.sql >> db/zm_create.sql.in
  37.         sed -i '22s/^$/#include <cstdio>/' src/zm_utils.cpp
  38.         sed -i 's/$max_socket_tries = 3;/$max_socket_tries = 15;/' web/ajax/stream.php || return 1
  39.  
  40.         aclocal
  41.         autoconf
  42.         automake
  43.  
  44.         ./configure --prefix=/usr \
  45.                 --sysconfdir=/etc \
  46.                 --with-webuser=http \
  47.                 --with-webgroup=http \
  48.                 --with-mysql=/usr \
  49.                 --with-ffmpeg=/usr \
  50.                 --with-webdir=/var/lib/zm/www  \
  51.                 --with-cgidir=/var/lib/zm/cgi-bin \
  52.                 --enable-mmap=no \
  53.                 ZM_SSL_LIB=openssl \
  54.                 CPPFLAGS="-D__STDC_CONSTANT_MACROS"
  55.  
  56.         make || return 1
  57.         make DESTDIR="$pkgdir" install || return 1
  58.  
  59.         install -D -m 700 $srcdir/zminit.arch  $pkgdir/usr/bin/zminit
  60.         install -D -m 700 $srcdir/zm.rc.d  $pkgdir/etc/rc.d/zm
  61.         for f in zmdbbackup zmdbrestore zmeventdump; do
  62.                 install -D -m 700 scripts/$f  $pkgdir/usr/bin/$f
  63.         done
  64.         install -D -m 700 scripts/zmlogrotate.conf  $pkgdir/etc/logrotate.d/zm
  65.         install -D -m 700 $srcdir/zmeventbackup  $pkgdir/etc/cron.hourly/zmeventbackup
  66.         install -D -m 755 $srcdir/zmfilter.pl $pkgdir/usr/bin/zmfilter.pl
  67.  
  68.         install -m 644  $srcdir/cambozola-0.92/dist/cambozola.jar $pkgdir/var/lib/zm/www/cambozola.jar
  69.  
  70.         mkdir -p  $pkgdir/etc/httpd/conf/extra/
  71.         install -m 644 $srcdir/httpd-zm.conf $pkgdir/etc/httpd/conf/extra/httpd-zm.conf
  72.  
  73.         mv $srcdir/jscalendar-1.0 $pkgdir/var/lib/zm/www/tools/jscalendar
  74.  
  75.         install -D -m 700 $srcdir/customdb $pkgdir/usr/lib/zm/upgrade/customdb
  76.         install -D  db/zm*.sql $pkgdir/usr/lib/zm/upgrade/
  77.  
  78.         mkdir -p $pkgdir/var/run/zm
  79.  
  80.         # remove special files
  81.         find $pkgdir -name "perllocal.pod" \
  82.                 -o -name ".packlist" \
  83.                 -o -name "*.bs" \
  84.                 -delete
  85.  
  86.         # hack. makefile's hack give error
  87.         chown http:http $pkgdir/etc/zm.conf
  88.         chmod 600 $pkgdir/etc/zm.conf
  89. }
  90.  
  91. md5sums=('f768807848774f9ac0f006cb1f0dc17a'
  92.          '10f2160fe68294013efcd1473cd36f72'
  93.          '602daba851e726e2399445fda3ca718f'
  94.          '7c63a72fb93eaeb5a4f4dc056b72fa10'
  95.          '5033bc098bf497c8aed1fc1b3c9c5f9c'
  96.          'f9720872736f26d17bc49d8725b75ae4'
  97.          '4ace13d1e20934abe192ef7372c75988'
  98.          '00201eba9c0a5d1ed14b10cc55410698'
  99.          '80c52cc3575073a7462ff6a54886a345'
  100.          '8b40137b6ff54f2fb26104b70edd22e9')