diff options
author | Alexis Ballier <aballier@gentoo.org> | 2007-11-19 21:09:03 +0000 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2007-11-19 21:09:03 +0000 |
commit | 51cd810b405783d0b5f289ecce42f464419d2cd5 (patch) | |
tree | caf39fe45e3a2131a3aa6a61a9e2d6a29a50497d /media-video | |
parent | rev bump per bug #154795 (diff) | |
download | gentoo-2-51cd810b405783d0b5f289ecce42f464419d2cd5.tar.gz gentoo-2-51cd810b405783d0b5f289ecce42f464419d2cd5.tar.bz2 gentoo-2-51cd810b405783d0b5f289ecce42f464419d2cd5.zip |
version bump, tune a bit init script to let it run as non root, bug #157913
(Portage version: 2.1.3.19)
Diffstat (limited to 'media-video')
-rw-r--r-- | media-video/motion/ChangeLog | 9 | ||||
-rw-r--r-- | media-video/motion/files/digest-motion-3.2.9 | 3 | ||||
-rw-r--r-- | media-video/motion/files/motion-3.2.9-asneeded.patch | 13 | ||||
-rw-r--r-- | media-video/motion/files/motion.confd | 4 | ||||
-rw-r--r-- | media-video/motion/files/motion.init-r1 | 29 | ||||
-rw-r--r-- | media-video/motion/motion-3.2.9.ebuild | 73 |
6 files changed, 130 insertions, 1 deletions
diff --git a/media-video/motion/ChangeLog b/media-video/motion/ChangeLog index 6a2b618b7efe..834c7239d500 100644 --- a/media-video/motion/ChangeLog +++ b/media-video/motion/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for media-video/motion # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/motion/ChangeLog,v 1.15 2007/10/19 15:37:54 drac Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/motion/ChangeLog,v 1.16 2007/11/19 21:09:03 aballier Exp $ + +*motion-3.2.9 (19 Nov 2007) + + 19 Nov 2007; Alexis Ballier <aballier@gentoo.org> + +files/motion-3.2.9-asneeded.patch, +files/motion.confd, + +files/motion.init-r1, +motion-3.2.9.ebuild: + version bump, tune a bit init script to let it run as non root, bug #157913 19 Oct 2007; Samuli Suominen <drac@gentoo.org> files/motion.init: Add after mysql statement to init script wrt #168777. diff --git a/media-video/motion/files/digest-motion-3.2.9 b/media-video/motion/files/digest-motion-3.2.9 new file mode 100644 index 000000000000..16874f8b2828 --- /dev/null +++ b/media-video/motion/files/digest-motion-3.2.9 @@ -0,0 +1,3 @@ +MD5 6003011b126c9b17e23e085e7fba6536 motion-3.2.9.tar.gz 377075 +RMD160 47708b7dbd9b63f7709ad3f6f40754eb7d82b134 motion-3.2.9.tar.gz 377075 +SHA256 de452dc1530d078b29b5a39a909d7483c5b857df3f48c3cef73765a37e98f20c motion-3.2.9.tar.gz 377075 diff --git a/media-video/motion/files/motion-3.2.9-asneeded.patch b/media-video/motion/files/motion-3.2.9-asneeded.patch new file mode 100644 index 000000000000..5ba12490251f --- /dev/null +++ b/media-video/motion/files/motion-3.2.9-asneeded.patch @@ -0,0 +1,13 @@ +Index: motion-3.2.9/configure +=================================================================== +--- motion-3.2.9.orig/configure ++++ motion-3.2.9/configure +@@ -4064,7 +4064,7 @@ fi + echo "${ECHO_T}$ac_cv_lib_lavjpeg_decode_jpeg_raw" >&6; } + if test $ac_cv_lib_lavjpeg_decode_jpeg_raw = yes; then + +- TEMP_LDFLAGS="$TEMP_LDFLAGS -lmjpegutils -llavjpeg" ++ TEMP_LIBS="$TEMP_LIBS -lmjpegutils -llavjpeg" + MJPEG_SUPPORT="yes" + TEMP_CFLAGS="$TEMP_CFLAGS -DMJPEGT" + diff --git a/media-video/motion/files/motion.confd b/media-video/motion/files/motion.confd new file mode 100644 index 000000000000..f79c97aee968 --- /dev/null +++ b/media-video/motion/files/motion.confd @@ -0,0 +1,4 @@ +# Set the user and group under which motion will be ran + +MOTION_USER="motion" +MOTION_GROUP="video" diff --git a/media-video/motion/files/motion.init-r1 b/media-video/motion/files/motion.init-r1 new file mode 100644 index 000000000000..70263988d082 --- /dev/null +++ b/media-video/motion/files/motion.init-r1 @@ -0,0 +1,29 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-video/motion/files/motion.init-r1,v 1.1 2007/11/19 21:09:03 aballier Exp $ + +opts="${opts} reload" + +depend() { + need modules + after mysql +} + +start() { + ebegin "Starting motion detection" + start-stop-daemon --start -c ${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.9.ebuild b/media-video/motion/motion-3.2.9.ebuild new file mode 100644 index 000000000000..88bd55f9b576 --- /dev/null +++ b/media-video/motion/motion-3.2.9.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-video/motion/motion-3.2.9.ebuild,v 1.1 2007/11/19 21:09:03 aballier Exp $ + +inherit eutils + +DESCRIPTION="Motion is a video motion detector with tracking-support for webcams." +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 ~ppc ~x86" +IUSE="ffmpeg mysql postgres v4l" + +DEPEND="sys-libs/zlib + media-libs/jpeg + media-video/mjpegtools + ffmpeg? ( media-video/ffmpeg ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql )" + +pkg_setup() { + enewuser motion -1 -1 -1 "video" || die "failed to create motion user" +} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}/${P}-asneeded.patch" +} + +src_compile() { + econf --without-optimizecpu \ + $(use_with v4l) \ + $(use_with mysql) \ + $(use_with postgres pgsql) \ + $(use_with ffmpeg) + + emake || die "emake failed." +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed." + + # Install init script. + newinitd "${FILESDIR}"/motion.init-r1 motion + newconfd "${FILESDIR}"/motion.confd motion + + # Create correct dir for motion.pid + dodir /var/run/motion + fowners motion:video /var/run/motion + fperms 750 /var/run/motion + keepdir /var/run/motion + + # Rename configuration file. + mv "${D}"/etc/motion-dist.conf "${D}"/etc/motion.conf + + # Tell it to use a pid file where motion user has the rights to write to + sed -i -e "s:motion.pid:motion/\0:" "${D}/etc/motion.conf" + + # Remove dummy documentation and install it using ebuild functions. + rm -rf "${D}"/usr/share/doc/${P} + dodoc CHANGELOG CODE_STANDARD CREDITS FAQ README README.FreeBSD *.conf + dohtml *.html +} + +pkg_postinst() { + elog "You need to setup /etc/motion.conf before running" + elog "motion for the first time. You can install motion" + elog "detection as a service, use:" + elog "rc-update add motion default" +} |