commit: a7e0313f68859c5327f0f94acc182b5cfbd4de92 Author: Andreas K. Huettel <dilfridge <AT> gentoo <DOT> org> AuthorDate: Fri Apr 25 12:42:01 2014 +0000 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org> CommitDate: Fri Apr 25 12:42:01 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/dilfridge.git;a=commit;h=a7e0313f
[www-misc/zoneminder] fix apache integration, non-automatic so far Package-Manager: portage-2.2.8-r1 --- www-misc/zoneminder/files/10_zoneminder.conf | 10 ++++----- www-misc/zoneminder/files/README.gentoo | 17 ++++++++------- www-misc/zoneminder/zoneminder-1.26.5.ebuild | 32 ++++++++++++++++------------ 3 files changed, 32 insertions(+), 27 deletions(-) diff --git a/www-misc/zoneminder/files/10_zoneminder.conf b/www-misc/zoneminder/files/10_zoneminder.conf index 1190fad..277d680 100644 --- a/www-misc/zoneminder/files/10_zoneminder.conf +++ b/www-misc/zoneminder/files/10_zoneminder.conf @@ -1,16 +1,16 @@ -ScriptAlias /cgi-bin/zms "/var/www/zm/cgi-bin/zms" -ScriptAlias /cgi-bin/nph-zms "/var/www/zm/cgi-bin/nph-zms" +ScriptAlias /cgi-bin/zms "/usr/libexec/zoneminder/cgi-bin/zms" +ScriptAlias /cgi-bin/nph-zms "/usr/libexec/zoneminder/cgi-bin/nph-zms" -<Directory "/var/www/zm/cgi-bin"> +<Directory "/usr/libexec/zoneminder/cgi-bin"> AllowOverride All Options ExecCGI Order allow,deny Allow from all </Directory> -Alias /zoneminder "/var/www/zm/htdocs" +Alias /zoneminder "%ZM_WEBDIR%" -<Directory "/var/www/zm/htdocs"> +<Directory "%ZM_WEBDIR%"> Options -Indexes MultiViews FollowSymLinks AllowOverride All Order allow,deny diff --git a/www-misc/zoneminder/files/README.gentoo b/www-misc/zoneminder/files/README.gentoo index b942043..2ada7c7 100644 --- a/www-misc/zoneminder/files/README.gentoo +++ b/www-misc/zoneminder/files/README.gentoo @@ -10,17 +10,18 @@ 2. Set your database settings in /etc/zm.conf, including above topsecretpassword -3. Check /etc/apache2/vhosts.d/10_zoneminder.conf +3. Configure apache to use zoneminder, see /usr/share/doc/zoneminder*/10_zoneminder.conf + for an example configuration snippet. -4. Enable PHP in your webserver configuration, - enable short_open_tags in php.ini, - set the time zone in php.ini, - and restart/reload the webserver. +4. Enable PHP in your webserver configuration, + enable short_open_tags in php.ini, + set the time zone in php.ini, + and restart/reload the webserver. -5. Start the zoneminder daemon: - /etc/init.d/zoneminder start +5. Start the zoneminder daemon: + /etc/init.d/zoneminder start -6. Finally point your browser to http://localhost/zoneminder +6. Finally point your browser to http://your.webserver/zoneminder If you are upgrading, you will need to run the zmupdate.pl script: /usr/bin/zmupdate.pl --version=oldversionnumber [--user=zmuser --pass=topsecretpassword] diff --git a/www-misc/zoneminder/zoneminder-1.26.5.ebuild b/www-misc/zoneminder/zoneminder-1.26.5.ebuild index df6b509..64670f0 100644 --- a/www-misc/zoneminder/zoneminder-1.26.5.ebuild +++ b/www-misc/zoneminder/zoneminder-1.26.5.ebuild @@ -6,7 +6,6 @@ # * ffmpeg support can be disabled in CMakeLists.txt but it does not build then # $(cmake-utils_useno ffmpeg ZM_NO_FFMPEG) # * dependencies of unknown status: -# app-admin/sudo # dev-perl/Archive-Zip # dev-perl/Device-SerialPort # dev-perl/MIME-Lite @@ -15,9 +14,6 @@ # virtual/perl-Archive-Tar # virtual/perl-libnet # virtual/perl-Module-Load -# * apache integration -# * installation of files into real webdir -# * the perl modules go into weird places atm EAPI=5 @@ -74,6 +70,8 @@ PATCHES=( "${FILESDIR}/${PN}-1.26.5"-automagic.patch ) +MY_ZM_WEBDIR=/usr/share/zoneminder/www + pkg_setup() { require_php_with_use mysql sockets apache2 } @@ -87,6 +85,7 @@ src_configure() { -DZM_TMPDIR=/var/tmp/zm -DZM_WEB_USER=apache -DZM_WEB_GROUP=apache + -DZM_WEBDIR=${MY_ZM_WEBDIR} $(cmake-utils_useno mmap ZM_NO_MMAP) -DZM_NO_X10=OFF -DZM_NO_FFMPEG=OFF @@ -100,26 +99,31 @@ src_configure() { } src_install() { + cmake-utils_src_install + + # the log directory keepdir /var/log/zm + fowners apache:apache /var/log/zm - cmake-utils_src_install + # now we duplicate the work of zmlinkcontent.sh + dodir /var/lib/zoneminder /var/lib/zoneminder/images /var/lib/zoneminder/events + fperms -R 0775 /var/lib/zoneminder + fowners -R apache:apache /var/lib/zoneminder + dosym /var/lib/zoneminder/images ${MY_ZM_WEBDIR}/images + dosym /var/lib/zoneminder/events ${MY_ZM_WEBDIR}/events + # the configuration file fperms 0640 /etc/zm.conf fowners root:apache /etc/zm.conf - fowners apache:apache /var/log/zm - + # init scripts etc newinitd "${FILESDIR}"/init.d zoneminder newconfd "${FILESDIR}"/conf.d zoneminder - dodoc AUTHORS BUGS ChangeLog INSTALL NEWS README.md TODO + cp "${FILESDIR}"/10_zoneminder.conf "${T}"/10_zoneminder.conf + sed -i "${T}"/10_zoneminder.conf -e "s:%ZM_WEBDIR%:${MY_ZM_WEBDIR}:g" -# insinto /etc/apache2/vhosts.d -# doins "${FILESDIR}"/10_zoneminder.conf -# -# for DIR in events images sound; do -# dodir /var/www/zoneminder/htdocs/${DIR} -# done + dodoc AUTHORS BUGS ChangeLog INSTALL NEWS README.md TODO "${T}"/10_zoneminder.conf readme.gentoo_src_install }
