blob: ea31b158dbd7628a992ceaf2074577b200f0a53a (
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
|
# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
pkgname=zoneminder
pkgver=1.28.0
pkgrel=0
pkgdesc="Video camera surveillance system"
url="http://www.zoneminder.com/"
arch="x86_64"
license="GPL2+"
depends="perl perl-archive-zip perl-date-manip perl-dbd-mysql perl-dbi
perl-device-serialport perl-libwww perl-mail-tools perl-mime-lite
perl-mime-tools perl-sys-mmap perl-time-hires php php-mysql sudo
zip perl-php-serialization php-sockets ffmpeg"
makedepends="autoconf automake bash bzip2-dev curl-dev ffmpeg-dev gnutls-dev
libgcrypt-dev libjpeg-turbo-dev mysql-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="b0317c6fe003de9a0c7c76078b0adc2b zoneminder-1.28.0.tar.gz
ecb53d18aba7be7ea2e97a20ffa43238 zoneminder.initd
d148970bda67b1e257bb3e1f48404f91 musl-fix.patch
775f1e13017e7cd1ad11bfe4383c2c2d zm-additional.sql"
sha256sums="b9ee65635753e094dcad6cdb480acc42bff8b8f023ee008790883a4308273ca2 zoneminder-1.28.0.tar.gz
983b076560676b86a29ee9be046e1d237309c6d3ba82c74021881f24d5f1280f zoneminder.initd
d5c1ce946c44e1979cc144f36930827da725919b9d53c1aee0e8749c4ff719d9 musl-fix.patch
0b514a0506425e4dbde7030e7feabadb8b1d723946e0409ea0cd5f45833fee1b zm-additional.sql"
sha512sums="ac2a036adac436d76db8bb0b161d063111cc7cc7f6bcb9ca1b46862cfb0285b291926df716df645c0be47b7465bbbf3b1050c85529ff5068bdcc34f1c8ba6df1 zoneminder-1.28.0.tar.gz
f5adb7abdb07cae3fc396791208a3796fce6db56b9a3f5570e5955dca38adb05085e38f2cf69fe0cdedb94adce459568976dcfe53c7a9866335f441f0e9fb584 zoneminder.initd
b62533a7d025afb9852b9ac6b10b20f030a900f34b16808f655c8e558a2bcf62c1913e278d7a6c8c600d0e4844d846c8cec43a9daf78332da2c1e8816a65776f musl-fix.patch
4b2e357110cb45a25953d06e0b6e70ff06642985b0607b58d1fd718f7e17cd256d46808a69f46bb6594557e38f2f2f847e2cda3137f38842b25eb2d4143efd0f zm-additional.sql"
|