commit 1c76b5b20152eef364fdc5cf1981ede9d042cd8e
Merge: 1d9e9a4 7fe8837
Author: sagitter <sagitter(a)fedoraproject.org>
Date: Sat Dec 8 00:14:47 2018 +0100
Rebuild for ffmpeg-3.4.5 on el7
.gitignore | 3 +
ffmpeg35_buildfix.patch | 21 +++
...mit-asm-emms-only-on-x86-and-amd64-arches.patch | 28 ---
...is-no-bin-service-in-Fedora-use-systemctl.patch | 24 ---
motion.service | 2 +-
motion.spec | 189 +++++++++++++++------
sources | 2 +-
7 files changed, 159 insertions(+), 110 deletions(-)
---
diff --cc motion.spec
index 7f1c92c,a2c41be..d7701e1
--- a/motion.spec
+++ b/motion.spec
@@@ -32,42 -63,37 +63,39 @@@ with a rather small footprint. This ver
without MySQL and PostgreSQL support.
%prep
- %setup -q
- %patch0 -p1
- %patch1 -p1
+ %autosetup -p1 -n %{name}-release-%{nextver}
+ autoreconf -v
%build
- export PKG_CONFIG_LIBDIR="%{_libdir}/ffmpeg-compat/pkgconfig"
- %configure --sysconfdir=%{_sysconfdir}/%{name} --without-optimizecpu --with-ffmpeg
--without-mysql --without-pgsql
- make %{?_smp_mflags}
+ %configure \
+ --without-optimizecpu --with-ffmpeg --without-mysql --without-pgsql
+
+ %make_build V=1
%install
- rm -rf %{buildroot}
- make install DESTDIR=%{buildroot}
- #We rename the configuration file
+ %make_install
+
+ #We rename the configuration files
mv %{buildroot}%{_sysconfdir}/%{name}/motion-dist.conf
%{buildroot}%{_sysconfdir}/%{name}/motion.conf
- #We move the logrotate configuration
- mkdir %{buildroot}%{_sysconfdir}/logrotate.d
- mv %{_builddir}/%{name}-%{version}/motion.logrotate
%{buildroot}%{_sysconfdir}/logrotate.d/motion
- #We run as motion:video user, reflect that in logrotate config
- sed -i 's|create 0600 root root|create 0600 motion video|g'
%{buildroot}%{_sysconfdir}/logrotate.d/motion
+ mv %{buildroot}%{_sysconfdir}/%{name}/camera1-dist.conf
%{buildroot}%{_sysconfdir}/%{name}/camera1.conf
+ mv %{buildroot}%{_sysconfdir}/%{name}/camera2-dist.conf
%{buildroot}%{_sysconfdir}/%{name}/camera2.conf
+ mv %{buildroot}%{_sysconfdir}/%{name}/camera3-dist.conf
%{buildroot}%{_sysconfdir}/%{name}/camera3.conf
+ mv %{buildroot}%{_sysconfdir}/%{name}/camera4-dist.conf
%{buildroot}%{_sysconfdir}/%{name}/camera4.conf
+ #Delete doc directory
+ rm -rf %{buildroot}%{_datadir}/doc
+ #Remove init files
+ rm %{buildroot}%{_datadir}/%{name}/examples/motion.init-*
#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
+ sed -i 's|target_dir /tmp/motion|target_dir /var/motion|g'
%{buildroot}%{_sysconfdir}/%{name}/motion.conf
#We install our startup script
- install -D -m 0755 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
+ install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
#We install tmpfiles configuration
install -D -m 0755 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{name}.conf
+#We remove versioned docs
+rm -rf %{buildroot}%{_docdir}/%{name}-%{version}
%pre
getent passwd motion >/dev/null || \