Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:plater
motion
motion.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File motion.spec of Package motion
# # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: motion Version: 3.3.0.git1 Release: 0 # Fedora release #Release: trunkREV534%{?dist} Summary: A movement detection system for cameras and webcams License: GPL-2.0+ Url: http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome Group: Hardware/Camera # Source url only useful for releases : http://prdownloads.sourceforge.net/%%{name}/ Source0: %{name}-%{version}.tar.bz2 # Latest motion guide. Source1: motion_guide.html # NOTE: This patch allows $SNV_VERSION to change the version from git revision. Remove for release versions. Patch0: motion-3.3.0.git1-version.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake BuildRequires: libjpeg-devel BuildRequires: zlib-devel BuildRequires: libv4l-devel #This requires comes from the startup script, it will be there until motion supports libv4l calls in the code #Requires: libv4l %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 without MySQL and PostgreSQL support. %prep %setup -q %patch0 cp -v %{SOURCE1} . %build # NOTE: This is for git, put package version into configure, comment the next two lines out for releases. export SNV_VERSION=%{version} autoreconf -fi %configure --sysconfdir=%{_sysconfdir}/%{name} --docdir=%{_docdir}/%{name} --without-optimizecpu --without-mysql --without-pgsql --with-ffmpeg=no make %{?_smp_mflags} %install %make_install #We rename the configuration file mv %{buildroot}%{_sysconfdir}/%{name}/motion-dist.conf %{buildroot}%{_sysconfdir}/%{name}/motion.conf # no logrotate built %if 1 == 0 #We move the logrotate configuration mkdir %{buildroot}%{_sysconfdir}/logrotate.d mv %{_builddir}/%{name}-%{version}/motion.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/motion %endif #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 set the log file and target directory - logging is for 3.3 branch sed -i 's|;logfile /tmp/motion.log|logfile /var/log/motion.log|g' %{buildroot}%{_sysconfdir}/%{name}/motion.conf sed -i 's|target_dir /usr/local/apache2/htdocs/cam1|target_dir /var/motion|g' %{buildroot}%{_sysconfdir}/%{name}/motion.conf # Remove duplicated doc files rm -r %{buildroot}%{_datadir}/doc/%{name}-%{version} %if 1 == 0 %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 %endif %clean rm -rf %{buildroot} %files #Permissions are bogus upstream, we need to be sure to set them here %defattr (-,root,root,-) %doc CHANGELOG COPYING CREDITS README motion_guide.html %dir %{_sysconfdir}/%{name} %dir %{_datadir}/%{name}-%{version} %dir %{_datadir}/%{name}-%{version}/examples %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-Fedora %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* %if 1 == 0 %attr(0644,root,root) %{_sysconfdir}/logrotate.d/motion %endif %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor