vnick

freerdp.spec

Jan 4th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # rpmbuild -ta freerdp-<...>.tar.gz
  2.  
  3. Name:           freerdp
  4. Version:        1.1.0
  5. Release:        2%{?dist}
  6. Summary:        Remote Desktop Protocol functionality
  7.  
  8. Group:          Applications/Communications
  9. License:        Apache License 2.0
  10. URL:            http://www.freerdp.com/
  11. Source0:        https://github.com/downloads/FreeRDP/FreeRDP/%{name}-%{version}.tar.gz
  12. BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  13.  
  14. BuildRequires:  cmake
  15. BuildRequires:  xmlto
  16. BuildRequires:  openssl-devel
  17. BuildRequires:  libX11-devel
  18. BuildRequires:  libXext-devel
  19. BuildRequires:  libXinerama-devel
  20. BuildRequires:  libXcursor-devel
  21. BuildRequires:  libXdamage-devel
  22. BuildRequires:  libXv-devel
  23. BuildRequires:  libXi-devel
  24. BuildRequires:  libxkbfile-devel
  25. BuildRequires:  libXrandr-devel
  26. BuildRequires:  pulseaudio-libs-devel
  27. BuildRequires:  cups-devel
  28. BuildRequires:  alsa-lib-devel
  29. BuildRequires:  pcsc-lite-devel
  30. BuildRequires:  desktop-file-utils
  31. BuildRequires:  gstreamer-devel
  32. BuildRequires:  gstreamer-plugins-base-devel
  33.  
  34. %description
  35. FreeRDP is a free implementation of the Remote Desktop Protocol (RDP)
  36. according to the Microsoft Open Specifications.
  37.  
  38.  
  39. %package        -n xfreerdp
  40. Summary:        Remote Desktop Protocol client
  41. Group:          Applications/Communications
  42. Requires:       %{name}-libs = %{version}-%{release}
  43. %description    -n xfreerdp
  44. FreeRDP is a free implementation of the Remote Desktop Protocol (RDP)
  45. according to the Microsoft Open Specifications.
  46.  
  47.  
  48. %package        libs
  49. Summary:        Core libraries implementing the RDP protocol
  50. Group:          Applications/Communications
  51. %description    libs
  52. libfreerdp-core can be embedded in applications.
  53.  
  54. libfreerdp-channels and libfreerdp-kbd might be convenient to use in X
  55. applications together with libfreerdp-core.
  56.  
  57. libfreerdp-core can be extended with plugins handling RDP channels.
  58.  
  59. %package        devel
  60. Summary:        Libraries and header files for embedding and extending freerdp
  61. Group:          Applications/Communications
  62. Requires:       %{name}-libs = %{version}-%{release}
  63. Requires:       pkgconfig
  64. %description    devel
  65. Header files and unversioned libraries for libfreerdp-core, libfreerdp-channels,
  66. libfreerdp-locale, libfreerdp-cache, libfreerdp-codec, libfreerdp-rail,
  67. libfreerdp-gdi and libfreerdp-utils.
  68.  
  69. %prep
  70.  
  71. %setup -q
  72.  
  73. cat << EOF > xfreerdp.desktop
  74. [Desktop Entry]
  75. Type=Application
  76. Name=X FreeRDP
  77. NoDisplay=true
  78. Comment=Connect to RDP server and display remote desktop
  79. Icon=%{name}
  80. Exec=/usr/bin/xfreerdp
  81. Terminal=false
  82. Categories=Network;RemoteAccess;
  83. EOF
  84.  
  85.  
  86. %build
  87.  
  88. cmake \
  89.         -DCMAKE_INSTALL_PREFIX:PATH=/usr \
  90.         -DWITH_CUPS:BOOL=ON \
  91.         -DWITH_PCSC:BOOL=ON \
  92.         -DWITH_PULSE:BOOL=ON \
  93.         -DWITH_X11:BOOL=ON \
  94.         -DWITH_XCURSOR:BOOL=ON \
  95.         -DWITH_XEXT:BOOL=ON \
  96.         -DWITH_XINERAMA:BOOL=ON \
  97.         -DWITH_XKBFILE:BOOL=ON \
  98.         -DWITH_XV:BOOL=ON \
  99.         -DWITH_ALSA:BOOL=ON \
  100.         -DWITH_CUNIT:BOOL=OFF \
  101.         -DWITH_DIRECTFB:BOOL=OFF \
  102.         -DWITH_FFMPEG:BOOL=OFF \
  103.         -DWITH_SSE2:BOOL=OFF \
  104.         .
  105.  
  106. make %{?_smp_mflags}
  107.  
  108.  
  109. %install
  110. rm -rf $RPM_BUILD_ROOT
  111.  
  112. make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
  113.  
  114. desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications xfreerdp.desktop
  115. install -p -D resources/FreeRDP_Icon_256px.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
  116.  
  117.  
  118. %clean
  119. rm -rf $RPM_BUILD_ROOT
  120.  
  121.  
  122. %post
  123. # This is no gtk application, but try to integrate nicely with GNOME if it is available
  124. gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
  125.  
  126.  
  127. %post libs -p /sbin/ldconfig
  128.  
  129.  
  130. %postun libs -p /sbin/ldconfig
  131.  
  132.  
  133. %files -n xfreerdp
  134. %defattr(-,root,root,-)
  135. %{_bindir}/xfreerdp
  136. %{_mandir}/man1/xfreerdp.*
  137. %{_datadir}/applications/xfreerdp.desktop
  138. %{_datadir}/icons/hicolor/256x256/apps/%{name}.png
  139. %{_libdir}/libxfreerdp-*.so.*
  140.  
  141. %files libs
  142. %defattr(-,root,root,-)
  143. %doc LICENSE README ChangeLog
  144. %{_libdir}/lib%{name}-*.so.*
  145. %{_libdir}/libwinpr-*.so.*
  146.  
  147. %files devel
  148. %defattr(-,root,root,-)
  149. %{_includedir}/%{name}/
  150. %{_includedir}/winpr/
  151. %{_libdir}/lib%{name}-*.so
  152. %{_libdir}/libwinpr-*.so
  153. %{_libdir}/libwinpr-*.a
  154. %{_libdir}/libxfreerdp-*.so
  155. %{_libdir}/pkgconfig/%{name}.pc
  156.  
  157.  
  158. %changelog
Add Comment
Please, Sign In to add comment