Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on May 15th, 2010  |  syntax: None  |  size: 4.50 KB  |  views: 418  |  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.
  2. # Contributor: Ross melin <rdmelin@gmail.com>
  3.  
  4. pkgname=zoneminder
  5. pkgver=1.24.2
  6. pkgrel=2
  7. pkgdesc="Capture, analyse, record and monitor video security cameras."
  8. arch=('i686')
  9. url="http://www.zoneminder.com"
  10. license=('GPL')
  11. groups=()
  12. depends=('apache' 'php' 'mysql' 'pcre' 'openssl' 'ffmpeg-svn' 'perl-php-serialization' 'perl-libwww' 'perl-date-manip' 'perl-unicode-map'
  13. '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')
  14. makedepends=()
  15. provides=(zoneminder)
  16. conflicts=(zoneminder)
  17. replaces=()
  18. backup=()
  19. options=()
  20. install=zoneminder.install
  21. source=(http://www2.zoneminder.com/downloads/ZoneMinder-1.24.2.tar.gz \
  22.         zm.rc.d \
  23.         zm.conf.patch \
  24.   zmupdate.patch \
  25.   zm_image.patch \
  26.   Controls_Orbit.sql \
  27.   Makefile.patch \
  28.   zm_libv4l.patch \
  29.         zminit.arch \
  30.   customdb \
  31.   httpd-zm.conf \
  32.   zmfilter.pl \
  33.   http://downloads.sourceforge.net/project/jscalendar/jscalendar/1.0/jscalendar-1.0.zip \
  34.   http://www.charliemouse.com:8080/code/cambozola/cambozola-0.50.tar.gz \
  35.   zmeventbackup)
  36. noextract=()
  37. md5sums=()
  38. build() {
  39.         cd "$srcdir/ZoneMinder-$pkgver"
  40.  
  41.         patch -p1 < $srcdir/zm.conf.patch || read
  42.   patch -p1 < $srcdir/zmupdate.patch || read
  43.   patch -p1 < $srcdir/zm_image.patch || read
  44.   patch -p1 -b < $srcdir/zm_libv4l.patch || read
  45.   cat ../Controls_Orbit.sql >> db/zm_create.sql.in
  46.   sed -i '22s/^$/#include <cstdio>/' \
  47.   src/zm_utils.cpp
  48.   sed -i 's/$max_socket_tries = 3;/$max_socket_tries = 15;/' \
  49.   web/ajax/stream.php || read
  50.   LDFLAGS="-lv4l1 -lv4l2 ${LDFLAGS}"
  51.   export CFLAGS="$CFLAGS -D__STDC_CONSTANT_MACROS"
  52.   export CXXFLAGS="$CXXFLAGS -D__STDC_CONSTANT_MACROS"
  53.  
  54.         ./configure --prefix=/usr \
  55.                 --sysconfdir=/etc \
  56.                 --with-webuser=http  \
  57.                 --with-webgroup=http \
  58.                 --with-mysql=/usr  \
  59.                 --with-webdir=/var/lib/zm/www  \
  60.     --with-cgidir=/var/lib/zm/cgi-bin \
  61.     --with-extralibs="-lv4l1 -lv4l2" \
  62.     --bindir=/usr/lib/zm/bin \
  63.     --enable-mmap=yes \
  64.     ZM_SSL_LIB=openssl
  65.  
  66.   patch -p1 < $srcdir/Makefile.patch ||read
  67.         make || return 1
  68.         make DESTDIR="$pkgdir" install || return 1
  69.  
  70.         install -D -m 700 $startdir/src/zminit.arch  $startdir/pkg/usr/lib/zm/bin/zminit
  71.         install -D -m 700 $startdir/src/zm.rc.d  $startdir/pkg/etc/rc.d/zm
  72.   install -D -m 700 scripts/zmdbbackup  $startdir/pkg/usr/lib/zm/bin/zmdbbackup
  73.   install -D -m 700 scripts/zmdbbackup  $startdir/pkg/usr/lib/zm/bin/zmdbbackup
  74.   install -D -m 700 scripts/zmdbrestore  $startdir/pkg/usr/lib/zm/bin/zmdbrestore
  75.   install -D -m 700 scripts/zmeventdump  $startdir/pkg/usr/lib/zm/bin/zmeventdump
  76.   install -D -m 700 scripts/zmlogrotate.conf  $startdir/pkg/etc/logrotate.d/zm
  77.   install -D -m 700 $startdir/src/zmeventbackup  $startdir/pkg/etc/cron.hourly/zmeventbackup
  78.   install -D -m 755 $startdir/src/zmfilter.pl $startdir/pkg/usr/lib/zm/bin/zmfilter.pl
  79.  
  80.   tar -zxf $startdir/src/cambozola-0.50.tar.gz
  81.   install -m 644  cambozola-0.50/dist/cambozola.jar $startdir/pkg/var/lib/zm/www/cambozola.jar
  82.  
  83.   mkdir -p  $startdir/pkg/etc/httpd/conf/extra/
  84.   install -m 644 $startdir/src/httpd-zm.conf $startdir/pkg/etc/httpd/conf/extra/httpd-zm.conf
  85.  
  86.   unzip  $startdir/src/jscalendar-1.0.zip
  87.   mv $startdir/src/jscalendar-1.0 $startdir/pkg/var/lib/zm/www/tools/jscalendar
  88.  
  89.   install -D -m 700 $startdir/src/customdb $startdir/pkg/usr/lib/zm/upgrade/customdb
  90.         install -D  db/zm*.sql $startdir/pkg/usr/lib/zm/upgrade/
  91.  
  92.   mkdir -p $startdir/pkg/var/run/zm
  93.  
  94.   ### remove special files
  95.   find $startdir/pkg/ -name "perllocal.pod" \
  96.     -o -name ".packlist"                \
  97.     -o -name "*.bs"                     \
  98.     |xargs -i rm -f {}
  99.  
  100. }
  101.  
  102. # vim:set ts=2 sw=2 et:
  103. md5sums=('550d2f8f08852134028c3b1cf8fa437f'
  104.          'b20fb25b187eb6abb21321e153a7fb25'
  105.          '1d2a4233af027452ae38a3e0b6d062ee'
  106.          '971947cc093f7d909f39c2ce83846f35'
  107.          'c26edcd4420058ed573ad9a04b699dac'
  108.          '5033bc098bf497c8aed1fc1b3c9c5f9c'
  109.          'b7b532b39f0985c2b995c7923728bc1b'
  110.          '60f5654582873da54796a0cf0641dc3c'
  111.          'f9720872736f26d17bc49d8725b75ae4'
  112.          '4ace13d1e20934abe192ef7372c75988'
  113.          '00201eba9c0a5d1ed14b10cc55410698'
  114.          '80c52cc3575073a7462ff6a54886a345'
  115.          '10f2160fe68294013efcd1473cd36f72'
  116.          'daded58688e16ab513920a54a0599267'
  117.          '8b40137b6ff54f2fb26104b70edd22e9')
clone this paste RAW Paste Data