aboutsummaryrefslogtreecommitdiffstats
path: root/testing/zoneminder/APKBUILD
blob: e095df096734f0efcf9e9cb3eace080a8c2064b5 (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
# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
# Maintainer:
pkgname=zoneminder
pkgver=1.26.4
pkgrel=0
pkgdesc="Video camera surveillance system"
url="http://www.zoneminder.com/"
arch="x86"
license=GPL-2

depends="apache2 ffmpeg libbz2 libjpeg-turbo mysql-client pcre 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-apache2
         php-mysql x264"

makedepends="autoconf automake bash bzip2-dev ffmpeg-dev gnutls-dev
             libgcrypt-dev libjpeg-turbo-dev mysql-dev pcre-dev perl-dev
             php-cli"

install=$pkgname.post-upgrade
subpackages=$pkgname-doc
source="https://github.com/ZoneMinder/ZoneMinder/archive/v${pkgver}.tar.gz
	$pkgname.initd"

_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
	ZM_LOGDIR=/var/log ZM_RUNDIR=/var/run ./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--with-webdir=/var/www/localhost/htdocs \
		--with-cgidir=/var/www/cgi-bin \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"

	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"
}

md5sums="e45c5a26546c02d71023aa6d2dbf6b4a  v1.26.4.tar.gz
96c4d7da0e51bbe0f845fee3427f6f46  zoneminder.initd"
sha256sums="6ba51897a07703f94ba318e772746b977d7aba9dd9e59ab97539a0ecb0948a79  v1.26.4.tar.gz
3fcd14bb2c29808812737a2bed05bc77dbef5ac3e9092d96d4042ff88c17d626  zoneminder.initd"
sha512sums="4ee70e85f8d28f00b794edc71c79b228b9cbb55c9e79a582dfdf74eae367e77e203d58eedb8603025c77780ed7d28e14b102b11b5c5a1cac2b4e9b77e8ce2d04  v1.26.4.tar.gz
7196c687b292ea8dae9a040154e2561d306d6557cd6b5282b102b162c591d41c1b25523fddc4ea52999b2ccd12c8335e52799443f5ffa2701370b9f4309b9662  zoneminder.initd"