%define serverdir %(/usr/sbin/apxs -q htdocsdir 2>/dev/null) Name: motion Version: 20140315git Release: 1mamba Summary: A Video-surveilance-system Group: Applications/Multimedia Vendor: openmamba Distribution: openmamba Packager: Fabio Giani URL: http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome Source: https://github.com/sackmotion/motion.git/master/motion-%{version}.tar.bz2 #Source: http://downloads.sourceforge.net/sourceforge/motion/motion-%{version}.tar.gz Source1: motion-initscript Source2: motion-conf Source3: http://www.lavrsen.dk/foswiki/pub/Motion/MotionBrowser/motionbrowser.tar Patch0: %{name}-3.2.11-ffmpeg.patch Patch1: %{name}-3.2.12-motionbrowser.patch License: GPL BuildRoot: %{_tmppath}/%{name}-%{version}-root ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libSDL-devel BuildRequires: libavcodec-ffmpeg-devel BuildRequires: libavformat-ffmpeg-devel BuildRequires: libavutil-ffmpeg-devel BuildRequires: libjpeg-devel BuildRequires: libmysql-devel BuildRequires: libpostgresql-devel BuildRequires: libsqlite-devel BuildRequires: libz-devel ## AUTOBUILDREQ-END BuildRequires: liba52dec-devel BuildRequires: libdc1394-devel BuildRequires: libogg-devel BuildRequires: libraw1394-devel BuildRequires: libtheora-devel BuildRequires: libvorbis-devel BuildRequires: libdb47-devel BuildRequires: libavifile-devel BuildRequires: libpth-devel BuildRequires: libpthread-stubs-devel BuildRequires: libmcrypt-devel BuildRequires: libglib-devel BuildRequires: apache Requires: mjpegtools %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 %patch0 -p1 tar -xf %{SOURCE3} %patch1 -p0 %build sed -i "s|-lavcodec|-lavcodec -ldl|" configure %configure echo make %make %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall mkdir -p %{buildroot}%{_var}/run/motion install -D -m0755 %{SOURCE1} %{buildroot}%{_initrddir}/motion install -D -m0644 %{SOURCE2} %{buildroot}/etc/motion.conf install -d %{buildroot}%{serverdir} cp -a mb %{buildroot}%{serverdir}/motion %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %files %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/motion.conf %{_sysconfdir}/motion-dist.conf %{_initrddir}/motion %{_bindir}/motion %{_datadir}/%{name}-Git-*/* %{_docdir}/%{name}-Git-*/* %dir %{serverdir}/motion/ %config(noreplace) %{serverdir}/motion/config.inc %{serverdir}/motion/calendar.inc %{serverdir}/motion/en %{serverdir}/motion/fr %{serverdir}/motion/it %{serverdir}/motion/README %{serverdir}/motion/*.php %{serverdir}/motion/motionbrowser.css %{serverdir}/motion/*.gif %dir %{_var}/run/motion %{_mandir}/man1/motion.1* %doc COPYING #CREDITS README README.axis_2100 README.FreeBSD README.MacOSX %changelog * Sat Mar 15 2014 Silvan Calarco 20140315git-1mamba - update to 20140315git * Sat Mar 15 2014 Silvan Calarco 3.2.12-6mamba - rebuild with ffmpeg 2.1 * Tue Aug 24 2010 Silvan Calarco 3.2.12-5mamba - install motionbrowser * Thu Jul 22 2010 Silvan Calarco 3.2.12-4mamba - added initscript - install default configuration with correct system html dir * Wed Jun 30 2010 Automatic Build System 3.2.12-3mamba - automatic rebuild by autodist * Wed Jun 09 2010 Automatic Build System 3.2.12-2mamba - automatic rebuild by autodist * Fri Jun 04 2010 Automatic Build System 3.2.12-1mamba - automatic update by autodist * Fri Jan 01 2010 Ercole 'ercolinux' Carpanetto 3.2.11.1-3mamba - added var/run/motion dir for the pid file - renamed motion-dist.conf to motion.conf * Wed Nov 25 2009 Automatic Build System 3.2.11.1-2mamba - automatic rebuild by autodist * Sun Aug 16 2009 Automatic Build System 3.2.11.1-1mamba - automatic update by autodist * Wed Mar 11 2009 Silvan Calarco 3.2.11-4mamba - automatic rebuild by autodist * Fri Dec 12 2008 Silvan Calarco 3.2.11-3mamba - automatic rebuild by autodist * Wed Nov 19 2008 Silvan Calarco 3.2.11-2mamba - automatic rebuild by autodist * Tue Nov 18 2008 Silvan Calarco 3.2.11-1mamba - update to 3.2.11 * Tue Nov 18 2008 Silvan Calarco 3.2.10-2mamba - automatic rebuild by autodist * Sun Jun 01 2008 Fabio Giani 3.2.10-1mamba - update to 3.2.10 * Mon Feb 04 2008 Silvan Calarco 3.2.9-2mamba - rebuilt against recent libffmpeg - added automatic build requirements * Sat Dec 01 2007 Fabio Giani 3.2.9-1mamba - package created by autospec