[packages/motion] - update to 4.0.1 - v4l and sqlite support can be disabled
bszx
bszx at pld-linux.org
Sat Mar 18 13:55:10 CET 2017
commit 7c842b200092a7e4064729663a580599b3b69328
Author: Bartek Szady <bszx at bszx.eu>
Date: Sat Mar 18 13:53:40 2017 +0100
- update to 4.0.1
- v4l and sqlite support can be disabled
motion-config.patch | 12 -------
motion-ffmpeg.patch | 95 -----------------------------------------------------
motion.spec | 41 +++++++++++++----------
motion.tmpfiles | 1 +
4 files changed, 24 insertions(+), 125 deletions(-)
---
diff --git a/motion.spec b/motion.spec
index eb768b3..bf04432 100644
--- a/motion.spec
+++ b/motion.spec
@@ -2,28 +2,30 @@
# Conditional builds:
%bcond_without pgsql # build PostgreSQL support
%bcond_without mysql # build MySQL support
+%bcond_without sqlite # build SQLite support
%bcond_without xmlrpc # build XMLRPC support
+%bcond_without v4l # build v4l support
#
Summary: Motion is a software motion detector
Summary(pl.UTF-8): Motion - programowy wykrywacz ruchu
Name: motion
-Version: 3.2.12
-Release: 4
+Version: 4.0.1
+Release: 1
License: GPL
Group: Applications/Graphics
-Source0: http://downloads.sourceforge.net/motion/%{name}-%{version}.tar.gz
-# Source0-md5: 1ba0065ed50509aaffb171594c689f46
+Source0: https://github.com/Motion-Project/motion/archive/release-%{version}.tar.gz
+# Source0-md5: 5c87f90c4118d8cf0fb14700db69118f
Source1: %{name}.init
Source2: %{name}.sysconfig
-Patch0: %{name}-config.patch
-Patch1: %{name}-ffmpeg.patch
-URL: http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome
+Source3: %{name}.tmpfiles
+URL: https://motion-project.github.io/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: ffmpeg-devel >= 0.7.1
BuildRequires: libjpeg-devel
%{?with_mysql:BuildRequires: mysql-devel}
%{?with_pgsql:BuildRequires: postgresql-devel}
+%{?with_sqlite:BuildRequires: sqlite3-devel}
BuildRequires: rpmbuild(macros) >= 1.268
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -62,18 +64,16 @@ Init script for Motion.
Skrypt init dla systemu Motion.
%prep
-%setup -q
-%patch0 -p1
-%patch1 -p1
-%{__sed} -i -e 's/jpeg_mem_dest/my_jpeg_mem_dest/g' picture.c
+%setup -q -n motion-release-%{version}
%build
-%{__aclocal}
-%{__autoconf}
+autoreconf -fvi
%configure \
--without-optimizecpu \
- %{?with_mysql:--with-mysql} \
- %{?with_pgsql:--with-pgsql}
+ %{?!with_mysql:--without-mysql} \
+ %{?!with_pgsql:--without-pgsql} \
+ %{?!with_sqlite:--without-pgsql} \
+ %{?!with_v4l:--without-v4l}
%{__make}
@@ -83,17 +83,21 @@ install -d $RPM_BUILD_ROOT%{_datadir}/%{name} \
$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} \
$RPM_BUILD_ROOT%{_sysconfdir}/%{name} \
$RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
- $RPM_BUILD_ROOT/var/run/%{name}
+ $RPM_BUILD_ROOT/var/run/%{name} \
+ $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
mv $RPM_BUILD_ROOT%{_datadir}/doc doc
-mv $RPM_BUILD_ROOT%{_sysconfdir}/motion-dist.conf \
+mv $RPM_BUILD_ROOT%{_sysconfdir}/motion/motion-dist.conf \
$RPM_BUILD_ROOT%{_sysconfdir}/motion/motion.conf
+rm -f $RPM_BUILD_ROOT%{_sysconfdir}/motion/camera*
+
install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+install %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
%clean
rm -rf $RPM_BUILD_ROOT
@@ -128,10 +132,11 @@ fi
%files
%defattr(644,root,root,755)
-%doc CHANGELOG CREDITS FAQ README README.axis_2100 motion_guide.html *.conf motion.init-RH
+%doc CHANGELOG CREDITS FAQ README.md motion_guide.html *.conf
%attr(755,root,root) %{_bindir}/motion
%dir %{_sysconfdir}/%{name}
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/motion/motion.conf
+/usr/lib/tmpfiles.d/%{name}.conf
%{_datadir}/motion
%{_mandir}/man1/*
%attr(750,motion,motion) %dir /var/run/%{name}
diff --git a/motion-config.patch b/motion-config.patch
deleted file mode 100644
index efc0cfd..0000000
--- a/motion-config.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -burNp motion-3.2.11/Makefile.in motion-3.2.11-new/Makefile.in
---- motion-3.2.11/Makefile.in 2008-09-22 01:20:58.000000000 +0200
-+++ motion-3.2.11-new/Makefile.in 2008-10-05 20:56:06.874207953 +0200
-@@ -30,7 +30,7 @@ examplesdir = $(datadir)/@PACKAGE_NAME at -
- # These variables contain compiler flags, object files to build and files to #
- # install. #
- ################################################################################
--CFLAGS = @CFLAGS@ -Wall -DVERSION=\"@PACKAGE_VERSION@\" -Dsysconfdir=\"$(sysconfdir)\"
-+CFLAGS = @CFLAGS@ -Wall -DVERSION=\"@PACKAGE_VERSION@\" -Dsysconfdir=\"$(sysconfdir)/motion\"
- LDFLAGS = @LDFLAGS@
- LIBS = @LIBS@
- VIDEO_OBJ = @VIDEO@
diff --git a/motion-ffmpeg.patch b/motion-ffmpeg.patch
deleted file mode 100644
index 7a62e81..0000000
--- a/motion-ffmpeg.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- motion-3.2.12/ffmpeg.c.bak 2011-07-11 15:44:35.159836231 +0200
-+++ motion-3.2.12/ffmpeg.c 2011-07-11 15:45:33.103336223 +0200
-@@ -229,7 +229,7 @@
-
- /* Register the append file protocol. */
- #if LIBAVFORMAT_BUILD >= (52<<16 | 31<<8)
-- av_register_protocol(&mpeg1_file_protocol);
-+ av_register_protocol2(&mpeg1_file_protocol, sizeof(mpeg1_file_protocol));
- #else
- register_protocol(&mpeg1_file_protocol);
- #endif
-@@ -244,7 +244,7 @@
- const char *ext;
- AVOutputFormat *of = NULL;
-
-- /* Here, we use guess_format to automatically setup the codec information.
-+ /* Here, we use av_guess_format to automatically setup the codec information.
- * If we are using msmpeg4, manually set that codec here.
- * We also dynamically add the file extension to the filename here. This was
- * done to support both mpeg1 and mpeg4 codecs since they have different extensions.
-@@ -258,7 +258,7 @@
- /* We use "mpeg1video" for raw mpeg1 format. Using "mpeg" would
- * result in a muxed output file, which isn't appropriate here.
- */
-- of = guess_format("mpeg1video", NULL, NULL);
-+ of = av_guess_format("mpeg1video", NULL, NULL);
- if (of) {
- /* But we want the trailer to be correctly written. */
- of->write_trailer = mpeg1_write_trailer;
-@@ -270,24 +270,24 @@
- #endif
- } else if (strcmp(codec, "mpeg4") == 0) {
- ext = ".avi";
-- of = guess_format("avi", NULL, NULL);
-+ of = av_guess_format("avi", NULL, NULL);
- } else if (strcmp(codec, "msmpeg4") == 0) {
- ext = ".avi";
-- of = guess_format("avi", NULL, NULL);
-+ of = av_guess_format("avi", NULL, NULL);
- if (of) {
- /* Manually override the codec id. */
- of->video_codec = CODEC_ID_MSMPEG4V2;
- }
- } else if (strcmp(codec, "swf") == 0) {
- ext = ".swf";
-- of = guess_format("swf", NULL, NULL);
-+ of = av_guess_format("swf", NULL, NULL);
- } else if (strcmp(codec, "flv") == 0) {
- ext = ".flv";
-- of = guess_format("flv", NULL, NULL);
-+ of = av_guess_format("flv", NULL, NULL);
- of->video_codec = CODEC_ID_FLV1;
- } else if (strcmp(codec, "ffv1") == 0) {
- ext = ".avi";
-- of = guess_format("avi", NULL, NULL);
-+ of = av_guess_format("avi", NULL, NULL);
- if (of) {
- /* Use the FFMPEG Lossless Video codec (experimental!).
- Requires strict_std_compliance to be <= -2 */
-@@ -295,7 +295,7 @@
- }
- } else if (strcmp(codec, "mov") == 0) {
- ext = ".mov";
-- of = guess_format("mov", NULL, NULL);
-+ of = av_guess_format("mov", NULL, NULL);
- } else {
- motion_log(LOG_ERR, 0, "ffmpeg_video_codec option value %s is not supported", codec);
- return NULL;
-@@ -377,7 +377,7 @@
-
- ffmpeg->c = c = AVSTREAM_CODEC_PTR(ffmpeg->video_st);
- c->codec_id = ffmpeg->oc->oformat->video_codec;
-- c->codec_type = CODEC_TYPE_VIDEO;
-+ c->codec_type = AVMEDIA_TYPE_VIDEO;
- is_mpeg1 = c->codec_id == CODEC_ID_MPEG1VIDEO;
-
- if (strcmp(ffmpeg_video_codec, "ffv1") == 0)
-@@ -646,7 +646,7 @@
- if (ffmpeg->oc->oformat->flags & AVFMT_RAWPICTURE) {
- /* raw video case. The API will change slightly in the near future for that */
- #ifdef FFMPEG_AVWRITEFRAME_NEWAPI
-- pkt.flags |= PKT_FLAG_KEY;
-+ pkt.flags |= AV_PKT_FLAG_KEY;
- pkt.data = (uint8_t *)pic;
- pkt.size = sizeof(AVPicture);
- ret = av_write_frame(ffmpeg->oc, &pkt);
-@@ -667,7 +667,7 @@
- #ifdef FFMPEG_AVWRITEFRAME_NEWAPI
- pkt.pts = AVSTREAM_CODEC_PTR(ffmpeg->video_st)->coded_frame->pts;
- if (AVSTREAM_CODEC_PTR(ffmpeg->video_st)->coded_frame->key_frame) {
-- pkt.flags |= PKT_FLAG_KEY;
-+ pkt.flags |= AV_PKT_FLAG_KEY;
- }
- pkt.data = ffmpeg->video_outbuf;
- pkt.size = out_size;
diff --git a/motion.tmpfiles b/motion.tmpfiles
new file mode 100644
index 0000000..3baa604
--- /dev/null
+++ b/motion.tmpfiles
@@ -0,0 +1 @@
+d /var/run/motion 0755 root root -
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/motion.git/commitdiff/7c842b200092a7e4064729663a580599b3b69328
More information about the pld-cvs-commit
mailing list