commit 0a1dc5c082687a3ba6c0cfe328b0e12a33294251
Author: Vascom <vascom2(a)gmail.com>
Date: Mon Oct 3 13:53:21 2016 +0300
Added spec and patches.
.gitignore | 1 +
fix_ldpath.patch | 24 +++++++
simplescreenrecorder-0.3.6-fix-build.patch | 11 +++
simplescreenrecorder.spec | 106 +++++++++++++++++++++++++++++
sources | 1 +
5 files changed, 143 insertions(+)
---
diff --git a/.gitignore b/.gitignore
index e69de29..d80ffa5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/0.3.6.tar.gz
diff --git a/fix_ldpath.patch b/fix_ldpath.patch
new file mode 100644
index 0000000..f2b1757
--- /dev/null
+++ b/fix_ldpath.patch
@@ -0,0 +1,24 @@
+diff --git a/scripts/ssr-glinject b/scripts/ssr-glinject
+index 48be48d..8f8516f 100755
+--- a/scripts/ssr-glinject
++++ b/scripts/ssr-glinject
+@@ -61,4 +61,5 @@ done
+
+ echo "ssr-glinject: LD_PRELOAD = $LD_PRELOAD:libssr-glinject.so"
+ echo "ssr-glinject: command = $@"
+-LD_PRELOAD="$LD_PRELOAD:libssr-glinject.so" "$@"
++LD_LIBRARY_PATH="$LD_LIBRARY_PATH;/usr/lib/simplescreenrecorder;/usr/lib64/simplescreenrecorder"
LD_PRELOAD="libssr-glinject.so $LD_PRELOAD" "$@"
++
+diff --git a/src/AV/Input/GLInjectInput.cpp b/src/AV/Input/GLInjectInput.cpp
+index d6b53c8..8f4a12d 100644
+--- a/src/AV/Input/GLInjectInput.cpp
++++ b/src/AV/Input/GLInjectInput.cpp
+@@ -96,7 +96,7 @@ void GLInjectInput::SetCapturing(bool capturing) {
+ bool GLInjectInput::LaunchApplication(const QString& channel, bool
relax_permissions, const QString& command, const QString& working_directory) {
+
+ // prepare command
+- QString full_command = "LD_PRELOAD=\"libssr-glinject.so\" ";
++ QString full_command =
"LD_LIBRARY_PATH=\"$LD_LIBRARY_PATH;/usr/lib/simplescreenrecorder;/usr/lib64/simplescreenrecorder\"
LD_PRELOAD=\"libssr-glinject.so\" ";
+ full_command += "SSR_CHANNEL=\"" + ShellEscape(channel) + "\"
";
+ if(relax_permissions)
+ full_command += "SSR_STREAM_RELAX_PERMISSIONS=1 ";
diff --git a/simplescreenrecorder-0.3.6-fix-build.patch
b/simplescreenrecorder-0.3.6-fix-build.patch
new file mode 100644
index 0000000..9fc4225
--- /dev/null
+++ b/simplescreenrecorder-0.3.6-fix-build.patch
@@ -0,0 +1,11 @@
+diff -urN ssr-0.3.6.orig/src/Benchmark.cpp ssr-0.3.6/src/Benchmark.cpp
+--- ssr-0.3.6.orig/src/Benchmark.cpp 2016-06-15 13:21:52.155850790 +0300
++++ ssr-0.3.6/src/Benchmark.cpp 2016-06-15 13:22:32.013076775 +0300
+@@ -18,6 +18,7 @@
+ */
+
+ #include "Benchmark.h"
++#include <random>
+
+ #include "AVWrapper.h"
+ #include "CPUFeatures.h"
diff --git a/simplescreenrecorder.spec b/simplescreenrecorder.spec
new file mode 100644
index 0000000..dba4ccc
--- /dev/null
+++ b/simplescreenrecorder.spec
@@ -0,0 +1,106 @@
+%define shortname ssr
+Name: simplescreenrecorder
+Version: 0.3.6
+Release: 6%{?dist}
+Summary: SimpleScreenRecorder is a screen recorder for Linux
+
+License: GPLv3
+URL:
http://www.maartenbaert.be/simplescreenrecorder/
+Source0:
https://github.com/MaartenBaert/ssr/archive/%{version}.tar.gz
+Patch0: fix_ldpath.patch
+Patch1: simplescreenrecorder-0.3.6-fix-build.patch
+
+BuildRequires: desktop-file-utils
+BuildRequires: ffmpeg-devel
+BuildRequires: qt4-devel
+BuildRequires: alsa-lib-devel
+BuildRequires: pulseaudio-libs-devel
+BuildRequires: jack-audio-connection-kit-devel
+BuildRequires: libX11-devel
+BuildRequires: libXfixes-devel
+BuildRequires: mesa-libGL-devel
+BuildRequires: mesa-libGLU-devel
+
+Requires: hicolor-icon-theme
+Obsoletes: %{name}-libs
+
+%description
+SimpleScreenRecorder is a screen recorder for Linux.
+Despite the name, this program is actually quite complex.
+It's 'simple' in the sense that it's easier to use than ffmpeg/avconv or
VLC
+
+%prep
+%autosetup -p1 -n %{shortname}-%{version}
+
+
+%build
+export LDFLAGS="$LDFLAGS `pkg-config --libs-only-L libavformat libavcodec libavutil
libswscale`"
+export CPPFLAGS="$CPPFLAGS `pkg-config --cflags-only-I libavformat libavcodec
libavutil libswscale`"
+%configure
+%make_build
+
+
+%install
+%make_install
+
+rm -f %{buildroot}%{_libdir}/*.la
+mkdir -p %{buildroot}%{_libdir}/%{name}
+mv %{buildroot}%{_libdir}/lib%{shortname}-glinject.so
%{buildroot}%{_libdir}/%{name}/lib%{shortname}-glinject.so
+
+%check
+desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
+
+%post
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun
+if [ $1 -eq 0 ] ; then
+ /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+ /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+
+%posttrans
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
+%files
+%doc README.md AUTHORS.md CHANGELOG.md notes.txt todo.txt
+%license COPYING
+%{_bindir}/%{name}
+%{_datadir}/%{name}
+%{_datadir}/applications/%{name}.desktop
+%{_datadir}/icons/hicolor/*/apps/%{name}*
+%{_bindir}/%{shortname}-glinject
+%{_libdir}/%{name}
+%{_mandir}/man1/%{name}.1.*
+%{_mandir}/man1/%{shortname}-glinject.1.*
+
+%changelog
+* Wed Sep 21 2016 Vasiliy N. Glazov <vascom2(a)gmail.com> - 0.3.6-6
+- Add obsoletes
+
+* Tue Sep 20 2016 Vasiliy N. Glazov <vascom2(a)gmail.com> - 0.3.6-5
+- Remove libs subpackage
+
+* Fri Aug 26 2016 Vasiliy N. Glazov <vascom2(a)gmail.com> - 0.3.6-4
+- Clean spec
+
+* Tue Jun 14 2016 Arkady L. Shane <ashejn(a)russianfedora.pro> - 0.3.6-3.R
+- rebuilt against new ffmpeg
+
+* Sun Nov 8 2015 Ivan Epifanov <isage.dna(a)gmail.com> - 0.3.6-2.R
+- Update icon cache
+
+* Wed Nov 4 2015 Ivan Epifanov <isage.dna(a)gmail.com> - 0.3.6-1.R
+- Update to 0.3.6
+
+* Mon Mar 23 2015 Ivan Epifanov <isage.dna(a)gmail.com> - 0.3.3-1.R
+- Update to 0.3.3
+
+* Tue Dec 16 2014 Ivan Epifanov <isage.dna(a)gmail.com> - 0.3.1-1.R
+- Update to 0.3.1
+
+* Thu Jul 3 2014 Ivan Epifanov <isage.dna(a)gmail.com> - 0.3.0-2.R
+- Move gl-inject library to subdir
+
+* Thu Jul 3 2014 Ivan Epifanov <isage.dna(a)gmail.com> - 0.3.0-1.R
+- Initial spec for fedora
diff --git a/sources b/sources
index e69de29..47f886f 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+3c0dcf288c0cc1b21f4cd2010c73d5ae 0.3.6.tar.gz