]> git.pld-linux.org Git - packages/freerdp2.git/commitdiff
- added opt patch (disable unwanted compiler flags)
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 3 Jul 2016 11:48:27 +0000 (13:48 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 3 Jul 2016 11:48:27 +0000 (13:48 +0200)
- added gsm patch (adjust libgsm includes)
- updated dependencies, more bconds
- split clients (-wayland, -x11 subpackages)

freerdp-gsm.patch [new file with mode: 0644]
freerdp-opt.patch [new file with mode: 0644]
freerdp2.spec

diff --git a/freerdp-gsm.patch b/freerdp-gsm.patch
new file mode 100644 (file)
index 0000000..6718455
--- /dev/null
@@ -0,0 +1,20 @@
+--- FreeRDP-a132545545ef90534a64a08f5199741502de97e5/cmake/FindGSM.cmake.orig  2016-06-30 22:43:05.000000000 +0200
++++ FreeRDP-a132545545ef90534a64a08f5199741502de97e5/cmake/FindGSM.cmake       2016-07-02 20:05:44.567199213 +0200
+@@ -1,5 +1,5 @@
+-find_path(GSM_INCLUDE_DIR gsm/gsm.h)
++find_path(GSM_INCLUDE_DIR gsm.h)
+ find_library(GSM_LIBRARY gsm)
+--- FreeRDP-a132545545ef90534a64a08f5199741502de97e5/channels/rdpsnd/client/pulse/rdpsnd_pulse.c.orig  2016-06-30 22:43:05.000000000 +0200
++++ FreeRDP-a132545545ef90534a64a08f5199741502de97e5/channels/rdpsnd/client/pulse/rdpsnd_pulse.c       2016-07-02 20:10:48.938883624 +0200
+@@ -34,7 +34,7 @@
+ #include <pulse/pulseaudio.h>
+ #ifdef WITH_GSM
+-#include <gsm/gsm.h>
++#include <gsm.h>
+ #endif
+ #include <freerdp/types.h>
diff --git a/freerdp-opt.patch b/freerdp-opt.patch
new file mode 100644 (file)
index 0000000..b2abe37
--- /dev/null
@@ -0,0 +1,24 @@
+--- FreeRDP-a132545545ef90534a64a08f5199741502de97e5/CMakeLists.txt.orig       2016-06-30 22:43:05.000000000 +0200
++++ FreeRDP-a132545545ef90534a64a08f5199741502de97e5/CMakeLists.txt    2016-07-02 17:12:00.937002199 +0200
+@@ -174,21 +174,6 @@
+ # Compiler-specific flags
+ if(CMAKE_COMPILER_IS_GNUCC)
+-      if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR CMAKE_SYSTEM_PROCESSOR MATCHES "i686")
+-              CHECK_SYMBOL_EXISTS(__x86_64__ "" IS_X86_64)
+-              if(IS_X86_64)
+-                      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+-              else()
+-                      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=i686")
+-              endif()
+-      else()
+-              if(CMAKE_POSITION_INDEPENDENT_CODE)
+-                      if(${CMAKE_VERSION} VERSION_LESS 2.8.9)
+-                              set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
+-                      endif()
+-              endif()
+-      endif()
+-
+       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
+       CHECK_C_COMPILER_FLAG (-Wno-unused-result Wno-unused-result)
index a6722df59aeec37e54c5cf25b200028ef74f97dd..dbab7e8444e4bc33705c88bc7b85577ef6aff65e 100644 (file)
@@ -1,15 +1,21 @@
 # TODO:
-# - fix DirectFB client build
+# - what is libpcsc-winpr? (-DWITH_PCSC_WINPR)
+# - fix DirectFB client build (orphaned code)
 #
 # Conditional build:
 %bcond_without alsa            # ALSA sound support
 %bcond_without cups            # CUPS printing support
 %bcond_with    directfb        # DirectFB client
 %bcond_without ffmpeg          # FFmpeg audio/video decoding support
+%bcond_without gsm             # GSM audio codec
+%bcond_without gstreamer       # GStreamer sound support
+%bcond_with    openh264        # OpenH264 for H.264 codec [only if ffmpeg disabled]
 %bcond_without pcsc            # SmartCard support via PCSC-lite library
 %bcond_without pulseaudio      # Pulseaudio sound support
