commit 6f18974c08a6acd230c72c7a5a96cc491bfd3533
Author: sagitter <sagitter(a)fedoraproject.org>
Date: Fri Apr 21 22:32:38 2017 +0200
Update to 1.0.2
.gitignore | 1 +
sources | 2 +-
xpra-codecs-freeworld-xvid.patch | 20 ++++++++
xpra-codecs-freeworld.spec | 106 ++++++++++++++++++++++++++++++---------
4 files changed, 105 insertions(+), 24 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index fc62ef4..168345a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ xpra-0.15.10.tar.xz
xpra-0.16.3.tar.xz
/xpra-0.17.4.tar.xz
/xpra-0.17.5.tar.xz
+/xpra-1.0.2.tar.xz
diff --git a/sources b/sources
index e38f504..2e46376 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-9ec20dae64cee8dbc70e6d5dbae0ab4a xpra-0.17.5.tar.xz
+b9c8fe1c7d9f665adf029fec8c16cb28 xpra-1.0.2.tar.xz
diff --git a/xpra-codecs-freeworld-xvid.patch b/xpra-codecs-freeworld-xvid.patch
new file mode 100644
index 0000000..14dc998
--- /dev/null
+++ b/xpra-codecs-freeworld-xvid.patch
@@ -0,0 +1,20 @@
+--- setup.orig.py 2017-02-01 06:52:14.000000000 +0100
++++ setup.py 2017-04-21 21:36:02.901697592 +0200
+@@ -184,7 +184,7 @@
+ enc_proxy_ENABLED = DEFAULT
+ enc_x264_ENABLED = DEFAULT and pkg_config_ok("--exists",
"x264", fallback=WIN32)
+ enc_x265_ENABLED = DEFAULT and pkg_config_ok("--exists",
"x265")
+-enc_xvid_ENABLED = DEFAULT and pkg_config_ok("--exists",
"xvid")
++enc_xvid_ENABLED = DEFAULT and os.path.exists("/usr/include/xvid.h")
+ pillow_ENABLED = DEFAULT
+ webp_ENABLED = False
+ vpx_ENABLED = DEFAULT and pkg_config_version("1.3",
"vpx", fallback=WIN32)
+@@ -2353,7 +2353,7 @@
+
+ toggle_packages(enc_xvid_ENABLED, "xpra.codecs.enc_xvid")
+ if enc_xvid_ENABLED:
+- xvid_pkgconfig = pkgconfig("xvid")
++ xvid_pkgconfig = pkgconfig()
+ cython_add(Extension("xpra.codecs.enc_xvid.encoder",
+ ["xpra/codecs/enc_xvid/encoder.pyx", buffers_c],
+ **xvid_pkgconfig))
diff --git a/xpra-codecs-freeworld.spec b/xpra-codecs-freeworld.spec
index b22e8ab..6e74590 100644
--- a/xpra-codecs-freeworld.spec
+++ b/xpra-codecs-freeworld.spec
@@ -1,23 +1,59 @@
+%bcond_without enc_x264
+%bcond_without dec_avcodec2
+%bcond_without csc_swscale
+%bcond_without webp
+
+# These are nececessary as the _with_foo is *not* defined if the
+# --with flag isn't specifed, and we need to have the --without
+# specified option in that case.
+%if %{without enc_x264}
+%define _with_enc_x264 --without-enc_x264
+%endif
+
+%if %{without dec_avcodec2}
+%define _with_dec_avcodec2 --without-dec_avcodec2
+%endif
+
+%if %{without csc_swscale}
+%define _with_csc_swscale --without-csc_swscale
+%endif
+
+%if %{with webp}
+%define _with_webp --with-webp
+%endif
+
Name: xpra-codecs-freeworld
-Version: 0.17.5
-Release: 2%{?dist}
+Version: 1.0.2
+Release: 1%{?dist}
Summary: Additional codecs for xpra using x264 and ffmpeg
License: GPLv2+
URL:
http://www.xpra.org/
Source0:
http://xpra.org/src/xpra-%{version}.tar.xz
+## Set directory path of xvid's header file
+Patch0: %{name}-xvid.patch
+
BuildRequires: python2-devel pygobject2-devel pygtk2-devel
BuildRequires: libXtst-devel
-BuildRequires: libxkbfile-devel
+BuildRequires: libxkbfile-devel, libvpx-devel
+BuildRequires: xvidcore-devel, x265-devel
BuildRequires: Cython
-BuildRequires: desktop-file-utils
BuildRequires: libwebp-devel
+
+%if %{with webp}
+BuildRequires: libwebp-devel
+%endif
+
+%if %{with enc_x264}
BuildRequires: x264-devel
+%endif
+%if %{with dec_avcodec2} || %{without csc_swscale}
BuildRequires: ffmpeg-devel
+%endif
-Requires: xpra = %{version}
-Requires: gstreamer1-plugins-ugly
+Requires: xpra%{?isa} = %{version}
+Requires: gstreamer1-plugins-ugly%{?isa}
%description
Provides support for H.264 encoding and swscale support in xpra using
@@ -25,39 +61,63 @@ x264 and ffmpeg.
%prep
%setup -q -n xpra-%{version}
-
+%patch0 -p0
%build
-CFLAGS="%{optflags}" %{__python} setup.py build \
- --with-enc_x264 \
- --with-dec_avcodec2 \
- --with-csc_swscale \
- --with-Xdummy \
- --with-Xdummy_wrapper
+CFLAGS="%{optflags}" %{__python2} setup.py build
--executable="%{__python2} -s" \
+ --with-enc_xvid \
+ %{?_with_webp} \
+ %{?_with_enc_x264} \
+ %{?_with_dec_avcodec2} \
+ %{?_with_csc_swscale} \
+ --with-Xdummy \
+ --with-Xdummy_wrapper \
+ --without-html5 \
+ --without-tests \
+ --with-verbose
%install
-mkdir destdir
-%{__python} setup.py install --skip-build --root destdir
-
-mkdir -p %{buildroot}%{python_sitearch}/xpra/codecs/
-pushd destdir%{python_sitearch}/xpra/codecs/
-cp -pr csc_swscale dec_avcodec2 enc_x264 libav_common \
- %{buildroot}%{python_sitearch}/xpra/codecs/
+%{__python2} setup.py install -O1 --skip-build --root destdir
+
+## We are interested to additional codecs only
+mkdir -p %{buildroot}%{python2_sitearch}/xpra/codecs/
+pushd destdir%{python2_sitearch}/xpra/codecs/
+cp -pr \
+%if %{with csc_swscale}
+ csc_swscale \
+%endif
+%if %{with dec_avcodec2}
+ dec_avcodec2 \
+%endif
+%if %{with enc_x264}
+ enc_x264 \
+%endif
+%if %{with webp}
+ webp \
+%endif
+ libav_common enc_ffmpeg enc_xvid enc_x265 %{buildroot}%{python2_sitearch}/xpra/codecs/
popd
#drop shebangs from python_sitearch
-find %{buildroot}%{python_sitearch}/xpra -name '*.py' \
+find %{buildroot}%{python2_sitearch}/xpra -name '*.py' \
-exec sed -i '1{\@^#!/usr/bin/env python@d}' {} \;
#fix permissions on shared objects
-find %{buildroot}%{python_sitearch}/xpra -name '*.so' \
+find %{buildroot}%{python2_sitearch}/xpra -name '*.so' \
-exec chmod 0755 {} \;
%files
-%{python_sitearch}/xpra/codecs/*
+%dir %{python2_sitearch}/xpra
+%dir %{python2_sitearch}/xpra/codecs
+%{python2_sitearch}/xpra/codecs/*
+%doc README NEWS
%license COPYING
%changelog
+* Thu Apr 20 2017 Antonio Trande <sagitter(a)fedoraproject.org.com> - 1.0.2-1
+- Update to 1.0.2
+- Include x265 and xvid encoders
+
* Tue Mar 21 2017 RPM Fusion Release Engineering <kwizart(a)rpmfusion.org> -
0.17.5-2
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild