SHA256
1
0
forked from pool/freerdp
freerdp/freerdp.spec

142 lines
3.9 KiB
RPMSpec
Raw Normal View History

#
# spec file for package freerdp
#
# Copyright (c) 2017 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 http://bugs.opensuse.org/
#
%define sover 2
Name: freerdp
Version: 2.0.0~git.1497095982.1dbd2d28d
Release: 0
Summary: Remote Desktop Viewer Client
License: Apache-2.0
Group: Productivity/Networking/Other
Url: http://www.freerdp.com/
Source0: %{name}-%{version}.tar.xz
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}
%description
FreeRDP is a client-side implementation of the Remote Desktop Protocol (RDP)
following the Microsoft Open Specifications. This package provides the client
application.
%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
library.
%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.
%prep
%setup -q -n %{name}-%{version}
%build
find . -type f -name "*.c" -exec perl -i -pe 's{__(DATE|TIME)__}{""}g' "{}" "+"
export LDFLAGS="-pie"
export CFLAGS="%optflags -fPIE -pie"
%cmake \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DCMAKE_INSTALL_LIBDIR=%{_lib} \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_ALSA=ON \
-DWITH_PULSEAUDIO=ON \
-DWITH_PCSC=ON \
-DWITH_CUPS=ON \
-DCMAKE_NO_BUILTIN_CHRPATH=ON \
%ifarch %ix86 x86_64
-DWITH_SSE2=ON \
%endif
..
make %{?_smp_mflags} VERBOSE=1
%install
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
%defattr(-,root,root)
%doc LICENSE README ChangeLog
%{_bindir}/winpr-hash
%{_bindir}/winpr-makecert
%{_bindir}/xfreerdp
%{_mandir}/man1/xfreerdp.1%{ext_man}
%{_mandir}/man1/winpr-hash.1%{ext_man}
%{_mandir}/man1/winpr-makecert.1%{ext_man}
%{_mandir}/man7/wlog.7%{?ext_man}
%files -n %{libname}
%defattr(-,root,root)
%doc LICENSE
%{_libdir}/libfreerdp-client2.so.*
%{_libdir}/libfreerdp2.so.*
%{_libdir}/libwinpr2.so.*
%{_libdir}/libwinpr-tools2.so.*
%files devel
%defattr(-,root,root)
%doc LICENSE
%{_includedir}/freerdp2
%{_includedir}/winpr2
%{_libdir}/cmake/FreeRDP2
%{_libdir}/cmake/FreeRDP-Client2
%{_libdir}/cmake/WinPR2
%{_libdir}/libfreerdp-client2.so
%{_libdir}/libfreerdp2.so
%{_libdir}/libwinpr2.so
%{_libdir}/libwinpr-tools2.so
%{_libdir}/pkgconfig/freerdp2.pc
%{_libdir}/pkgconfig/freerdp-client2.pc
%{_libdir}/pkgconfig/winpr2.pc
%{_libdir}/pkgconfig/winpr-tools2.pc
%changelog