+%bcond_without systemd         # systemd journal support
 %bcond_without wayland         # Wayland client
 %bcond_without x11             # X11 client
+%bcond_with    x264            # X264 for H.264 codec [only if ffmpeg and openh264 disabled]
 %bcond_with    sse2            # SSE2 instructions
 
 %ifarch %{x8664} pentium4
@@ -28,20 +34,30 @@ Group:              Applications/Communications
 Source0:       https://github.com/FreeRDP/FreeRDP/archive/%{gitref}/freerdp-%{version}-%{snap}.tar.gz
 # Source0-md5: 1df5c4d0375cd90fc996d4568ef1ce76
 Patch0:                freerdp-DirectFB-include.patch
+Patch1:                freerdp-opt.patch
+Patch2:                freerdp-gsm.patch
 URL:           http://www.freerdp.com/
 %{?with_directfb:BuildRequires:        DirectFB-devel}
 %{?with_alsa:BuildRequires:    alsa-lib-devel}
-BuildRequires: cmake >= 2.6
+BuildRequires: cmake >= 2.8
 %{?with_cups:BuildRequires:    cups-devel}
 BuildRequires: desktop-file-utils
-%{?with_ffmpeg:BuildRequires:  ffmpeg-devel}
+# libavcodec >= 53.25.0, libavutil
+%{?with_ffmpeg:BuildRequires:  ffmpeg-devel >= 0.8}
+%{?with_gstreamer:BuildRequires:       gstreamer-devel >= 1.0.5}
+%{?with_gstreamer:BuildRequires:       gstreamer-plugins-base-devel >= 1.0.5}
+%{?with_gsm:BuildRequires:     libgsm-devel}
+BuildRequires: libjpeg-devel
+%{?with_x264:BuildRequires:    libx264-devel}
+%{?with_openh264:BuildRequires:        openh264-devel}
 BuildRequires: openssl-devel
 %{?with_pcsc:BuildRequires:    pcsc-lite-devel}
 BuildRequires: pkgconfig
 %{?with_pulseaudio:BuildRequires:      pulseaudio-devel}
+%{?with_systemd:BuildRequires: systemd-devel >= 1:209}
 %{?with_wayland:BuildRequires: wayland-devel}
-%if %{with x11}
 BuildRequires: xmlto
+%if %{with x11}
 BuildRequires: xorg-lib-libX11-devel
 BuildRequires: xorg-lib-libXcursor-devel
 BuildRequires: xorg-lib-libXdamage-devel
@@ -55,13 +71,13 @@ BuildRequires:      xorg-lib-libxkbfile
 BuildRequires: zlib-devel
 Requires:      %{name}-libs = %{version}-%{release}
 Requires:      hicolor-icon-theme
-Provides:      xfreerdp = %{version}-%{release}
-Conflicts:     xfreerdp < 2.0.0
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+# Usage: -DWITH_<option>=%{cmake_on_off <bcond_name>}
+%define                cmake_on_off() %{expand:%%{?with_%{1}:ON}%%{!?with_%{1}:OFF}}
+
 %description
-xfreerdp is Remote Desktop Protocol (RDP) client from the FreeRDP
-project.
+FreeRDP is Remote Desktop Protocol (RDP) client.
 
 xfreerdp can connect to RDP servers such as Microsoft Windows
 machines, xrdp and VirtualBox.
@@ -77,7 +93,8 @@ Microsoft Windows, xrdp oraz VirtualBox.
 Summary:       DirectFB based Remote Desktop Protocol klient
 Summary(pl.UTF-8):     Klient protokołu RDP oparty na DirectFB
 Group:         Applications/Communications
-Requires:      %{name}-libs = %{version}-%{release}
+Requires:      %{name} = %{version}-%{release}
+Obsoletes:     freerdp-dfb < 2
 
 %description dfb
 DirectFB based Remote Desktop Protocol klient.
@@ -85,51 +102,80 @@ DirectFB based Remote Desktop Protocol klient.
 dfreerdp can connect to RDP servers such as Microsoft Windows
 machines, xrdp and VirtualBox.
 
