diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2016-09-18 20:07:28 +0300 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2016-09-18 20:08:25 +0300 |
commit | e422aee903a025eb22d147f34949ec3b9c95689c (patch) | |
tree | dcd80a4bae3dc2e4856fa6b9d3452bb50706bff1 /community/zoneminder/APKBUILD | |
parent | ef4cdc2edd6de8a29bb2f8b021e83858f62bb3c5 (diff) | |
download | aports-e422aee903a025eb22d147f34949ec3b9c95689c.tar.bz2 aports-e422aee903a025eb22d147f34949ec3b9c95689c.tar.xz |
community/zoneminder: moved from main
Diffstat (limited to 'community/zoneminder/APKBUILD')
-rw-r--r-- | community/zoneminder/APKBUILD | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/community/zoneminder/APKBUILD b/community/zoneminder/APKBUILD new file mode 100644 index 0000000000..9bc2e052c0 --- /dev/null +++ b/community/zoneminder/APKBUILD @@ -0,0 +1,101 @@ +# Contributor: Ćukasz Jendrysik <scadu@yandex.com> +# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> +# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> +pkgname=zoneminder +pkgver=1.30.0 +pkgrel=0 +_crud=c3976f1478c681b0bbc132ec3a3e82c3984eeed5 +pkgdesc="Video camera surveillance system" +url="http://www.zoneminder.com/" +arch="x86_64" +license="GPL2+" +_php=php5 +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="bash bzip2-dev cmake 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 + crud-$_crud.tar.gz::https://github.com/FriendsOfCake/crud/archive/$_crud.tar.gz + $pkgname.initd + musl-fix.patch" + +_builddir=$srcdir/ZoneMinder-$pkgver +prepare() { + local i + cd "$_builddir" + + i=web/api/app/Plugin/Crud + rmdir $i + ln -s $srcdir/crud-$_crud $i + + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done + + utils/zmeditconfigdata.sh ZM_CHECK_FOR_UPDATES no + utils/zmeditconfigdata.sh ZM_LOG_LEVEL_FILE 0 + utils/zmeditconfigdata.sh ZM_LOG_LEVEL_SYSLOG -5 + utils/zmeditconfigdata.sh ZM_PATH_ZMS /cgi-bin/zm/nph-zms +} + +build() { + cd "$_builddir" + cmake \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DZM_CGIDIR=/usr/share/webapps/$pkgname/cgi-bin \ + -DZM_LOGDIR=/var/log/zoneminder \ + -DZM_RUNDIR=/var/run/zoneminder \ + -DZM_SOCKDIR=/var/run/zoneminder \ + -DZM_TMPDIR=/var/lib/zoneminder/temp \ + -DZM_WEBDIR=/usr/share/webapps/$pkgname/htdocs \ + . && make +} + +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" + chmod 640 "$pkgdir/etc/zm.conf" + + # 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 -g wheel -m 2750 -d "$pkgdir"/var/log/$pkgname + install -d "$pkgdir"/var/run/$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 +} +md5sums="3c3db511d5dad71871a103c7716ab671 zoneminder-1.30.0.tar.gz +d15d10ef38c33bc0acd028fe88dbeb09 crud-c3976f1478c681b0bbc132ec3a3e82c3984eeed5.tar.gz +07c4344a37ecba4f2308e5e7dc198a02 zoneminder.initd +ad8a80fdf2223ad07e0512e2cebbcfc2 musl-fix.patch" +sha256sums="e7c964c339305f42a044ca8e34fa4e6a33c452fdaf33642458735daf8b864325 zoneminder-1.30.0.tar.gz +fec32f393eeb129f478cfe0893d4cc0f347ed39525fbac59efa96ca255186c9c crud-c3976f1478c681b0bbc132ec3a3e82c3984eeed5.tar.gz +be4425e40c5c3aa76feff71c224be93d8f6578fb8015307fe655536fc0a5a043 zoneminder.initd +2f9aa6df66ada05d7ef4948d3981c349e584509a563c68e0ebd63a686bedc82f musl-fix.patch" +sha512sums="cbff14447a568648a0475e878be5cd19cb694c65814fe33c20774752410e31f3f4ff9e5695667d4d50634b3193dc50aaca2d950efc151bbb968d3f9609d35db4 zoneminder-1.30.0.tar.gz +f665741a1fbcca5e48ab8eddaa4686b23426aed7b22d68fdfa6c951fb6ce7dbbcfce5f1807e30a18fbc8fd4e3a8028a5687db17a070d05301d93d49f67952e44 crud-c3976f1478c681b0bbc132ec3a3e82c3984eeed5.tar.gz +7b8157514840a861b46cc7d6a98a822d1f372e568c9bb176faa0b68bfe525bffead78fb8b9399e8973803c44c2a41150eb3e02af9ddb504a16627e0a13f1df7e zoneminder.initd +34a18a6db3ebc5bfba0b40894e85112ad50d0caedf4e69f23ec98dedcba03fe223d5f3dc1ad3c76269b9cb48d60464e1674e0571a52d840f95c3adeac42d601f musl-fix.patch" |