commit cb03aef8d9d0118697c697295734f0a9b8d1be47
Author: sagitter <sagitter(a)fedoraproject.org>
Date: Fri Dec 7 15:28:55 2018 +0100
Rebuild for ffmpeg-3.4.5 on el7
libopenshot-fix_swig_variable.patch | 22 ++++++++++++++++++++++
libopenshot.spec | 36 +++++++++++++++++++++++-------------
2 files changed, 45 insertions(+), 13 deletions(-)
---
diff --git a/libopenshot-fix_swig_variable.patch b/libopenshot-fix_swig_variable.patch
new file mode 100644
index 0000000..db652f8
--- /dev/null
+++ b/libopenshot-fix_swig_variable.patch
@@ -0,0 +1,22 @@
+--- a/src/bindings/python/CMakeLists.orig.txt 2018-09-22 21:47:46.000000000 +0200
++++ b/src/bindings/python/CMakeLists.txt 2018-11-13 13:09:27.760834443 +0100
+@@ -43,7 +43,7 @@
+ SET(CMAKE_SWIG_FLAGS "")
+
+ ### Add the SWIG interface file (which defines all the SWIG methods)
+- SWIG_ADD_MODULE(openshot python openshot.i)
++ SWIG_ADD_LIBRARY (openshot LANGUAGE python SOURCES openshot.i TYPE MODULE)
+
+ ### Link the new python wrapper library with libopenshot
+ SWIG_LINK_LIBRARIES(openshot ${PYTHON_LIBRARIES} openshot)
+--- a/src/bindings/ruby/CMakeLists.orig.txt 2018-09-22 21:47:46.000000000 +0200
++++ a/src/bindings/ruby/CMakeLists.txt 2018-11-13 13:15:24.840214955 +0100
+@@ -41,7 +41,7 @@
+ SET(CMAKE_SWIG_FLAGS "")
+
+ ### Add the SWIG interface file (which defines all the SWIG methods)
+- SWIG_ADD_MODULE(rbopenshot ruby openshot.i)
++ SWIG_ADD_LIBRARY(rbopenshot LANGUAGE ruby SOURCES openshot.i TYPE MODULE)
+
+ ### Set name of target (with no prefix, since Ruby does not like that)
+ SET_TARGET_PROPERTIES(rbopenshot PROPERTIES PREFIX "" OUTPUT_NAME
"openshot")
diff --git a/libopenshot.spec b/libopenshot.spec
index 6724c40..bf26bd3 100644
--- a/libopenshot.spec
+++ b/libopenshot.spec
@@ -1,6 +1,6 @@
Name: libopenshot
Version: 0.2.2
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Library for creating and editing videos
License: LGPLv3+
@@ -9,12 +9,14 @@ Source0:
https://github.com/OpenShot/%{name}/archive/v%{version}/%{name}-
# The cmake environment for tests doesn't match the source build
# Filed upstream as
https://github.com/OpenShot/libopenshot/pull/163
-Patch0: libopenshot-fix-tests.patch
+Patch0: %{name}-fix-tests.patch
+
+#
+Patch1: %{name}-fix_swig_variable.patch
BuildRequires: gcc-c++
-BuildRequires: cmake
-BuildRequires: swig
-BuildRequires: python%{python3_pkgversion}-devel
+%{?el7:BuildRequires: epel-rpm-macros}
+BuildRequires: cmake3
BuildRequires: ImageMagick-c++-devel
BuildRequires: ffmpeg-devel
BuildRequires: libopenshot-audio-devel >= 0.1.6
@@ -24,7 +26,6 @@ BuildRequires: unittest-cpp-devel
BuildRequires: cppzmq-devel
BuildRequires: zeromq-devel
BuildRequires: jsoncpp-devel
-BuildRequires: ruby-devel
%description
@@ -45,8 +46,9 @@ developing applications that use %{name}.
%package -n python%{python3_pkgversion}-%{name}
Summary: Python bindings for %{name}
+BuildRequires: swig
+BuildRequires: python%{python3_pkgversion}-devel
Requires: %{name}%{?_isa} = %{version}-%{release}
-Group: Development/Libraries
Obsoletes: python-%{name} < 0.1.1-2
Provides: python-%{name}
@@ -57,8 +59,8 @@ applications that use %{name}.
%package -n ruby-%{name}
Summary: Ruby bindings for %{name}
+BuildRequires: ruby-devel
Requires: %{name}%{?_isa} = %{version}-%{release}
-Group: Development/Libraries
%description -n ruby-%{name}
The ruby-%{name} package contains ruby bindings for
@@ -68,10 +70,12 @@ applications that use %{name}.
%prep
%autosetup -p1
+sed -e 's|-g -ggdb|-g|g' -i src/CMakeLists.txt tests/CMakeLists.txt
+sed -e 's|-std=c++11|%{optflags} -std=c++11 %{__global_ldflags}
-Wl,--as-needed|g' -i CMakeLists.txt
%build
-export CXXFLAGS="%{optflags} -Wl,--as-needed -Wno-error"
-%cmake -DUSE_SYSTEM_JSONCPP:BOOL=ON .
+%cmake3 -Wno-dev -DCMAKE_BUILD_TYPE:STRING=Release \
+ -DCMAKE_SKIP_RPATH:BOOL=YES -DUSE_SYSTEM_JSONCPP:BOOL=ON .
%make_build
@@ -79,9 +83,7 @@ export CXXFLAGS="%{optflags} -Wl,--as-needed -Wno-error"
%make_install
-%post -p /sbin/ldconfig
-
-%postun -p /sbin/ldconfig
+%ldconfig_scriptlets
%files
@@ -101,6 +103,14 @@ export CXXFLAGS="%{optflags} -Wl,--as-needed -Wno-error"
%changelog
+* Tue Nov 13 2018 Antonio Trande <sagitter(a)fedoraproject.org> - 0.2.2-2
+- Rebuild for ffmpeg-3.4.5 on el7
+- Use ldconfig_scriptlets macros
+- Use default compiler flags
+- Use CMake3
+- Patched for using CMake3's Swig variable
+- Remove obsolete Group tags
+
* Mon Sep 24 2018 FeRD (Frank Dana) <ferdnyc AT gmail com> - 0.2.2-1
- New upstream release
- Unbundle jsoncpp