-%description -l pl.UTF-8
+%description dfb -l pl.UTF-8
 Klient protokołu RDP oparty na DirectFB.
 
 dfreerdp może łączyć się z serwerami RDP, takimi jak maszyny z
 Microsoft Windows, xrdp oraz VirtualBox.
 
+%package wayland
+Summary:       Wayland based Remote Desktop Protocol klient
+Summary(pl.UTF-8):     Klient protokołu RDP oparty na Wayland
+Group:         Applications/Communications
+Requires:      %{name} = %{version}-%{release}
+
+%description wayland
+Wayland based Remote Desktop Protocol klient.
+
+wlfreerdp can connect to RDP servers such as Microsoft Windows
+machines, xrdp and VirtualBox.
+
+%description wayland -l pl.UTF-8
+Klient protokołu RDP oparty na Wayland.
+
+wlfreerdp może łączyć się z serwerami RDP, takimi jak maszyny z
+Microsoft Windows, xrdp oraz VirtualBox.
+
+%package x11
+Summary:       X11 based Remote Desktop Protocol klient
+Summary(pl.UTF-8):     Klient protokołu RDP oparty na X11
+Group:         Applications/Communications
+Requires:      %{name} = %{version}-%{release}
+Provides:      xfreerdp = %{version}-%{release}
+Obsoletes:     freerdp < 2
+
+%description x11
+X11 based Remote Desktop Protocol klient.
+
+xfreerdp can connect to RDP servers such as Microsoft Windows
+machines, xrdp and VirtualBox.
+
+%description x11 -l pl.UTF-8
+Klient protokołu RDP oparty na X11.
+
+xfreerdp może łączyć się z serwerami RDP, takimi jak maszyny z
+Microsoft Windows, xrdp oraz VirtualBox.
+
 %package libs
 Summary:       Core libraries implementing the RDP protocol
 Summary(pl.UTF-8):     Główne biblioteki implementujące protokół RDP
 Group:         Libraries
 
 %description libs
-libfreerdp-core can be embedded in applications.
-
-libfreerdp-channels and libfreerdp-kbd might be convenient to use in X
-applications together with libfreerdp-core.
-
-libfreerdp-core can be extended with plugins handling RDP channels.
+Core libraries implementing the RDP protocol.
 
 %description libs -l pl.UTF-8
-libfreerdp-core może być osadzane w aplikacjach.
-
-libfreerdp-channels oraz libfreerdp-kbd mogą być wygodne przy użyciu
-wraz z libfreerdp-core w aplikacjach X.
-
-libfreerdp-core można rozszerzać przy użyciu wtyczek obsługujących
-kanały RDP.
+Główne biblioteki implementujące protokół RDP.
 
 %package devel
-Summary:       Development files for FreeRDP libraries
-Summary(pl.UTF-8):     Pliki programistyczne bibliotek FreeRDP
+Summary:       Development files for FreeRDP libraries
+Summary(pl.UTF-8):     Pliki programistyczne bibliotek FreeRDP 2
 Group:         Development/Libraries
 Requires:      %{name}-libs = %{version}-%{release}
 
 %description devel
 This package contains the header files for developing applications
-that use FreeRDP libraries.
+that use FreeRDP libraries.
 
 %description devel -l pl.UTF-8
 Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
-wykorzystujących biblioteki FreeRDP.
+wykorzystujących biblioteki FreeRDP 2.
 
 %prep
 %setup -q -n FreeRDP-%{gitref}
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
 cat << EOF > xfreerdp.desktop
 [Desktop Entry]
@@ -149,17 +195,23 @@ install -d build
 cd build
 %cmake .. \
        -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \
-       %{?with_alsa:-DWITH_ALSA=ON}%{!?with_alsa:-DWITH_ALSA=OFF} \
+       -DWITH_ALSA=%{cmake_on_off alsa} \
        -DWITH_CUNIT=OFF \
