Skip to content

Commit

Permalink
Refactoring for Fedora/RPM systems.
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenM authored and StevenM committed Mar 25, 2010
1 parent 66dc7dc commit 00ba7c3
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ OBJ = motion.o logger.o conf.o draw.o jpegutils.o vloopback_motion.o $(
stream.o md5.o @FFMPEG_OBJ@
SRC = $(OBJ:.o=.c)
DOC = CHANGELOG COPYING CREDITS INSTALL README motion_guide.html
EXAMPLES = *.conf motion.init-Debian motion.init-RH motion.init-FreeBSD.sh
EXAMPLES = *.conf motion.init-Debian motion.init-Fedora motion.init-FreeBSD.sh
PROGS = motion
DEPEND_FILE = .depend

Expand Down Expand Up @@ -226,7 +226,7 @@ dist: distclean updateguide
################################################################################
distclean: clean
@echo "Removing files generated by configure..."
@rm -f config.status config.log config.cache Makefile motion.init-RH motion.init-Debian motion.init-FreeBSD.sh
@rm -f config.status config.log config.cache Makefile motion.init-Fedora motion.init-Debian motion.init-FreeBSD.sh
@rm -f thread1.conf thread2.conf thread3.conf thread4.conf motion-dist.conf motion-help.conf motion.spec
@rm -rf autom4te.cache config.h
@echo "You will need to re-run configure if you want to build Motion."
Expand Down
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -5283,7 +5283,7 @@ fi



ac_config_files="$ac_config_files thread1.conf thread2.conf thread3.conf thread4.conf motion-dist.conf motion.init-FreeBSD.sh motion.init-Debian motion.init-RH motion.spec Makefile"
ac_config_files="$ac_config_files thread1.conf thread2.conf thread3.conf thread4.conf motion-dist.conf motion.init-FreeBSD.sh motion.init-Debian motion.init-Fedora motion.spec Makefile"

cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
Expand Down Expand Up @@ -5971,7 +5971,7 @@ do
"motion-dist.conf") CONFIG_FILES="$CONFIG_FILES motion-dist.conf" ;;
"motion.init-FreeBSD.sh") CONFIG_FILES="$CONFIG_FILES motion.init-FreeBSD.sh" ;;
"motion.init-Debian") CONFIG_FILES="$CONFIG_FILES motion.init-Debian" ;;
"motion.init-RH") CONFIG_FILES="$CONFIG_FILES motion.init-RH" ;;
"motion.init-Fedora") CONFIG_FILES="$CONFIG_FILES motion.init-Fedora" ;;
"motion.spec") CONFIG_FILES="$CONFIG_FILES motion.spec" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
Expand Down
2 changes: 1 addition & 1 deletion configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ thread4.conf
motion-dist.conf
motion.init-FreeBSD.sh
motion.init-Debian
motion.init-RH
motion.init-Fedora
motion.spec
Makefile
])
Expand Down
File renamed without changes.
25 changes: 21 additions & 4 deletions motion.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Source0: http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.ta
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires: libjpeg-devel ffmpeg-devel zlib-devel
#This requires comes from the startup script, it will be there until motion supports libv4l calls in the code
Requires: libv4l
Requires(post): chkconfig
Requires(preun): chkconfig initscripts
Expand All @@ -27,7 +28,7 @@ without MySQL and PostgreSQL support.
%setup -q

%build
%configure --sysconfdir=%{_sysconfdir}/%{name} --without-optimizecpu --with-ffmpeg --without-mysql --without-pgsql
%configure --sysconfdir=%{_sysconfdir}/%{name} --without-optimizecpu --with-ffmpeg --without-mysql --without-pgsql
make %{?_smp_mflags}

%install
Expand All @@ -43,11 +44,11 @@ sed -i 's|sql_log_snapshot|; sql_log_snapshot|g' %{buildroot}%{_sysconfdir}/%{na
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
#We set the log file and target directory - logging is for 3.3 branch
sed -i 's|;logfile|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
#We install our startup script
install -D -m 0755 motion.init-RH %{buildroot}%{_initrddir}/%{name}
install -D -m 0755 motion.init-Fedora %{buildroot}%{_initrddir}/%{name}

%post
#We add the motion init script to the services when installing
Expand Down Expand Up @@ -79,7 +80,7 @@ rm -rf %{buildroot}
%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(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
Expand All @@ -90,6 +91,22 @@ rm -rf %{buildroot}
%attr(0755,root,root) %{_initrddir}/%{name}

%changelog
* Thu Mar 06 2010 Steven Moix <[email protected]> - 3.2.12-1
- New upstream release, important bugfixes only

* Wed Oct 21 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 3.2.11.1-3
- rebuild for new ffmpeg

* Tue Aug 11 2009 Steven Moix <[email protected]> - 3.2.11.1-1
- Drop patch for ffmpeg 0.5 compatibility
- Drop ffmpeg detection patch
- Moved default output directory to /var/motion
- New startup script with added v4l2convert to support more cameras - https://bugzilla.rpmfusion.org/show_bug.cgi?id=681
- Fix Segfault on reload or quit for vloopback (maybe other v4l1 devices too)
- Fix fd leaks in external pipe
- Avoid possible stack smashing in v4l_open_vidpipe()
- Fix segfault for new libjpeg v7

* Mon Jul 06 2009 Steven Moix <[email protected]> - 3.3.0-1
- SPEC Preparation for the 3.3 branch

Expand Down

0 comments on commit 00ba7c3

Please sign in to comment.