blob: 4f0ad3d6829a2f4705083ffc718e0bd04315e30c (
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
85
86
87
88
89
90
91
92
93
94
95
96
97
|
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
pkgname=zoneminder
pkgver=1.29.0
pkgrel=1
pkgdesc="Video camera surveillance system"
url="http://www.zoneminder.com/"
arch="x86_64"
license="GPL2+"
depends="ffmpeg perl perl-archive-zip perl-date-manip perl-dbd-mysql
perl-dbi perl-device-serialport perl-libwww
perl-lwp-protocol-https perl-mail-tools perl-mime-lite
perl-mime-tools perl-php-serialization perl-sys-mmap
perl-time-hires php php-pdo_mysql php-sockets procps sudo
zip"
makedepends="autoconf automake bash bzip2-dev curl-dev ffmpeg-dev gnutls-dev
libgcrypt-dev libjpeg-turbo-dev mariadb-dev pcre-dev perl-dev
php-cli polkit-dev vlc-dev x264-dev"
install=$pkgname.post-upgrade
subpackages=$pkgname-doc
source="zoneminder-$pkgver.tar.gz::https://github.com/ZoneMinder/ZoneMinder/archive/v${pkgver}.tar.gz
$pkgname.initd
musl-fix.patch
zm-additional.sql"
_builddir=$srcdir/ZoneMinder-$pkgver
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
build() {
cd "$_builddir"
./bootstrap.sh || return 1
ZM_LOGDIR=/var/log/zoneminder \
ZM_RUNDIR=/var/run/zoneminder \
ZM_TMPDIR=/var/lib/zoneminder/temp \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--enable-mmap=yes \
--enable-crashtrace=no \
--enable-debug=no \
--with-webdir=/usr/share/webapps/$pkgname/htdocs \
--with-cgidir=/usr/share/webapps/$pkgname/cgi-bin \
|| return 1
make || return 1
}
package() {
cd "$_builddir"
local dir
make install DESTDIR=$pkgdir
find "$pkgdir" -name perllocal.pod -delete
echo -n $pkgver > "$pkgdir/usr/share/$pkgname/version"
install -D -m 755 "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname"
# move storage to var/lib where it belongs.
for dir in events images sounds temp; do
install -m 755 -d "$pkgdir"/var/lib/zoneminder/$dir
rmdir "$pkgdir"/usr/share/webapps/zoneminder/htdocs/$dir
ln -sf /var/lib/zoneminder/$dir \
"$pkgdir"/usr/share/webapps/zoneminder/htdocs/$dir || return 1
done
install -m 755 -d "$pkgdir"/var/log/$pkgname
# create symlinks from webapps to default http location
mkdir -p "$pkgdir"/var/www/localhost/htdocs \
"$pkgdir"/var/www/localhost/cgi-bin
ln -sf /usr/share/webapps/zoneminder/htdocs \
"$pkgdir"/var/www/localhost/htdocs/zm
ln -sf /usr/share/webapps/zoneminder/cgi-bin \
"$pkgdir"/var/www/localhost/cgi-bin/zm
# update db config with new locations/settings
cat "$srcdir"/zm-additional.sql >> \
"$pkgdir"/usr/share/zoneminder/db/zm_create.sql
}
md5sums="b4de8dd3fd86fc72e929e116e926d901 zoneminder-1.29.0.tar.gz
30934b0cb9d4ed19b982f75ac865d5ac zoneminder.initd
b95482fefbf22e8a89fb061805d05f03 musl-fix.patch
775f1e13017e7cd1ad11bfe4383c2c2d zm-additional.sql"
sha256sums="34e1f0d4b616e320e557f8e3fbe278d3ab70f30f6278cc153b44f2193c85ddbd zoneminder-1.29.0.tar.gz
5e3b1ae959f7a0f005c0357adfbcd0c764a4047d9bfd202119b4f5809846427e zoneminder.initd
829551a83e62ff84fcba7a0f88105a0b6d15d89a66e1e98dc50098c30c48672f musl-fix.patch
0b514a0506425e4dbde7030e7feabadb8b1d723946e0409ea0cd5f45833fee1b zm-additional.sql"
sha512sums="71a397df83c92de3b977832bb0a11791a3a756e7219e0cf3dc6c5c30fa0dd488ea00a925433669bf4e79873df980a852f2c805d1b7c9c8a06b6c39b9a16a2fda zoneminder-1.29.0.tar.gz
6cc8fd5aa30665b5b816216f8ff3cca1ea028f7959ee659eb8d9264b2f3cdcabd06e9a7d62a97b366c10e79779332d2cc386e291860d9b73b1619365d47eb918 zoneminder.initd
b2c4e31fd0a31f034be3029eab4f2943e07e95e64bb2d8eb38d93b790059d694a9a007e98b0f9b4c47ecfe91296bc21a3795b8a4aaf5b2a83071251456e533da musl-fix.patch
4b2e357110cb45a25953d06e0b6e70ff06642985b0607b58d1fd718f7e17cd256d46808a69f46bb6594557e38f2f2f847e2cda3137f38842b25eb2d4143efd0f zm-additional.sql"
|