-       %{?with_cups:-DWITH_CUPS=ON}%{!?with_cups:-DWITH_CUPS=OFF} \
-       %{?with_directfb:-DWITH_DIRECTFB=ON}%{!?with_directfb:-DWITH_DIRECTFB=OFF} \
-       %{?with_ffmpeg:-DWITH_FFMPEG=ON}%{!?with_ffmpeg:-DWITH_FFMPEG=OFF} \
-       %{?with_pcsc:-DWITH_PCSC=ON}%{!?with_pcsc:-DWITH_PCSC=OFF} \
-       %{?with_pulseaudio:-DWITH_PULSE=ON}%{!?with_pulseaudio:-DWITH_PULSE=OFF} \
+       -DWITH_CUPS=%{cmake_on_off cups} \
+       -DWITH_DIRECTFB=%{cmake_on_off directfb} \
+       -DWITH_FFMPEG=%{cmake_on_off ffmpeg} \
+       -DWITH_GSM=%{cmake_on_off gsm} \
+       -DWITH_GSTREAMER_1_0=%{cmake_on_off gstreamer} \
+       -DWITH_LIBSYSTEMD=%{cmake_on_off systemd} \
+       -DWITH_OPENH264=%{cmake_on_off openh264} \
+       -DWITH_OSS=ON \
+       -DWITH_PCSC=%{cmake_on_off pcsc} \
+       -DWITH_PULSE=%{cmake_on_off pulseaudio} \
        -DWITH_SERVER=ON \
-       %{?with_sse2:-DWITH_SSE2=ON}%{!?with_sse2:-DWITH_SSE2=OFF} \
-       %{?with_wayland:-DWITH_X11=ON}%{!?with_wayland:-DWITH_X11=OFF} \
-       %{?with_x11:-DWITH_X11=ON}%{!?with_x11:-DWITH_X11=OFF} \
+       -DWITH_SSE2=%{cmake_on_off sse2} \
+       -DWITH_WAYLAND=%{cmake_on_off wayland} \
+       -DWITH_X11=%{cmake_on_off x11} \
+       -DWITH_X264=%{cmake_on_off x264} \
        -DWITH_XCURSOR=ON \
        -DWITH_XEXT=ON \
        -DWITH_XINERAMA=ON \
@@ -170,14 +222,13 @@ cd build
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
 %{__make} -C build install \
        INSTALL="install -p" \
        DESTDIR=$RPM_BUILD_ROOT
 
-%{__rm} -r $RPM_BUILD_ROOT%{_libdir}/cmake
-
 desktop-file-install --dir=$RPM_BUILD_ROOT%{_desktopdir} xfreerdp.desktop
-install -p -D resources/FreeRDP_Icon_256px.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/256x256/apps/freerdp2.png
+install -p -D resources/FreeRDP_Icon_256px.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -194,24 +245,31 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/freerdp-shadow-cli
-%if %{with wayland}
-%attr(755,root,root) %{_bindir}/wlfreerdp
-%endif
-%if %{with x11}
-%attr(755,root,root) %{_bindir}/xfreerdp
-%endif
 %attr(755,root,root) %{_bindir}/winpr-hash
 %attr(755,root,root) %{_bindir}/winpr-makecert
-%{_mandir}/man1/xfreerdp.1*
-%{_desktopdir}/xfreerdp.desktop
 %{_iconsdir}/hicolor/256x256/apps/freerdp2.png
 
 %if %{with directfb}
 %files dfb
 %defattr(644,root,root,755)
+%doc doc/README.directfb
 %attr(755,root,root) %{_bindir}/dfreerdp
 %endif
 
+%if %{with wayland}
+%files wayland
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/wlfreerdp
+%endif
+
+%if %{with x11}
+%files x11
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/xfreerdp
+%{_desktopdir}/xfreerdp.desktop
+%{_mandir}/man1/xfreerdp.1*
+%endif
+
 %files libs
 %defattr(644,root,root,755)
 %doc ChangeLog README
@@ -252,3 +310,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_pkgconfigdir}/uwac0.pc
 %{_pkgconfigdir}/winpr-tools2.pc
 %{_pkgconfigdir}/winpr2.pc
+%{_libdir}/cmake/FreeRDP-Client2
+%{_libdir}/cmake/FreeRDP-Server2
+%{_libdir}/cmake/FreeRDP-Shadow2
+%{_libdir}/cmake/FreeRDP2
+%{_libdir}/cmake/WinPR2
+%{_libdir}/cmake/uwac0
This page took 0.133886 seconds and 4 git commands to generate.