summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2011-10-02 18:48:35 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2011-10-02 18:48:35 +0000
commit636ed6fc5ec66288fc44e0e072f2e9acb6b629b7 (patch)
tree023770daf965550a6c1217d36ee9f72aa1ea0643 /media-video/motion
parentFix phonon deps (should be 'alternative'). Reported by Tomasz Golinski. (diff)
downloadgentoo-2-636ed6fc5ec66288fc44e0e072f2e9acb6b629b7.tar.gz
gentoo-2-636ed6fc5ec66288fc44e0e072f2e9acb6b629b7.tar.bz2
gentoo-2-636ed6fc5ec66288fc44e0e072f2e9acb6b629b7.zip
Use more recent s-s-d syntax wrt #380279 by Tom Hendrikx
(Portage version: 2.2.0_alpha60/cvs/Linux x86_64)
Diffstat (limited to 'media-video/motion')
-rw-r--r--media-video/motion/ChangeLog8
-rw-r--r--media-video/motion/files/motion.initd-r239
-rw-r--r--media-video/motion/motion-3.2.12-r1.ebuild68
3 files changed, 114 insertions, 1 deletions
diff --git a/media-video/motion/ChangeLog b/media-video/motion/ChangeLog
index b5ff1872045d..247acf6338a1 100644
--- a/media-video/motion/ChangeLog
+++ b/media-video/motion/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-video/motion
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/motion/ChangeLog,v 1.33 2011/05/19 18:50:35 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/motion/ChangeLog,v 1.34 2011/10/02 18:48:35 ssuominen Exp $
+
+*motion-3.2.12-r1 (02 Oct 2011)
+
+ 02 Oct 2011; Samuli Suominen <ssuominen@gentoo.org> +motion-3.2.12-r1.ebuild,
+ +files/motion.initd-r2:
+ Use more recent s-s-d syntax wrt #380279 by Tom Hendrikx
*motion-3.2.12 (19 May 2011)
diff --git a/media-video/motion/files/motion.initd-r2 b/media-video/motion/files/motion.initd-r2
new file mode 100644
index 000000000000..2e0b120feaf7
--- /dev/null
+++ b/media-video/motion/files/motion.initd-r2
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/motion/files/motion.initd-r2,v 1.1 2011/10/02 18:48:35 ssuominen Exp $
+
+extra_started_commands="reload"
+
+_create_motion_run_dir() {
+ local dir="/var/run/motion"
+ if ! [ -d "$dir" ]; then
+ mkdir -p -m750 "$dir"
+ chown ${MOTION_USER}:${MOTION_GROUP} "$dir"
+ fi
+}
+
+depend() {
+ need modules
+ after mysql
+}
+
+start() {
+ _create_motion_run_dir
+
+ ebegin "Starting motion detection"
+ start-stop-daemon --start -u ${MOTION_USER} -g ${MOTION_GROUP} --quiet --exec /usr/bin/motion
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping motion detection"
+ start-stop-daemon --stop --quiet --exec /usr/bin/motion
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading motion detection configuration"
+ start-stop-daemon --stop --signal HUP --exec /usr/bin/motion
+ eend $?
+}
diff --git a/media-video/motion/motion-3.2.12-r1.ebuild b/media-video/motion/motion-3.2.12-r1.ebuild
new file mode 100644
index 000000000000..e0d6fde5695f
--- /dev/null
+++ b/media-video/motion/motion-3.2.12-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/motion/motion-3.2.12-r1.ebuild,v 1.1 2011/10/02 18:48:35 ssuominen Exp $
+
+EAPI=4
+inherit eutils
+
+DESCRIPTION="A software motion detector"
+HOMEPAGE="http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ppc ~x86"
+IUSE="ffmpeg mysql postgres v4l"
+
+RDEPEND="sys-libs/zlib
+ virtual/jpeg
+ ffmpeg? ( virtual/ffmpeg )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql-base )"
+DEPEND="${RDEPEND}
+ v4l? ( virtual/os-headers )"
+
+pkg_setup() {
+ enewuser motion -1 -1 -1 video
+}
+
+src_configure() {
+ local hack
+ if has_version '>=sys-kernel/linux-headers-2.6.38'; then
+ hack="--without-v4l" #361509
+ ewarn "Disabling video4linux support because of too new"
+ ewarn "linux-headers. See bug 376225 for new motion."
+ fi
+
+ econf \
+ $(use_with v4l) \
+ $(use_with ffmpeg) \
+ $(use_with mysql) \
+ $(use_with postgres pgsql) \
+ --without-optimizecpu \
+ ${hack}
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ DOC='CHANGELOG CODE_STANDARD CREDITS FAQ README' \
+ docdir=/usr/share/doc/${PF} \
+ EXAMPLES='thread*.conf' \
+ examplesdir=/usr/share/doc/${PF}/examples \
+ install
+
+ dohtml *.html
+
+ newinitd "${FILESDIR}"/motion.initd-r2 motion
+ newconfd "${FILESDIR}"/motion.confd motion
+
+ mv -vf "${D}"/etc/motion{-dist,}.conf || die
+}
+
+pkg_postinst() {
+ elog "You need to setup /etc/motion.conf before running"
+ elog "motion for the first time."
+ elog "You can install motion detection as a service, use:"
+ elog "rc-update add motion default"
+}