summaryrefslogtreecommitdiffstats
path: root/abs/core/zoneminder/PKGBUILD
blob: 00ac2c6b1ccde84121a753a2a72557bb94f36e5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# This is a ZoneMinder PKGBUILD file. 
# Contributor: Ross melin <rdmelin@gmail.com>

pkgname=zoneminder
pkgver=1.25.0
pkgrel=1
pkgdesc="Capture, analyse, record and monitor video security cameras."
arch=('i686' 'x86_64')
url="http://www.zoneminder.com"
license=('GPL')
depends=('cambozola' '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')
makedepends=()
install=zoneminder.install
source=("http://www2.zoneminder.com/downloads/ZoneMinder-${pkgver}.tar.gz"
zm.rc.d 
Controls_Orbit.sql 
zminit.arch 
customdb 
httpd-zm.conf 
zmfilter.pl 
zmeventbackup
Makefile.patch
run)

build() {
  cd "$srcdir/ZoneMinder-$pkgver"

  cat ../Controls_Orbit.sql >> db/zm_create.sql.in
  ./configure --prefix=/usr \
    --sysconfdir=/etc \
    --with-webuser=http  \
    --with-webgroup=http \
    --with-mysql=/usr  \
    --with-webdir=/srv/zoneminder/www  \
    --with-cgidir=/srv/zoneminder/cgi-bin \
    --bindir=/srv/zoneminder/bin \
    ZM_SSL_LIB=openssl \
    CPPFLAGS=-D__STDC_CONSTANT_MACROS
  # goddamn chown line just mucks everything up, we'll chown it in the install
  # script.
  sed -i '/chown/d' Makefile
  make || return 1
  make DESTDIR="$pkgdir" install || return 1

  install -D -m 700 $startdir/src/zminit.arch  $startdir/pkg/usr/lib/zm/bin/zminit
  install -D -m 700 $startdir/src/zm.rc.d  $startdir/pkg/etc/rc.d/zm
  install -D -m 700 scripts/zmdbbackup  $startdir/pkg/usr/lib/zm/bin/zmdbbackup
  install -D -m 700 scripts/zmdbbackup  $startdir/pkg/usr/lib/zm/bin/zmdbbackup
  install -D -m 700 scripts/zmdbrestore  $startdir/pkg/usr/lib/zm/bin/zmdbrestore
  install -D -m 700 scripts/zmeventdump  $startdir/pkg/usr/lib/zm/bin/zmeventdump
  install -D -m 700 scripts/zmlogrotate.conf  $startdir/pkg/etc/logrotate.d/zm
  install -D -m 700 $startdir/src/zmeventbackup  $startdir/pkg/etc/cron.hourly/zmeventbackup
  install -D -m 755 $startdir/src/zmfilter.pl $startdir/pkg/usr/lib/zm/bin/zmfilter.pl

  mkdir -p  $startdir/pkg/etc/httpd/conf/extra/
  install -m 644 $startdir/src/httpd-zm.conf $startdir/pkg/etc/httpd/conf/extra/httpd-zm.conf

  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/

  mkdir -p $startdir/pkg/var/run/zm

  #install runit files
  mkdir -p $pkgdir/etc/sv/zm
  install -D -m 755 $srcdir/run $pkgdir/etc/sv/zm

  ### remove special files
  find $startdir/pkg/ -name "perllocal.pod" \
    -o -name ".packlist"                \
    -o -name "*.bs"                     \
    |xargs -i rm -f {}

}

md5sums=('eaefa14befd482154970541252aa1a39'
         'b20fb25b187eb6abb21321e153a7fb25'
         '5033bc098bf497c8aed1fc1b3c9c5f9c'
         'f9720872736f26d17bc49d8725b75ae4'
         '4ace13d1e20934abe192ef7372c75988'
         '00201eba9c0a5d1ed14b10cc55410698'
         '80c52cc3575073a7462ff6a54886a345'
         '8b40137b6ff54f2fb26104b70edd22e9'
         'bb308c2393e947a224d56862c85a3ad9'
         '0c7024c355ce36828627bed10d965202')