diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2014-06-24 16:44:55 +0200 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2014-06-24 16:45:11 +0200 |
commit | fc5c85dd6ea9d76da7d53dcde6a3110198eb83f5 (patch) | |
tree | 0559c68aadce15756964271ef78e0ef9ea2fcb4c /main/zoneminder | |
parent | 6bf91c4436ab7540842f0fa35d1b49841e069a17 (diff) | |
download | aports-fc5c85dd6ea9d76da7d53dcde6a3110198eb83f5.zip |
main/zoneminder: misc fixes
Diffstat (limited to 'main/zoneminder')
-rw-r--r-- | main/zoneminder/APKBUILD | 43 | ||||
-rw-r--r-- | main/zoneminder/zm-additional.sql | 14 | ||||
-rw-r--r-- | main/zoneminder/zoneminder.initd | 5 |
3 files changed, 38 insertions, 24 deletions
diff --git a/main/zoneminder/APKBUILD b/main/zoneminder/APKBUILD index 876de7d9a19..b76b8c24286 100644 --- a/main/zoneminder/APKBUILD +++ b/main/zoneminder/APKBUILD @@ -2,14 +2,15 @@ # Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> pkgname=zoneminder pkgver=1.27.0 -pkgrel=5 +pkgrel=6 pkgdesc="Video camera surveillance system" url="http://www.zoneminder.com/" -arch="x86_64" +arch="all" license="GPL2+" depends="ffmpeg libbz2 libjpeg-turbo pcre perl perl-archive-zip perl-date-manip x264 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" + perl-mime-lite perl-mime-tools perl-sys-mmap perl-time-hires php php-mysql sudo + zip perl-php-serialization" makedepends="autoconf automake bash bzip2-dev ffmpeg-dev gnutls-dev libgcrypt-dev libjpeg-turbo-dev mysql-dev pcre-dev perl-dev php-cli" @@ -35,8 +36,8 @@ build() { cd "$_builddir" ./bootstrap.sh || return 1 ZM_LOGDIR=/var/log/zoneminder \ - ZM_RUNDIR=/var/run \ - ZM_TMPDIR=/tmp \ + ZM_RUNDIR=/var/run/zoneminder \ + ZM_TMPDIR=/var/lib/zoneminder/temp \ ./configure \ --prefix=/usr \ --sysconfdir=/etc \ @@ -57,31 +58,39 @@ package() { 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; do + 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 - for dir in lib/zoneminder/sock lib/zoneminder/swap \ - spool/zoneminder-upload log/zoneminder; do - install -m 755 -d "$pkgdir"/var/"$dir" - done - # update db config with new locations + install -m 755 -d "$pkgdir"/var/log/$pkgname \ + "$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 + + # 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 -16162d19b0f8cb1398cca92c0a4df713 zoneminder.initd +bf468cdc3b1e8cb81ee612c6691ee4e9 zoneminder.initd d148970bda67b1e257bb3e1f48404f91 musl-fix.patch -7123480cddd887a26bf6e4e6aada4948 zm-additional.sql" +775f1e13017e7cd1ad11bfe4383c2c2d zm-additional.sql" sha256sums="2f31c10e6c5930aedfa9f08edfa074ef1b168e5bdffb77a147d4e631bfb03ef2 zoneminder-1.27.0.tar.gz -c6749dca1b6b81686876bc5268e16bb879418cd7a3fb5c4323e8e7f4c9c64399 zoneminder.initd +f351efa868640ed16552f46f9d61dbca02f1ec1fdd6b4a5e0115212bba98b624 zoneminder.initd d5c1ce946c44e1979cc144f36930827da725919b9d53c1aee0e8749c4ff719d9 musl-fix.patch -821f0fc0e42ac48a6c422e8b35f4d03720da8d45fd8dea810fc1d05de38859c8 zm-additional.sql" +0b514a0506425e4dbde7030e7feabadb8b1d723946e0409ea0cd5f45833fee1b zm-additional.sql" sha512sums="8a349558399381a9062365ddc8bd8f815e3800929914096b2e4ea63e4d6dd12054f7b849fab5bea4bcfc87ea60739479a55734c7075a74aab0622d35f1d2bb14 zoneminder-1.27.0.tar.gz -9fb3b5ca39bf95269553a18f37584c44172df39d1b5023673ea168017c4c5ada16810adebbeb376326dbdc4f2b0868c4b0cae4ba317fb79f77c0d111bc7f8084 zoneminder.initd +bf42d95bc9bf14992f8ea324e90633e7cbe60e4c13e4235b2542de85f01cecb6f23a639c4bc4e3576f25b752f36a5218a3eba5480edc64e3602a844ac96a313c zoneminder.initd b62533a7d025afb9852b9ac6b10b20f030a900f34b16808f655c8e558a2bcf62c1913e278d7a6c8c600d0e4844d846c8cec43a9daf78332da2c1e8816a65776f musl-fix.patch -4b7e0f87bc6e3dfc7cae11c3a75911b3d451729081468249343cd8d283a69e0cb63db42d0f92abd9359848c5218406b02a312cedaaaefb17052889dcf423975e zm-additional.sql" +4b2e357110cb45a25953d06e0b6e70ff06642985b0607b58d1fd718f7e17cd256d46808a69f46bb6594557e38f2f2f847e2cda3137f38842b25eb2d4143efd0f zm-additional.sql" diff --git a/main/zoneminder/zm-additional.sql b/main/zoneminder/zm-additional.sql index 2c9edd28f22..0f7612a324c 100644 --- a/main/zoneminder/zm-additional.sql +++ b/main/zoneminder/zm-additional.sql @@ -1,8 +1,14 @@ # Update settings to reflect alpine linux default install -update Config set Value = '/zm/cgi-bin/nph-zms' where Name = 'ZM_PATH_ZMS'; +update Config set Value = '/cgi-bin/zm/nph-zms' where Name = 'ZM_PATH_ZMS'; update Config set Value = '/var/log/zoneminder' where Name = 'ZM_PATH_LOGS'; update Config set Value = '/var/log/zoneminder/zm_debug_log+' where Name = 'ZM_EXTRA_DEBUG_LOG'; update Config set Value = '/var/log/zoneminder/zm_xml.log' where Name = 'ZM_EYEZM_LOG_FILE'; -update Config set Value = '/var/lib/zoneminder/sock' where Name = 'ZM_PATH_SOCKS'; -update Config set Value = '/var/lib/zoneminder/swap' where Name = 'ZM_PATH_SWAP'; -update Config set Value = '/var/spool/zoneminder-upload' where Name = 'ZM_UPLOAD_FTP_LOC_DIR'; +update Config set Value = '/var/run/zoneminder' where Name = 'ZM_PATH_SOCKS'; +update Config set Value = '/var/lib/zoneminder/temp' where Name = 'ZM_PATH_SWAP'; +update Config set Value = '/var/lib/zoneminder/temp' where Name = 'ZM_UPLOAD_FTP_LOC_DIR'; +update Config set Value = '/var/lib/zoneminder/temp' where Name = 'ZM_UPLOAD_LOC_DIR'; +update Config set Value = '/var/lib/zoneminder/events' where Name = 'ZM_DIR_EVENTS'; +update Config set Value = '/var/lib/zoneminder/images' where Name = 'ZM_DIR_IMAGES'; +update Config set Value = '/var/lib/zoneminder/sounds' where Name = 'ZM_DIR_SOUNDS'; +update Config set Value = '-5' where Name = 'ZM_LOG_LEVEL_SYSLOG'; +update Config set Value = '0' where Name = 'ZM_LOG_LEVEL_FILE'; diff --git a/main/zoneminder/zoneminder.initd b/main/zoneminder/zoneminder.initd index 9b7d62162a1..592faca6aa6 100644 --- a/main/zoneminder/zoneminder.initd +++ b/main/zoneminder/zoneminder.initd @@ -48,7 +48,6 @@ setup() { perms() { . /etc/zm.conf ebegin "Setting correct permissions" - chown -L -R $ZM_WEB_USER:$ZM_WEB_GROUP $ZM_PATH_DATA $ZM_PATH_WEB \ - $ZM_PATH_CGI $ZM_PATH_LOGS $ZM_PATH_SOCKS $ZM_PATH_SWAP \ - $ZM_UPLOAD_FTP_LOC_DIR + chown -R $ZM_WEB_USER:$ZM_WEB_GROUP \ + /var/*/zoneminder } |