diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2017-02-20 11:27:51 +0200 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2017-02-20 11:42:19 +0200 |
commit | 1428cb3423f0c67df2fe13f99ff57fd13559fe63 (patch) | |
tree | fbb9790f2c9a92caa68de4a7b6fe62db4ed94ade /community | |
parent | 66b476259c90c3377bd748e6c9b6e4a236e11fbb (diff) | |
download | aports-1428cb3423f0c67df2fe13f99ff57fd13559fe63.tar.bz2 aports-1428cb3423f0c67df2fe13f99ff57fd13559fe63.tar.xz |
community/zoneminder: use zmlinkcontent.sh
Diffstat (limited to 'community')
-rw-r--r-- | community/zoneminder/0001-zmlinkcontent-fix-syntax-error.patch | 25 | ||||
-rw-r--r-- | community/zoneminder/APKBUILD | 20 | ||||
-rw-r--r-- | community/zoneminder/zoneminder.initd | 28 |
3 files changed, 37 insertions, 36 deletions
diff --git a/community/zoneminder/0001-zmlinkcontent-fix-syntax-error.patch b/community/zoneminder/0001-zmlinkcontent-fix-syntax-error.patch new file mode 100644 index 0000000000..329e0d7f0e --- /dev/null +++ b/community/zoneminder/0001-zmlinkcontent-fix-syntax-error.patch @@ -0,0 +1,25 @@ +From 548464c0d58676225dc15f0604df7df1961abb83 Mon Sep 17 00:00:00 2001 +From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> +Date: Mon, 20 Feb 2017 11:12:15 +0200 +Subject: [PATCH] zmlinkcontent: fix syntax error + +--- + zmlinkcontent.sh.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/zmlinkcontent.sh.in b/zmlinkcontent.sh.in +index 5f0d833..d6c7918 100755 +--- a/zmlinkcontent.sh.in ++++ b/zmlinkcontent.sh.in +@@ -69,7 +69,7 @@ if [ -n "$ZM_CONFIG" ]; then + elif [ -f "zm.conf" ]; then + echo "Using local zm.conf" + source "zm.conf" +-elif [ -f "/etc/zm.conf"]; then ++elif [ -f "/etc/zm.conf" ]; then + echo "Using system zm.conf" + source "/etc/zm.conf" + else +-- +2.9.3 + diff --git a/community/zoneminder/APKBUILD b/community/zoneminder/APKBUILD index 44e06d0d0c..14f879161b 100644 --- a/community/zoneminder/APKBUILD +++ b/community/zoneminder/APKBUILD @@ -3,7 +3,7 @@ # Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> pkgname=zoneminder pkgver=1.30.2 -pkgrel=0 +pkgrel=1 _crud=c3976f1478c681b0bbc132ec3a3e82c3984eeed5 pkgdesc="Video camera surveillance system" url="http://www.zoneminder.com/" @@ -24,7 +24,8 @@ subpackages=$pkgname-doc source="zoneminder-$pkgver.tar.gz::https://github.com/ZoneMinder/ZoneMinder/archive/${pkgver}.tar.gz crud-$_crud.tar.gz::https://github.com/FriendsOfCake/crud/archive/$_crud.tar.gz $pkgname.initd - musl-fix.patch" + musl-fix.patch + 0001-zmlinkcontent-fix-syntax-error.patch" _builddir=$srcdir/ZoneMinder-$pkgver prepare() { @@ -65,19 +66,13 @@ package() { local dir make install DESTDIR="$pkgdir" find "$pkgdir" -name perllocal.pod -delete + install -D zmlinkcontent.sh "$pkgdir"/usr/sbin/zmlinkcontent.sh + 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 \ @@ -89,5 +84,6 @@ package() { } sha512sums="2c6be4f6ae88eacf422a2f2dec303adfc61411d403ec0489e0b84ee919fe040b902b2e85cf78cd0f5a615b40a1f104a5faba6e08e0771a4c55616e36fc9afb11 zoneminder-1.30.2.tar.gz f665741a1fbcca5e48ab8eddaa4686b23426aed7b22d68fdfa6c951fb6ce7dbbcfce5f1807e30a18fbc8fd4e3a8028a5687db17a070d05301d93d49f67952e44 crud-c3976f1478c681b0bbc132ec3a3e82c3984eeed5.tar.gz -7b8157514840a861b46cc7d6a98a822d1f372e568c9bb176faa0b68bfe525bffead78fb8b9399e8973803c44c2a41150eb3e02af9ddb504a16627e0a13f1df7e zoneminder.initd -34a18a6db3ebc5bfba0b40894e85112ad50d0caedf4e69f23ec98dedcba03fe223d5f3dc1ad3c76269b9cb48d60464e1674e0571a52d840f95c3adeac42d601f musl-fix.patch" +17a4ea70e0f8e3f64a7fe9f357fe5259c5716aa0be86ae5d9be0c5cb9a05c3e27969413c64186421e78e57c0af0c1f9cd0ec7305aa3311d4e9584b3e49e120ce zoneminder.initd +34a18a6db3ebc5bfba0b40894e85112ad50d0caedf4e69f23ec98dedcba03fe223d5f3dc1ad3c76269b9cb48d60464e1674e0571a52d840f95c3adeac42d601f musl-fix.patch +9f794b14125bae50a517008a20bc8728dfae6fbd074cf54a57fe4685b4fccfae4a211dce4d40bf2fdb6d92b0c4d7d9f238d9ab03e3dbdf934da21cf0ed8abd6b 0001-zmlinkcontent-fix-syntax-error.patch" diff --git a/community/zoneminder/zoneminder.initd b/community/zoneminder/zoneminder.initd index 1c8b970883..ec9a1d1029 100644 --- a/community/zoneminder/zoneminder.initd +++ b/community/zoneminder/zoneminder.initd @@ -1,11 +1,11 @@ #!/sbin/openrc-run # init.d file for zoneminder -# Copyright (c) 2013-2016 Kaarle Ritvanen +# Copyright (c) 2013-2017 Kaarle Ritvanen name=zoneminder command=/usr/bin/zmpkg.pl -extra_commands="setup perms" +extra_commands="setup" depend() { after mariadb @@ -16,8 +16,8 @@ start() { if status > /dev/null; then ewarn "$name already started" else - prepare - $command start + ( . /etc/zm.conf && chgrp $ZM_WEB_GROUP /etc/zm.conf ) + zmlinkcontent.sh > /dev/null && $command start fi eend $? } @@ -45,23 +45,3 @@ setup() { < $ZM_PATH_DATA/db/zm_create.sql eend $? } - -prepare() { - . /etc/zm.conf - install -d -o $ZM_WEB_USER -g $ZM_WEB_GROUP \ - /var/run/zoneminder - perms simple -} - -perms() { - . /etc/zm.conf - if [ "$1" != "simple" ]; then - ebegin "Setting correct permssion, this could take a while" - RECURSIVE="-R" - fi - chgrp $ZM_WEB_GROUP /etc/zm.conf - chown $RECURSIVE $ZM_WEB_USER:$ZM_WEB_GROUP \ - /var/lib/zoneminder/* /var/run/zoneminder - chown $RECURSIVE $ZM_WEB_USER:wheel /var/log/zoneminder -} - |