blob: 413a177f756d8d167b10bfd34134990dc4e9b229 (
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
98
99
100
101
102
103
|
# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
pkgname=zoneminder
pkgver=1.27.0
pkgrel=10
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"
makedepends="autoconf automake bash bzip2-dev ffmpeg-dev gnutls-dev
libgcrypt-dev libjpeg-turbo-dev mysql-dev pcre-dev perl-dev
php-cli vlc-dev x264-dev curl-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
0001-scripts-BusyBox-compatibility.patch
same-dvr-controlls-in-event-as-in-monitor.patch"
_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
rmdir "$pkgdir/tmp"
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="9ff149baa1a0d04931fbafcdb3200fab zoneminder-1.27.0.tar.gz
13ac97abf1565b69aa154bd81af9ed1d zoneminder.initd
d148970bda67b1e257bb3e1f48404f91 musl-fix.patch
775f1e13017e7cd1ad11bfe4383c2c2d zm-additional.sql
f8fffdbaecf2ca29742199fd905aa709 0001-scripts-BusyBox-compatibility.patch
244796943da9b443472c98df81477953 same-dvr-controlls-in-event-as-in-monitor.patch"
sha256sums="2f31c10e6c5930aedfa9f08edfa074ef1b168e5bdffb77a147d4e631bfb03ef2 zoneminder-1.27.0.tar.gz
189d07168732a9b6a65926112bed1564b4f7a25084505120fed6ccfb4773b7e6 zoneminder.initd
d5c1ce946c44e1979cc144f36930827da725919b9d53c1aee0e8749c4ff719d9 musl-fix.patch
0b514a0506425e4dbde7030e7feabadb8b1d723946e0409ea0cd5f45833fee1b zm-additional.sql
1d459bd9d4315ba8933c049b8f42cdc0c3dc3682c02cacd93a3c46d4429837e4 0001-scripts-BusyBox-compatibility.patch
8e19b1459840d4ca6346b6fb81f66a21692e1bd7f48a8009a68340be735a9c7d same-dvr-controlls-in-event-as-in-monitor.patch"
sha512sums="8a349558399381a9062365ddc8bd8f815e3800929914096b2e4ea63e4d6dd12054f7b849fab5bea4bcfc87ea60739479a55734c7075a74aab0622d35f1d2bb14 zoneminder-1.27.0.tar.gz
77f6001b2a8cfb04a6d684e98c0648cdaad3a5ede8259d138ee00a39e50870fa956d73ca60bccf12576bf9d339bdcc0e91cd6a0216fff7985a4276ab46eebcdf zoneminder.initd
b62533a7d025afb9852b9ac6b10b20f030a900f34b16808f655c8e558a2bcf62c1913e278d7a6c8c600d0e4844d846c8cec43a9daf78332da2c1e8816a65776f musl-fix.patch
4b2e357110cb45a25953d06e0b6e70ff06642985b0607b58d1fd718f7e17cd256d46808a69f46bb6594557e38f2f2f847e2cda3137f38842b25eb2d4143efd0f zm-additional.sql
719803331bcb14da8a21f3964f14c2f02be4a310d3bcf30e6744872f20f4f129f4e8b21ae7065151289a01c36b7a653e9cf2d88522e6fdd0ed72f045d95bd6f6 0001-scripts-BusyBox-compatibility.patch
ea6dd8ab828f9ee390318902e05b36e1f27f24706630455703b7177aa99a0304f57af96309f2dfb8cc970aea0003f2aab4921d4a91b96d45e75449d7de322a6d same-dvr-controlls-in-event-as-in-monitor.patch"
|