diff options
author | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2012-09-13 20:33:33 -0300 |
---|---|---|
committer | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2012-09-13 20:33:33 -0300 |
commit | 1125e0af211fdad4bf992229317014d5cc5aa030 (patch) | |
tree | 68ce9e268461e5106810f35145c7700be6a8ed44 /pcr/zoneminder/PKGBUILD | |
parent | b4903e03dc897db3b525a3dd85b96be8cc30bf01 (diff) | |
parent | 03b51852bcdd2ab24f5761a903bbebbac5028c40 (diff) |
Merge branch 'master' of ssh://gparabola/srv/git/abslibre
Diffstat (limited to 'pcr/zoneminder/PKGBUILD')
-rw-r--r-- | pcr/zoneminder/PKGBUILD | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/pcr/zoneminder/PKGBUILD b/pcr/zoneminder/PKGBUILD new file mode 100644 index 000000000..334d32325 --- /dev/null +++ b/pcr/zoneminder/PKGBUILD @@ -0,0 +1,116 @@ +# Maintainer: Vojtech Aschenbrenner <v@asch.cz> +# Contributor: Jason Gardner <buhrietoe@gmail.com> +# Contributor: Ross melin <rdmelin@gmail.com> +# Maintainer (Parabola): Márcio Silva <coadde@lavabit.com> +# Maintainer (Parabola): André Silva <emulatorman@lavabit.com> + +pkgname=zoneminder +pkgver=1.25.0 +pkgrel=14 +pkgdesc="Capture, analyse, record and monitor video security cameras" +arch=('i686' 'x86_64' 'mips64el') +url="http://www.zoneminder.com" +license=('GPL') +depends=('cambozola' 'apache' 'php' 'php-gd' 'php-mcrypt' 'mysql' 'pcre' 'openssl' 'ffmpeg' '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' 'perl-net-sftp-foreign' 'perl-mime-tools' 'perl-io-tty' 'libv4l' 'libjpeg' 'gnutls' 'php-apache') +makedepends=() +install=zoneminder.install +source=("http://www.zoneminder.com/downloads/ZoneMinder-${pkgver}.tar.gz" + zm.rc.d + Controls_Orbit.sql + zminit.arch + customdb + httpd-zm.conf + zmeventbackup + patch-ffmpeg-0.11.patch + patch-libavcodec-detection.patch + zoneminder-1.25.0-kernel35.patch + arm-context.patch) + +md5sums=('eaefa14befd482154970541252aa1a39' + '9fb81f81b056c18be6eef3f1c8e0dd6d' + '5033bc098bf497c8aed1fc1b3c9c5f9c' + 'f9720872736f26d17bc49d8725b75ae4' + '942f6641c744ffe7d64846a5c34d84f1' + 'e63262d1417105ae24c7a03d98b2c64c' + '1a6d7c43af79c786b27cc88f7ba7ed3e' + 'b872dd86926ab00c5d4733e7e38eaa9c' + '94bf5d95fe5429f7df458ddfbabf0c12' + '88bd124dfb841320cecb0a757b2a78c1' + 'b28c8eb392a7e7b6ef665817d7fe61f4') + +build() { + cd "$srcdir/ZoneMinder-$pkgver" + + # Patch for GCC 4.7.x + sed -i -e '1 s/^/#include <unistd.h>\n/;' src/zm_logger.cpp + sed -i -e '1 s/^/#include <unistd.h>\n/;' src/zm_thread.h + + # Patch for build/upgrade path + sed -i -e 's#ZM_PATH_BUILD=@PATH_BUILD@#ZM_PATH_BUILD=/srv/zoneminder/upgrade\nZM_PATH_UPDATE=/srv/zoneminder/upgrade#' zm.conf.in + + # Patch for support new ffmpeg + patch -p1 < ../patch-ffmpeg-0.11.patch + + # Patch for correct libavcodec detection + patch -p0 < ../patch-libavcodec-detection.patch + + # Patch for type cast in kernel3.5 + patch -p0 < ../zoneminder-1.25.0-kernel35.patch + + # Patch for ARM + if test "$CARCH" == arm; then + patch -p0 < ../arm-context.patch + fi + + # Add some more configs into DB + 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 + + # chown line mucks everything up, we'll chown it in the install script + sed -i '/chown/d' Makefile + + # modify hard-coded paths + sed -i 's#/var/lib/zm#/srv/zoneminder/backup#' scripts/zmdbrestore.in + sed -i 's#/var/lib/zm#/srv/zoneminder/backup#' scripts/zmlogrotate.conf.in + sed -i 's#/var/lib/zm#/srv/zoneminder/backup#' scripts/zmdbbackup.in + + # Build it! + make || return 1 + make DESTDIR="$pkgdir" ZM_RUNDIR="$pkgdir/var/run" ZM_TMPDIR="$pkgdir/tmp" ZM_LOGDIR="$pkgdir/var/log" install || return 1 + + install -D -m 700 $startdir/src/zminit.arch $startdir/pkg/srv/zoneminder/bin/zminit + install -D -m 755 $startdir/src/zm.rc.d $startdir/pkg/etc/rc.d/zm + install -D -m 700 scripts/zmdbbackup $startdir/pkg/srv/zoneminder/bin/zmdbbackup + install -D -m 700 scripts/zmdbbackup $startdir/pkg/srv/zoneminder/bin/zmdbbackup + install -D -m 700 scripts/zmdbrestore $startdir/pkg/srv/zoneminder/bin/zmdbrestore + install -D -m 700 scripts/zmeventdump $startdir/pkg/srv/zoneminder/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 + + 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/srv/zoneminder/upgrade/customdb + install -D db/zm*.sql $startdir/pkg/srv/zoneminder/upgrade/ + + mkdir -p $startdir/pkg/var/run/zm + + ### remove special files + find $startdir/pkg/ -name "perllocal.pod" \ + -o -name ".packlist" \ + -o -name "*.bs" \ + |xargs -i rm -f {} + +} + +# vim:set ft=sh ts=2 sw=2 et: |