summaryrefslogtreecommitdiff
path: root/pcr/zoneminder/PKGBUILD
diff options
context:
space:
mode:
authorAndreas Grapentin <andreas@grapentin.org>2018-01-25 07:15:23 +0100
committerAndreas Grapentin <andreas@grapentin.org>2018-01-25 08:33:24 +0100
commit4ba771bb1d8bd3ee9c08f2ba65b3b3b615377b67 (patch)
tree1b44f13d4962eb8c3d9f0d096aa763d73e593062 /pcr/zoneminder/PKGBUILD
parentd970f0c8379bf0fdcae34c3ee161d74cf7f60eef (diff)
downloadabslibre-4ba771bb1d8bd3ee9c08f2ba65b3b3b615377b67.tar.gz
abslibre-4ba771bb1d8bd3ee9c08f2ba65b3b3b615377b67.tar.bz2
abslibre-4ba771bb1d8bd3ee9c08f2ba65b3b3b615377b67.zip
pcr/zoneminder: updated to 1.30.4
Diffstat (limited to 'pcr/zoneminder/PKGBUILD')
-rw-r--r--pcr/zoneminder/PKGBUILD248
1 files changed, 139 insertions, 109 deletions
diff --git a/pcr/zoneminder/PKGBUILD b/pcr/zoneminder/PKGBUILD
index 9ecf77051..ba6c7bc02 100644
--- a/pcr/zoneminder/PKGBUILD
+++ b/pcr/zoneminder/PKGBUILD
@@ -1,120 +1,150 @@
-# Contributor (Arch): Troy Will <troydwill@gmail.com>
-# Contributor (Arch): /dev/rs0 </dev/rs0@secretco.de.com>
-# Contributor (Arch): Jacek Burghardt <jacek@hebe.us>
-# Contributor (Arch): Vojtech Aschenbrenner <v@asch.cz>
-# Contributor (Arch): Jason Gardner <buhrietoe@gmail.com>
-# Contributor (Arch): Ross melin <rdmelin@gmail.com>
-# Maintainer: Márcio Silva <coadde@hyperbola.info>
+# Maintainer (AUR): Mesmer <mesmer@fisica.if.uff.br>
+# Contributor (AUR): Troy Will <troydwill at gmail dot com>
+# Contributor (AUR): /dev/rs0 </dev/rs0@secretco.de.com>
+# Contributor (AUR): Jacek Burghardt <jacek@hebe.us>
+# Contributor (AUR): Vojtech Aschenbrenner <v@asch.cz>
+# Contributor (AUR): Jason Gardner <buhrietoe@gmail.com>
+# Contributor (AUR): Ross melin <rdmelin@gmail.com>
+# Contributor (AUR): Charles Spence IV <cspence@unomaha.edu>
+# Contributor (AUR): Joe Julian <me@joejulian.name>
+# Contributor: Márcio Silva <coadde@hyperbola.info>
# Contributor: André Silva <emulatorman@hyperbola.info>
# Orginally based on a Debian Squeeze package
+# parabola changes and rationale:
+# - corrected license
+# - renamed tarball to avoid collisions
+
+_pkgname=zoneminder
pkgname=zoneminder
-pkgver=1.28.0
+pkgver=1.30.4
pkgrel=1
pkgdesc='Capture, analyse, record and monitor video security cameras'
-arch=('i686' 'x86_64' 'armv7h')
-backup=('etc/zm.conf')
-url="https://github.com/ZoneMinder/ZoneMinder/releases"
-license=('GPL2')
-depends=('apache' 'cambozola' 'ffmpeg' 'gnutls' 'mariadb' 'perl-archive-zip' 'perl-date-manip' 'perl-dbd-mysql' 'perl-dbi'
- 'perl-expect' 'perl-libwww' 'perl-mime-lite' 'perl-mime-tools' 'perl-php-serialization' 'perl-net-sftp-foreign'
- 'perl-sys-mmap' 'perl-time-modules' 'php' 'php-apache' 'php-gd' 'php-mcrypt')
-makedepends=('netpbm' 'cmake')
-optdepends=('netpbm')
-options=(!libtool)
-install=$pkgname.install
-source=(https://github.com/ZoneMinder/ZoneMinder/archive/v$pkgver.tar.gz
- httpd-$pkgname.conf
- $pkgname.service
- sysctl-$pkgname.conf)
-sha512sums=('3e18993b0539729491052c97d8c94227ccc089eb40277c2f07682f30049033303c7cfe9734fdac6d33ae67df29c76eb72bf7fbb5dae8227e8831fa603b61c375'
- '4ce0d8eba9d006d258f5b8a83920fc17f1f602b96518d37b7a47cd9b6eb84ef2587641a6ba839a469c3f0e33b46475866187279ae3f8be0d4054b074ee5d6b08'
- 'cfb0eb87a989236c72741a496ddc6a73aa2696e5beaaca4836d3c231ddb24c7ef5e9f65e7afa49674f2115cbfa4a07c75486e1947ce294c816ddbb875f3b99cf'
- '7330c179f1e2db815a675560d3d84648be02f7d0292f8cbe21d6033577fe688ed71ad23b5b8c9dc309395b45ebb554f9499e7a4b57091959b69679011fa59044')
-
-prepare() {
- cd $srcdir/ZoneMinder-$pkgver
-
- # Patch for disable ZM_CHECK_FOR_UPDATES
- sed -i '\|ZM_CHECK_FOR_UPDATES|,+1 s|yes|no|;
- ' scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in
-
- # Patch for support html5 video and flv
- sed -i '\|ZM_MPEG_LIVE_FORMAT|,+1 s|swf|ogg|;
- \|ZM_MPEG_REPLAY_FORMAT|,+1 s|swf|ogg|;
- \|ZM_FFMPEG_FORMATS|,+1 s|mpg mpeg wmv asf avi[*] mov swf 3gp[*][*]|mpg mpeg wmv asf avi* mov flv swf 3gp** webm ogg matroska mp4 h264|;
- ' scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in
-
- # Patch for change ZM name to ZoneMinder
- sed -i '\|ZM_WEB_TITLE_PREFIX|,+1 s|"ZM"|"ZoneMinder"|;
- ' scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in
-
- # Patch for remove HACK in Makefile.am
- sed -i '\|This is a HACK|d;
- \|^install-data-hook:$|,+5 d;
- s| install-data-hook||;
- \|^uninstall-hook:$|,+5 d;
- s| uninstall-hook||;
- ' Makefile.am
+arch=( i686 x86_64 armv7h )
+backup=( etc/zm.conf )
+url="https://github.com/$pkgname/$pkgname/releases"
+license=( GPL2 )
+depends=(
+ mariadb perl-dbd-mysql perl-dbi
+ apache php php-apache php-gd php-mcrypt perl-php-serialization
+ perl-libwww perl-net-sftp-foreign
+ ffmpeg vlc perl-sys-mmap
+ gnutls polkit
+ perl-expect perl-archive-zip perl-date-manip
+ perl-mime-lite perl-mime-tools
+)
+makedepends=(
+ cmake netpbm git
+)
+optdepends=(
+ 'php-apcu-bci: Bring back the API for android control'
+ netpbm
+ cambozola
+ perl-time-modules
+ perl-x10
+ perl-astro-suntime
+)
+install=$_pkgname.install
+
+source=(
+ $pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/$pkgver.tar.gz
+ httpd-zoneminder.conf
+ zoneminder.service
+ uio.patch
+ fabs.patch
+ zoneminder-tmpfile.conf
+)
+sha256sums=('879f57fdb1e013b3f17b1b0e87c5935683dad14922951d5f29d1370c1e490f2e'
+ 'ff7382b38ac07dadead0ad4d583e3dbcf8da4aaa06b76d048ee334f69f95db67'
+ '043d77a995553c533d62f48db4b719d29cf6c7074f215d866130e97be57ed646'
+ 'd1816cac69be5e807d22c37fcbe6fef99e38151a5c71233b875c0ebf101fb460'
+ 'fd20faed09eaf825933c2a87b1d04febf99d183b2b36b0041df1e2b2990c49c2'
+ 'cc8af737c3c07750fc71317c81999376e4bbb39da883780164a8747b3d7c95a7')
+
+
+prepare () {
+ cd $srcdir/$pkgname-$pkgver/web/api/app/Plugin/
+ if [ ! -d "crud" ]; then
+ git clone -b 3.0 https://github.com/FriendsOfCake/crud.git
+ mkdir -p Crud
+ mv crud/* Crud
+ fi
+ patch $srcdir/$pkgname-$pkgver/src/zm_image.cpp < $srcdir/fabs.patch
+ patch $srcdir/$pkgname-$pkgver/src/zm_comms.h < $srcdir/uio.patch
}
build() {
- cd $srcdir/ZoneMinder-$pkgver
-
- cmake -DCMAKE_INSTALL_PREFIX=/usr \
- -DZM_TARGET_DISTRO=arch \
- -DZM_CGIDIR=/srv/http/cgi-bin \
- -DZM_CONTENTDIR=/var/cache/$pkgname \
- -DZM_LOGDIR=/var/log/$pkgname \
- -DZM_RUNDIR=/run/$pkgname \
- -DZM_SOCKDIR=/run/$pkgname \
- -DZM_TMPDIR=/var/tmp \
- -DZM_WEB_USER=http \
- -DZM_WEB_GROUP=http \
- -DZM_WEBDIR=/srv/http/$pkgname
-
- make V=0
-}
-
+ cd $srcdir/$pkgname-$pkgver
+
+ cmake -DCMAKE_INSTALL_PREFIX=/usr \
+ -DZM_PERL_SUBPREFIX=/lib/perl5 \
+ -DZM_WEBDIR=/srv/http/zoneminder \
+ -DZM_CGIDIR=/srv/http/cgi-bin \
+ -DZM_WEB_USER=http \
+ -DZM_CONTENTDIR=/var/cache/zoneminder \
+ -DZM_LOGDIR=/var/log/zoneminder \
+ -DZM_RUNDIR=/run/zoneminder \
+ -DZM_TMPDIR=/var/lib/zoneminder/temp \
+ -DZM_SOCKDIR=/var/lib/zoneminder/sock .
+
+ make V=0
+}
+
package() {
- cd $srcdir/ZoneMinder-$pkgver
-
- make DESTDIR=$pkgdir install
-
- # BEGIN CREATE_ZONEMINDER_DIRECTORIES
- #mkdir -pv $pkgdir/{etc/{httpd/conf/extra,sysctl.d},srv/http/cgi-bin,usr/{lib/systemd/system,share/{licenses/$pkgname,$pkgname/db}}}
- mkdir -pv $pkgdir/run/zm
- chown -v http.http $pkgdir/run/zm
- mkdir -pv $pkgdir/var/{cache/$pkgname,log/$pkgname}
- mkdir -pv $pkgdir/srv/http/$pkgname/socks
- chown -Rv http.http $pkgdir/{etc/zm.conf,var/{cache/$pkgname,log/$pkgname}}
- chown -Rv http.http $pkgdir/srv/http/$pkgname/socks
- chmod -v 0700 $pkgdir/etc/zm.conf
- # END CREATE_ZONEMINDER_DIRECTORIES
-
- # Make content directories in /var/cache/$pkgname and link them
- for i in events images temp; do
- #mv -v $pkgdir/srv/http/$pkgname/$i $pkgdir/var/cache/$pkgname/$i
- mkdir -v $pkgdir/var/cache/$pkgname/$i
- #chown -v http.http $pkgdir/var/cache/$pkgname/$i
- ln -sv /var/cache/$pkgbase/$i $pkgdir/srv/http/$pkgname/$i
- chown -hv http.http $pkgdir/srv/http/$pkgname/$i
- done
-
- # Create a link to the Zoneminder cgi binaries
- ln -sv /srv/http/cgi-bin $pkgdir/srv/http/$pkgname
-
- chown -hv http.http $pkgdir/srv/http/{cgi-bin,$pkgname,$pkgname/cgi-bin}
-
- # Link Cambozola
- ln -vs /usr/share/cambozola/cambozola.jar $pkgdir/srv/http/$pkgname
-
- # Install configuration files
- #mkdir -pv $pkgdir/etc/httpd/conf/extra
- install -vDm 644 $srcdir/httpd-$pkgname.conf $pkgdir/etc/httpd/conf/extra
- #mkdir -pv $pkgdir/usr/lib/systemd/system
- install -vDm 644 $srcdir/$pkgname.service $pkgdir/usr/lib/systemd/system
- install -vDm 644 $srcdir/sysctl-$pkgname.conf $pkgdir/etc/sysctl.d
- install -vDm 644 COPYING $pkgdir/usr/share/licenses/$pkgname
- install -vDm 644 db/zm*.sql $pkgdir/usr/share/$pkgname/db
+
+ cd $srcdir/$pkgname-$pkgver
+
+ DESTDIR=$pkgdir make install
+
+ # Change Polkit directory permissions to Arch Linux policy
+ chmod -v 700 $pkgdir/usr/share/polkit-1/rules.d/
+ chown -v polkitd $pkgdir/usr/share/polkit-1/rules.d/
+
+ # BEGIN CREATE_ZONEMINDER_DIRECTORIES
+ mkdir -pv $pkgdir/var/{cache/zoneminder,log/zoneminder}
+ chown -Rv http.http $pkgdir/var/{cache/zoneminder,log/zoneminder}
+
+ # corresponds to -DZM_SOCKDIR=/var/lib/zoneminder/sock
+ mkdir -pv $pkgdir/var/lib/zoneminder/sock
+ chown -v http.http $pkgdir/var/lib/zoneminder/sock
+
+ # corresponds to -DZM_TMPDIR=/var/lib/zoneminder/temp
+ mkdir -pv $pkgdir/var/lib/zoneminder/temp
+ chown -v http.http $pkgdir/var/lib/zoneminder/temp
+
+ chown -v http.http $pkgdir/etc/zm.conf
+ chmod 0700 $pkgdir/etc/zm.conf
+ # END CREATE_ZONEMINDER_DIRECTORIES
+
+ # Make content directories in /var/cache/zoneminder and to link them in /srv/http/zoneminder
+ for i in events images temp; do
+ mkdir $pkgdir/var/cache/$_pkgname/$i
+ chown -v http.http $pkgdir/var/cache/$_pkgname/$i
+ ln -s /var/cache/$_pkgname/$i $pkgdir/srv/http/$_pkgname/$i
+ chown -v --no-dereference http.http $pkgdir/srv/http/$_pkgname/$i
+ done
+
+ # Create a link to the Zoneminder cgi binaries
+ ln -sv /srv/http/cgi-bin $pkgdir/srv/http/$_pkgname
+
+ chown -h http.http $pkgdir/srv/http/{cgi-bin,$_pkgname,$_pkgname/cgi-bin}
+
+ # Link Cambozola
+ # ln -s /usr/share/cambozola/cambozola.jar $pkgdir/srv/http/$_pkgname
+
+ # Install configuration files
+ mkdir -p $pkgdir/etc/httpd/conf/extra
+ install -D -m 644 $srcdir/httpd-$_pkgname.conf $pkgdir/etc/httpd/conf/extra
+
+ mkdir -p $pkgdir/usr/lib/systemd/system
+ 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
+
+ mkdir -p $pkgdir/usr/share/doc/$_pkgname
+ # install -D -m 644 $srcdir/README $pkgdir/usr/share/doc/$_pkgname
+
+ install -Dm644 ../zoneminder-tmpfile.conf "$pkgdir"/usr/lib/tmpfiles.d/zoneminder.conf
+
}