summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2014-04-25 14:43:40 +0000
committerAndreas K. Hüttel <dilfridge@gentoo.org>2014-04-25 14:43:40 +0000
commitadbfc027a14034fd0debbee04df472ec46b864c6 (patch)
tree4dc9a2256b657058163f4774d3adfd7e0b9407c4 /www-misc
parentRemove unneeded yasm dependency, update postproc/ffmpeg dependency in 9999. T... (diff)
downloadgentoo-2-adbfc027a14034fd0debbee04df472ec46b864c6.tar.gz
gentoo-2-adbfc027a14034fd0debbee04df472ec46b864c6.tar.bz2
gentoo-2-adbfc027a14034fd0debbee04df472ec46b864c6.zip
Re-add ZoneMinder to portage
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 94BFDF4484AD142F)
Diffstat (limited to 'www-misc')
-rw-r--r--www-misc/zoneminder/ChangeLog13
-rw-r--r--www-misc/zoneminder/files/10_zoneminder.conf18
-rw-r--r--www-misc/zoneminder/files/README.gentoo27
-rw-r--r--www-misc/zoneminder/files/conf.d6
-rw-r--r--www-misc/zoneminder/files/init.d26
-rw-r--r--www-misc/zoneminder/files/zoneminder-1.24.2-db_upgrade_script_location.patch11
-rw-r--r--www-misc/zoneminder/files/zoneminder-1.26.5-automagic.patch34
-rw-r--r--www-misc/zoneminder/metadata.xml13
-rw-r--r--www-misc/zoneminder/zoneminder-1.27.0.ebuild129
9 files changed, 277 insertions, 0 deletions
diff --git a/www-misc/zoneminder/ChangeLog b/www-misc/zoneminder/ChangeLog
new file mode 100644
index 000000000000..6cb075fdc0df
--- /dev/null
+++ b/www-misc/zoneminder/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for www-misc/zoneminder
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/www-misc/zoneminder/ChangeLog,v 1.43 2014/04/25 14:43:39 dilfridge Exp $
+
+*zoneminder-1.27.0 (25 Apr 2014)
+
+ 25 Apr 2014; Andreas K. Huettel <dilfridge@gentoo.org>
+ +zoneminder-1.27.0.ebuild, +files/10_zoneminder.conf,
+ +files/zoneminder-1.24.2-db_upgrade_script_location.patch,
+ +files/zoneminder-1.26.5-automagic.patch, +files/README.gentoo,
+ +files/conf.d, +files/init.d, +metadata.xml:
+ Re-add ZoneMinder to portage
+
diff --git a/www-misc/zoneminder/files/10_zoneminder.conf b/www-misc/zoneminder/files/10_zoneminder.conf
new file mode 100644
index 000000000000..277d680d24b4
--- /dev/null
+++ b/www-misc/zoneminder/files/10_zoneminder.conf
@@ -0,0 +1,18 @@
+ScriptAlias /cgi-bin/zms "/usr/libexec/zoneminder/cgi-bin/zms"
+ScriptAlias /cgi-bin/nph-zms "/usr/libexec/zoneminder/cgi-bin/nph-zms"
+
+<Directory "/usr/libexec/zoneminder/cgi-bin">
+ AllowOverride All
+ Options ExecCGI
+ Order allow,deny
+ Allow from all
+</Directory>
+
+Alias /zoneminder "%ZM_WEBDIR%"
+
+<Directory "%ZM_WEBDIR%">
+ Options -Indexes MultiViews FollowSymLinks
+ AllowOverride All
+ Order allow,deny
+ Allow from all
+</Directory>
diff --git a/www-misc/zoneminder/files/README.gentoo b/www-misc/zoneminder/files/README.gentoo
new file mode 100644
index 000000000000..2ada7c7d0a45
--- /dev/null
+++ b/www-misc/zoneminder/files/README.gentoo
@@ -0,0 +1,27 @@
+1. If this is a new installation, you will need to create a MySQL
+ database for zoneminder to use
+ (see https://wiki.gentoo.org/wiki/MySQL/Startup_Guide).
+ E.g., when logged into mysql as root,
+ mysql> CREATE DATABASE \`zm\`;
+ mysql> GRANT ALL ON zm.* TO 'zmuser'@'localhost' IDENTIFIED BY 'topsecretpassword';
+ Once you completed that you should execute the following:
+ cd /usr/share/zoneminder
+ mysql -u zmuser -p < db/zm_create.sql
+
+2. Set your database settings in /etc/zm.conf, including above topsecretpassword
+
+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.
+
+5. Start the zoneminder daemon:
+ /etc/init.d/zoneminder start
+
+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/files/conf.d b/www-misc/zoneminder/files/conf.d
new file mode 100644
index 000000000000..d2e03363867a
--- /dev/null
+++ b/www-misc/zoneminder/files/conf.d
@@ -0,0 +1,6 @@
+ZM_SCRIPT=/usr/bin/zmpkg.pl
+
+# Commands for starting and stopping the server
+
+CMD_START="${ZM_SCRIPT} start"
+CMD_STOP="${ZM_SCRIPT} stop"
diff --git a/www-misc/zoneminder/files/init.d b/www-misc/zoneminder/files/init.d
new file mode 100644
index 000000000000..66415c0e6bdd
--- /dev/null
+++ b/www-misc/zoneminder/files/init.d
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-misc/zoneminder/files/init.d,v 1.5 2014/04/25 14:43:40 dilfridge Exp $
+
+depend() {
+ need mysql
+ need apache2
+}
+
+start_pre() {
+ checkpath -d -m 0775 -o apache:apache /var/run/zm
+ checkpath -d -m 0775 -o apache:apache /var/tmp/zm
+}
+
+start() {
+ ebegin "Starting zoneminder"
+ ${CMD_START}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping zoneminder"
+ ${CMD_STOP}
+ eend $?
+}
diff --git a/www-misc/zoneminder/files/zoneminder-1.24.2-db_upgrade_script_location.patch b/www-misc/zoneminder/files/zoneminder-1.24.2-db_upgrade_script_location.patch
new file mode 100644
index 000000000000..41b537c4167a
--- /dev/null
+++ b/www-misc/zoneminder/files/zoneminder-1.24.2-db_upgrade_script_location.patch
@@ -0,0 +1,11 @@
+--- ZoneMinder-1.24.1/zm.conf.in.orig 2009-03-23 13:55:43.000000000 +0000
++++ ZoneMinder-1.24.1/zm.conf.in 2009-03-23 13:57:22.000000000 +0000
+@@ -13,7 +13,7 @@
+ ZM_VERSION=@VERSION@
+
+ # Path to build directory, used mostly for finding DB upgrade scripts
+-ZM_PATH_BUILD=@PATH_BUILD@
++ZM_PATH_BUILD=/usr/share/zoneminder
+
+ # Build time, used to record when to trigger various checks
+ ZM_TIME_BUILD=@TIME_BUILD@
diff --git a/www-misc/zoneminder/files/zoneminder-1.26.5-automagic.patch b/www-misc/zoneminder/files/zoneminder-1.26.5-automagic.patch
new file mode 100644
index 000000000000..266bd649baa6
--- /dev/null
+++ b/www-misc/zoneminder/files/zoneminder-1.26.5-automagic.patch
@@ -0,0 +1,34 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 83e9d81..8619c8b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -171,6 +171,7 @@ else(PCRE_LIBRARIES)
+ set(optlibsnotfound "${optlibsnotfound} PCRE")
+ endif(PCRE_LIBRARIES)
+
++if(HAVE_GCRYPT)
+ # gcrypt (using find_library and find_path)
+ find_library(GCRYPT_LIBRARIES gcrypt)
+ if(GCRYPT_LIBRARIES)
+@@ -187,7 +188,11 @@ if(GCRYPT_LIBRARIES)
+ else(GCRYPT_LIBRARIES)
+ set(optlibsnotfound "${optlibsnotfound} GCrypt")
+ endif(GCRYPT_LIBRARIES)
++else(HAVE_GCRYPT)
++ set(optlibsnotfound "${optlibsnotfound} GCrypt")
++endif(HAVE_GCRYPT)
+
++if(HAVE_GNUTLS)
+ # gnutls (using find_library and find_path)
+ find_library(GNUTLS_LIBRARIES gnutls)
+ if(GNUTLS_LIBRARIES)
+@@ -205,6 +210,9 @@ if(GNUTLS_LIBRARIES)
+ else(GNUTLS_LIBRARIES)
+ set(optlibsnotfound "${optlibsnotfound} GnuTLS")
+ endif(GNUTLS_LIBRARIES)
++else(HAVE_GNUTLS)
++ set(optlibsnotfound "${optlibsnotfound} GnuTLS")
++endif(HAVE_GNUTLS)
+
+ # mysqlclient (using find_library and find_path)
+ find_library(MYSQLCLIENT_LIBRARIES mysqlclient PATH_SUFFIXES mysql)
diff --git a/www-misc/zoneminder/metadata.xml b/www-misc/zoneminder/metadata.xml
new file mode 100644
index 000000000000..bd56d97e7ada
--- /dev/null
+++ b/www-misc/zoneminder/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>dilfridge@gentoo.org</email>
+ <name>Andreas K. Huettel</name>
+ </maintainer>
+ <use>
+ <flag name="gcrypt">...</flag>
+ <flag name="vlc">...</flag>
+ <flag name="openssl">...</flag>
+ </use>
+</pkgmetadata>
diff --git a/www-misc/zoneminder/zoneminder-1.27.0.ebuild b/www-misc/zoneminder/zoneminder-1.27.0.ebuild
new file mode 100644
index 000000000000..0422a642d718
--- /dev/null
+++ b/www-misc/zoneminder/zoneminder-1.27.0.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-misc/zoneminder/zoneminder-1.27.0.ebuild,v 1.1 2014/04/25 14:43:39 dilfridge Exp $
+
+# TO DO:
+# * 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:
+# dev-perl/Archive-Zip
+# dev-perl/Device-SerialPort
+# dev-perl/MIME-Lite
+# dev-perl/MIME-tools
+# dev-perl/PHP-Serialization
+# virtual/perl-Archive-Tar
+# virtual/perl-libnet
+# virtual/perl-Module-Load
+
+EAPI=5
+
+PERL_EXPORT_PHASE_FUNCTIONS=no
+
+inherit perl-module readme.gentoo eutils base cmake-utils depend.php depend.apache multilib flag-o-matic
+
+MY_PN="ZoneMinder"
+
+DESCRIPTION="ZoneMinder allows you to capture, analyse, record and monitor any cameras attached to your system"
+HOMEPAGE="http://www.zoneminder.com/"
+SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~amd64"
+IUSE="gcrypt gnutls mmap +openssl vlc"
+SLOT="0"
+
+REQUIRED_USE="
+ || ( openssl gnutls )
+"
+
+DEPEND="
+ dev-lang/perl:=
+ dev-libs/libpcre
+ dev-perl/DateManip
+ dev-perl/DBD-mysql
+ dev-perl/DBI
+ dev-perl/libwww-perl
+ sys-libs/zlib
+ virtual/ffmpeg
+ virtual/jpeg
+ virtual/mysql
+ virtual/perl-ExtUtils-MakeMaker
+ virtual/perl-Getopt-Long
+ virtual/perl-Sys-Syslog
+ virtual/perl-Time-HiRes
+ gcrypt? ( dev-libs/libgcrypt )
+ gnutls? ( net-libs/gnutls )
+ mmap? ( dev-perl/Sys-Mmap )
+ openssl? ( dev-libs/openssl )
+ vlc? ( media-video/vlc )
+"
+RDEPEND="${DEPEND}"
+
+# we cannot use need_httpd_cgi here, since we need to setup permissions for the
+# webserver in global scope (/etc/zm.conf etc), so we hardcode apache here.
+need_apache
+need_php_httpd
+
+S=${WORKDIR}/${MY_PN}-${PV}
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.26.5"-automagic.patch
+)
+
+MY_ZM_WEBDIR=/usr/share/zoneminder/www
+
+pkg_setup() {
+ require_php_with_use mysql sockets apache2
+}
+
+src_configure() {
+ append-cxxflags -D__STDC_CONSTANT_MACROS
+ perl_set_version
+
+ mycmakeargs=(
+ -DZM_PERL_SUBPREFIX=${VENDOR_LIB}
+ -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
+ $(cmake-utils_useno vlc ZM_NO_VLC)
+ $(cmake-utils_useno openssl CMAKE_DISABLE_FIND_PACKAGE_OpenSSL)
+ $(cmake-utils_use_has gnutls)
+ $(cmake-utils_use_has gcrypt)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # the log directory
+ keepdir /var/log/zm
+ fowners apache:apache /var/log/zm
+
+ # 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
+
+ # init scripts etc
+ newinitd "${FILESDIR}"/init.d zoneminder
+ newconfd "${FILESDIR}"/conf.d zoneminder
+
+ cp "${FILESDIR}"/10_zoneminder.conf "${T}"/10_zoneminder.conf
+ sed -i "${T}"/10_zoneminder.conf -e "s:%ZM_WEBDIR%:${MY_ZM_WEBDIR}:g"
+
+ dodoc AUTHORS BUGS ChangeLog INSTALL NEWS README.md TODO "${T}"/10_zoneminder.conf
+
+ readme.gentoo_src_install
+}