File freerdp.spec of Package freerdp.6948

# spec file for package freerdp
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%define sover 2

Name:           freerdp
Version:        2.0.0~git.1463131968.4e66df7
Release:        0
Summary:        Remote Desktop Viewer Client
License:        Apache-2.0
Group:          Productivity/Networking/Other
Source0:        %{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM freerdp-Fix-TALOS-issues.patch bsc#1050699 bsc#1050704 bsc#1050708 bsc#1050711 bsc#1050712 bsc#1050714 -- Fix a bunch of secury issues: CVE-2017-2834, CVE-2017-2835, CVE-2017-2836, CVE-2017-2837, CVE-2017-2838, CVE-2017-2839 
Patch0:         freerdp-Fix-TALOS-issues.patch
Patch1:         freerdp-KB408876.patch
# PATCH-FIX-UPSTREAM freerdp-CVE-2018-8789.patch boo#1117965 -- Fix CVE-2018-8789
Patch2:         freerdp-CVE-2018-8789.patch
# PATCH-FIX-UPSTREAM freerdp-CVE-2018-8785.patch boo#1117967 -- Fix CVE-2018-8785
Patch3:         freerdp-CVE-2018-8785.patch
# PATCH-FIX-UPSTREAM freerdp-CVE-2018-8786.patch boo#1117966 -- Fix CVE-2018-8786
Patch4:         freerdp-CVE-2018-8786.patch
# PATCH-FIX-UPSTREAM freerdp-CVE-2018-8787.patch boo#1117964 -- Fix CVE-2018-8787
Patch5:         freerdp-CVE-2018-8787.patch
# PATCH-FIX-UPSTREAM freerdp-CVE-2018-8788.patch boo#1117963 -- Fix CVE-2018-8788
Patch6:         freerdp-CVE-2018-8788.patch
# PATCH-FIX-UPSTREAM freerdp-CVE-2018-8784.patch boo#1116708 -- Fix CVE-2018-8784
Patch7:         freerdp-CVE-2018-8784.patch
# PATCH-FIX-UPSTREAM freerdp-CVE-2018-1000852.patch boo#1120507 -- Fix CVE-2018-1000852
Patch8:         freerdp-CVE-2018-1000852.patch
BuildRequires:  alsa-devel
BuildRequires:  cmake
BuildRequires:  cups-devel
BuildRequires:  ed
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  gstreamer-devel
BuildRequires:  gstreamer-plugins-base-devel
BuildRequires:  libopenssl-devel
BuildRequires:  libpulse-devel
BuildRequires:  libxkbcommon-devel
BuildRequires:  pcsc-lite-devel
BuildRequires:  systemd-devel
BuildRequires:  xmlto
BuildRequires:  xorg-x11-devel
BuildRequires:  zlib-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%define libname lib%{name}%{sover}

FreeRDP is a client-side implementation of the Remote Desktop Protocol (RDP)
following the Microsoft Open Specifications. This package provides the client

%package -n %{libname}
Summary:        Remote Desktop Viewer Library
Group:          System/Libraries
Obsoletes:      libfreerdp-1_0-plugins

%description -n %{libname}
FreeRDP is a client-side implementation of the Remote Desktop Protocol (RDP)
following the Microsoft Open Specifications. This package provides the shared

%package devel
Summary:        Development Files for %{name}
Group:          Development/Libraries/C and C++
Requires:       %{libname} = %{version}

%description devel
This package contains development files necessary for developing applications
based on libfreerdp.

%setup -q -n %{name}-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1

find . -type f -name "*.c" -exec perl -i -pe 's{__(DATE|TIME)__}{""}g' "{}" "+"
%cmake \
    -DCMAKE_INSTALL_PREFIX=%{_prefix} \
    -DCMAKE_BUILD_TYPE=Release \
%ifarch %ix86 x86_64
    -DWITH_SSE2=ON \
make %{?_smp_mflags} VERBOSE=1

cd build
make install 'DESTDIR=%{buildroot}'
find %{buildroot} -name "*.a" -delete
%fdupes -s %{buildroot}

%post   -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig


%files -n %{libname}

%files devel

openSUSE Build Service is sponsored by