Author: moixs
Update of /cvs/free/rpms/motion/F-9
In directory se02.es.rpmfusion.net:/tmp/cvs-serv25389/F-9
Modified Files:
.cvsignore sources
Added Files:
ffmpeg-detection.patch motion-initscript motion.spec
Log Message:
Initial import
ffmpeg-detection.patch:
--- NEW FILE ffmpeg-detection.patch ---
Index: configure.in
===================================================================
--- configure.in (revisiĆ³n: 433)
+++ configure.in (copia de trabajo)
@@ -389,6 +389,9 @@
elif test -f ${FFMPEG_DIR}/include/libavformat/avformat.h; then
AC_MSG_RESULT(found ${FFMPEG_DIR}/include/libavformat/avformat.h)
FFMPEG_CFLAGS="-I${FFMPEG_DIR}/include -DFFMPEG_NEW_INCLUDES"
+ elif test -f ${FFMPEG_DIR}/include/ffmpeg/libavformat/avformat.h; then
+ AC_MSG_RESULT(found ${FFMPEG_DIR}/include/ffmpeg/libavformat/avformat.h)
+ FFMPEG_CFLAGS="-I${FFMPEG_DIR}/include/ffmpeg -DFFMPEG_NEW_INCLUDES"
else
AC_MSG_RESULT(not found)
FFMPEG_OK="no_found"
Index: configure
===================================================================
--- configure (revisiĆ³n: 433)
+++ configure (copia de trabajo)
@@ -3261,6 +3261,10 @@
{ echo "$as_me:$LINENO: result: found
${FFMPEG_DIR}/include/libavformat/avformat.h" >&5
echo "${ECHO_T}found ${FFMPEG_DIR}/include/libavformat/avformat.h" >&6;
}
FFMPEG_CFLAGS="-I${FFMPEG_DIR}/include -DFFMPEG_NEW_INCLUDES"
+ elif test -f ${FFMPEG_DIR}/include/ffmpeg/libavformat/avformat.h; then
+ { echo "$as_me:$LINENO: result: found
${FFMPEG_DIR}/include/ffmpeg/libavformat/avformat.h" >&5
+echo "${ECHO_T}found ${FFMPEG_DIR}/include/ffmpeg/libavformat/avformat.h"
>&6; }
+ FFMPEG_CFLAGS="-I${FFMPEG_DIR}/include/ffmpeg -DFFMPEG_NEW_INCLUDES"
else
{ echo "$as_me:$LINENO: result: not found" >&5
echo "${ECHO_T}not found" >&6; }
--- NEW FILE motion-initscript ---
#!/bin/bash
#
# motion Startup script for the Motion Detection System
#
# chkconfig: - 85 15
# description: Motion detection system. It is used to detect movement based \
# on compare images.
# processname: motion
# pidfile: /var/run/motion.pid
# config: /etc/motion.conf
#
### BEGIN INIT INFO
# Provides: motion
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start:
# Default-Stop:
# Short-Description: Start and stop motion detection system
# Description: The Motion detection system is used to detect movement based
# on image comparison.
### END INIT INFO
# Source function library.
. /etc/rc.d/init.d/functions
motion=${MOTION-/usr/bin/motion}
prog=motion
pidfile=/var/run/motion.pid
lockfile=/var/lock/subsys/motion
start() {
[ -x $exec ] || exit 5
[ -f $config ] || exit 6
echo -n $"Starting $prog: "
daemon $motion 2> /dev/null
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping $prog: "
killproc $motion
retval=$?
echo
[ $retval = 0 ] && rm -f $lockfile
}
restart() {
stop
start
}
reload() {
echo -n $"Reloading $prog configuration: "
killproc $motion -HUP
retval=$?
echo
return $retval
}
rh_status() {
# run checks to determine if the service is running or use generic status
status $prog
}
rh_status_q() {
rh_status >/dev/null 2>&1
}
# See how we were called.
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
#force_reload
reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
restart
;;
*)
echo $"Usage: $0
{start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
exit 1
esac
exit $?
--- NEW FILE motion.spec ---
Name: motion
Version: 3.2.11
Release: 3%{?dist}
Summary: A motion detection system
Group: Applications/Multimedia
License: GPLv2+
URL:
http://motion.sourceforge.net/
Source0:
http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Source1: motion-initscript
Patch0: ffmpeg-detection.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libjpeg-devel ffmpeg-devel zlib-devel
#Requires: ffmpeg
Requires(post): chkconfig
Requires(preun): chkconfig initscripts
Requires(postun): initscripts
%description
Motion is a software motion detector. It grabs images from video4linux devices
and/or from webcams (such as the axis network cameras). Motion is the perfect
tool for keeping an eye on your property keeping only those images that are
interesting. Motion is strictly command line driven and can run as a daemon
with a rather small footprint. This version is built with ffmpeg support but
without MySQL and PostgreSQL support.
%prep
%setup -q
#ffmpeg detection patch in version 3.2.11. This is an upstream patch.
%patch0 -p0
%build
%configure --sysconfdir=%{_sysconfdir}/%{name} --without-optimizecpu --with-ffmpeg
--without-mysql --without-pgsql
#We convert 2 files to UTF-8, otherwise rpmlint complains
iconv -f iso8859-1 -t utf-8 CREDITS > CREDITS.conv && mv -f CREDITS.conv
CREDITS
iconv -f iso8859-1 -t utf-8 CHANGELOG > CHANGELOG.conv && mv -f CHANGELOG.conv
CHANGELOG
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
#We rename the configuration file
mv %{buildroot}%{_sysconfdir}/%{name}/motion-dist.conf
%{buildroot}%{_sysconfdir}/%{name}/motion.conf
#We change the PID file path to match the one in the startup script
sed -i 's|/var/run/motion/motion.pid|/var/run/motion.pid|g'
%{buildroot}%{_sysconfdir}/%{name}/motion.conf
#We remove SQL directives in the configuration file, as we don't use them
sed -i 's|sql_log_image|; sql_log_image|g'
%{buildroot}%{_sysconfdir}/%{name}/motion.conf
sed -i 's|sql_log_snapshot|; sql_log_snapshot|g'
%{buildroot}%{_sysconfdir}/%{name}/motion.conf
sed -i 's|sql_log_mpeg|; sql_log_mpeg|g'
%{buildroot}%{_sysconfdir}/%{name}/motion.conf
sed -i 's|sql_log_timelapse|; sql_log_timelapse|g'
%{buildroot}%{_sysconfdir}/%{name}/motion.conf
sed -i 's|sql_query|; sql_query|g' %{buildroot}%{_sysconfdir}/%{name}/motion.conf
#We install our startup script
install -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}
%post
#We add the motion init script to the services when installing
/sbin/chkconfig --add %{name}
%preun
#We stop the service and remove it from init scripts when erasing
if [ $1 = 0 ] ; then
/sbin/service %{name} stop >/dev/null 2>&1
/sbin/chkconfig --del %{name}
fi
%postun
#We restart the service during an upgrade
if [ "$1" -ge "1" ] ; then
/sbin/service %{name} condrestart >/dev/null 2>&1
fi
%clean
rm -rf %{buildroot}
%files
#Permissions are bogus upstream, we need to be sure to set them here
%defattr (-,root,root,-)
%dir %{_sysconfdir}/%{name}
%dir %{_datadir}/%{name}-%{version}
%dir %{_datadir}/%{name}-%{version}/examples
%doc CHANGELOG COPYING CREDITS INSTALL README motion_guide.html
%attr(0644,root,root) %{_datadir}/%{name}-%{version}/examples/motion-dist.conf
%attr(0755,root,root) %{_datadir}/%{name}-%{version}/examples/motion.init-Debian
%attr(0755,root,root) %{_datadir}/%{name}-%{version}/examples/motion.init-FreeBSD.sh
%attr(0755,root,root) %{_datadir}/%{name}-%{version}/examples/motion.init-RH
%attr(0644,root,root) %{_datadir}/%{name}-%{version}/examples/thread1.conf
%attr(0644,root,root) %{_datadir}/%{name}-%{version}/examples/thread2.conf
%attr(0644,root,root) %{_datadir}/%{name}-%{version}/examples/thread3.conf
%attr(0644,root,root) %{_datadir}/%{name}-%{version}/examples/thread4.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/motion.conf
%attr(0755,root,root) %{_bindir}/motion
%attr(0644,root,root) %{_mandir}/man1/motion.1*
%attr(0755,root,root) %{_initrddir}/%{name}
%changelog
* Wed Mar 18 2009 Steven Moix <steven.moix(a)axianet.ch> - 3.2.11-3
- Even more corrected init script thanks to Stewart Adam
* Sun Mar 15 2009 Steven Moix <steven.moix(a)axianet.ch> - 3.2.11-2
- Removed the ffmpeg requires
- Corrected the spec file
- New init script with a corrected start() function and LSB header support
* Tue Mar 03 2009 Steven Moix <steven.moix(a)axianet.ch> - 3.2.11-1
- Updated to Fedora 10 standard
* Sun Sep 18 2005 Kenneth Lavrsen <kenneth(a)lavrsen.dk> - 3.2.4-1
- Generic version of livna spec file replacing the old less optimal specfile.
* Thu Sep 15 2005 Dams <anvil[AT]livna.org> - 3.2.3-0.lvn.1
- Initial released based upon upstream spec file
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/motion/F-9/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 19 Mar 2009 18:19:36 -0000 1.1
+++ .cvsignore 19 Mar 2009 19:06:25 -0000 1.2
@@ -0,0 +1 @@
+motion-3.2.11.tar.gz
Index: sources
===================================================================
RCS file: /cvs/free/rpms/motion/F-9/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 19 Mar 2009 18:19:36 -0000 1.1
+++ sources 19 Mar 2009 19:06:26 -0000 1.2
@@ -0,0 +1 @@
+3a26c00f3250eacf6fa93c7a7e0249d9 motion-3.2.11.tar.gz