Name: motion Version: 3.2.10.1 Release: 1%{?dist} Summary: MOTION, a Video-surveilance-system Group: Applications/Multimedia License: GPLv2 URL: http://motion.sourceforge.net/ Source0: http://downloads.sourceforge.net/motion/%{name}-%{version}.tar.gz Source1: %{name}.init BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libjpeg-devel BuildRequires: ffmpeg-devel BuildRequires: postgresql-devel BuildRequires: mysql-devel Requires: ffmpeg %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. It is built with MySQL and PostgreSQL support and mpegs generated by ffmpeg and http remote control. %prep %setup -q # motion.conf sed -i -e '1d;2d' %{name}-dist.conf.in sed -i -e "s@target_dir /usr/local/apache2/htdocs/cam1@target_dir /var/www/cam1@" %{name}-dist.conf.in sed -i -e "s@\$(INSTALL) %{name}-dist.conf \$(DESTDIR)\$(sysconfdir)@\$(INSTALL) -m 644 %{name}-dist.conf \$(DESTDIR)\$(sysconfdir)/%{name}.conf@" Makefile.in # spurious-executable-perm /usr/share/man/man1/motion.1 sed -i -e "s@\$(INSTALL) %{name}.1 \$(DESTDIR)\$(mandir)/man1@\$(INSTALL) -m 644 %{name}.1 \$(DESTDIR)\$(mandir)/man1@" Makefile.in # Convert to utf-8 for file in CHANGELOG CREDITS; do mv $file timestamp iconv -f ISO-8859-1 -t UTF-8 -o $file timestamp touch -r timestamp $file done %build %configure --sysconfdir=%{_sysconfdir}/%{name} \ --without-optimizecpu \ --without-libjpeg-mmx make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT # init Script install -D -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/%{name} # /var/run/motion mkdir -pm 0777 $RPM_BUILD_ROOT%{_var}/run/%{name} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc CHANGELOG COPYING CREDITS INSTALL README motion_guide.html %doc motion-dist.conf thread1.conf thread2.conf thread3.conf thread4.conf %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf %{_bindir}/%{name} %{_mandir}/man1/%{name}* %{_initrddir}/%{name} %{_var}/run/%{name} %changelog * Sat Aug 23 2008 Guillaume Kulakowski - 3.2.10.1-1 - Recovery packaging * Sun Sep 18 2005 Kenneth Lavrsen - 3.2.4-1 - Generic version of livna spec file replacing the old less optimal specfile. * Thu Sep 15 2005 Dams - 3.2.3-0.lvn.1 - Initial released based upon upstream spec file