]> git.pld-linux.org Git - packages/freerdp2.git/blob - freerdp2.spec
e25a87eae6d425245306a813b8d27e312bebaab9
[packages/freerdp2.git] / freerdp2.spec
1 # TODO:
2 # - what is libpcsc-winpr? (-DWITH_PCSC_WINPR)
3 # - fix DirectFB client build (orphaned code)
4 # - WITH_IPP?
5 #
6 # Conditional build:
7 %bcond_without  alsa            # ALSA sound support
8 %bcond_without  cups            # CUPS printing support
9 %bcond_with     directfb        # DirectFB client
10 %bcond_without  ffmpeg          # FFmpeg audio/video codecs support (covers H264, GSM, LAME, FAAC, FAAD2, SOXR)
11 %bcond_with     faac            # faac for AAC audio coding (if without ffmpeg)
12 %bcond_with     faad            # faad2 for AAC audio decoding (if without ffmpeg)
13 %bcond_with     gsm             # GSM audio codec (if without ffmpeg)
14 %bcond_without  gstreamer       # GStreamer sound support
15 # for now the kerberos5 support has to be disabled due to a bad state of its code.
16 # See: https://github.com/FreeRDP/FreeRDP/issues/4348
17 # See: https://github.com/FreeRDP/FreeRDP/issues/5746
18 %bcond_with     kerberos5       # GSSAPI auth support
19 %bcond_with     lame            # LAME for MP3 audio codec (if without ffmpeg)
20 %bcond_without  opencl          # OpenCL support
21 %bcond_with     openh264        # OpenH264 for H.264 codec (overrides ffmpeg for H264)
22 %bcond_without  pcsc            # SmartCard support via PCSC-lite library
23 %bcond_without  pulseaudio      # Pulseaudio sound support
24 %bcond_with     soxr            # soxr for audio resampling (if without ffmpeg)
25 %bcond_without  systemd         # systemd journal support
26 %bcond_without  wayland         # Wayland client
27 %bcond_without  x11             # X11 client
28 %bcond_with     x264            # X264 for H.264 codec (only if without ffmpeg and openh264)
29 %bcond_without  sse2            # SSE2 and higher instructions (runtime detection with sse patch)
30
31 %define freerdp_api     2
32
33 %ifnarch %{ix86} %{x8664} x32
34 %undefine       with_sse2
35 %endif
36 Summary:        Remote Desktop Protocol client
37 Summary(pl.UTF-8):      Klient protokołu RDP
38 Name:           freerdp2
39 Version:        2.1.1
40 Release:        1
41 License:        Apache v2.0
42 Group:          Applications/Communications
43 Source0:        https://pub.freerdp.com/releases/freerdp-%{version}.tar.gz
44 # Source0-md5:  77d17a81fcfdd8ff3e47a30dda01e075
45 Patch0:         freerdp-opt.patch
46 Patch1:         freerdp-gsm.patch
47 URL:            http://www.freerdp.com/
48 %{?with_directfb:BuildRequires: DirectFB-devel}
49 %{?with_opencl:BuildRequires:   OpenCL-devel}
50 %{?with_alsa:BuildRequires:     alsa-lib-devel}
51 %{!?with_ffmpeg:BuildRequires:  cairo-devel}
52 BuildRequires:  cmake >= 2.8
53 %{?with_cups:BuildRequires:     cups-devel}
54 BuildRequires:  desktop-file-utils
55 BuildRequires:  docbook-style-xsl
56 %{?with_faac:BuildRequires:     faac-devel}
57 %{?with_faad:BuildRequires:     faad2-devel >= 2}
58 # libavcodec >= 57.48.101, libavresample, libavutil
59 %{?with_ffmpeg:BuildRequires:   ffmpeg-devel >= 3.1}
60 %{?with_gstreamer:BuildRequires:        gstreamer-devel >= 1.0.5}
61 %{?with_gstreamer:BuildRequires:        gstreamer-plugins-base-devel >= 1.0.5}
62 # MIT krb5 >= 1.13 also possible
63 %{?with_kerberos5:BuildRequires:        heimdal-devel}
64 %{?with_lame:BuildRequires:     lame-libs-devel}
65 %{?with_gsm:BuildRequires:      libgsm-devel}
66 BuildRequires:  libjpeg-devel
67 %{?with_x264:BuildRequires:     libx264-devel}
68 %{?with_openh264:BuildRequires: openh264-devel}
69 # also mbedtls possible
70 BuildRequires:  openssl-devel
71 %{?with_pcsc:BuildRequires:     pcsc-lite-devel}
72 BuildRequires:  pkgconfig
73 %{?with_pulseaudio:BuildRequires:       pulseaudio-devel}
74 BuildRequires:  rpmbuild(macros) >= 1.742
75 %{?with_soxr:BuildRequires:     soxr-devel}
76 %{?with_systemd:BuildRequires:  systemd-devel >= 1:209}
77 %{?with_wayland:BuildRequires:  wayland-devel}
78 BuildRequires:  xmlto
79 %{?with_wayland:BuildRequires:  xorg-lib-libxkbcommon-devel}
80 %if %{with x11}
81 BuildRequires:  xorg-lib-libX11-devel
82 BuildRequires:  xorg-lib-libXcursor-devel
83 BuildRequires:  xorg-lib-libXdamage-devel
84 BuildRequires:  xorg-lib-libXext-devel
85 BuildRequires:  xorg-lib-libXfixes-devel
86 BuildRequires:  xorg-lib-libXinerama-devel
87 BuildRequires:  xorg-lib-libXrandr-devel
88 BuildRequires:  xorg-lib-libXtst-devel
89 BuildRequires:  xorg-lib-libXv-devel
90 BuildRequires:  xorg-lib-libxkbfile-devel
91 %endif
92 BuildRequires:  zlib-devel
93 Requires:       %{name}-libs = %{version}-%{release}
94 Requires:       hicolor-icon-theme
95 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
96
97 %description
98 FreeRDP is Remote Desktop Protocol (RDP) client.
99
100 xfreerdp can connect to RDP servers such as Microsoft Windows
101 machines, xrdp and VirtualBox.
102
103 %description -l pl.UTF-8
104 xfreerdp to klient protokołu RDP (Remote Desktop Protocol) z projektu
105 FreeRDP.
106
107 xfreerdp może łączyć się z serwerami RDP, takimi jak maszyny z
108 Microsoft Windows, xrdp oraz VirtualBox.
109
110 %package dfb
111 Summary:        DirectFB based Remote Desktop Protocol klient
112 Summary(pl.UTF-8):      Klient protokołu RDP oparty na DirectFB
113 Group:          Applications/Communications
114 Requires:       %{name} = %{version}-%{release}
115 Obsoletes:      freerdp-dfb < 2
116
117 %description dfb
118 DirectFB based Remote Desktop Protocol klient.
119
120 dfreerdp can connect to RDP servers such as Microsoft Windows
121 machines, xrdp and VirtualBox.
122
123 %description dfb -l pl.UTF-8
124 Klient protokołu RDP oparty na DirectFB.
125
126 dfreerdp może łączyć się z serwerami RDP, takimi jak maszyny z
127 Microsoft Windows, xrdp oraz VirtualBox.
128
129 %package wayland
130 Summary:        Wayland based Remote Desktop Protocol klient
131 Summary(pl.UTF-8):      Klient protokołu RDP oparty na Wayland
132 Group:          Applications/Communications
133 Requires:       %{name} = %{version}-%{release}
134
135 %description wayland
136 Wayland based Remote Desktop Protocol klient.
137
138 wlfreerdp can connect to RDP servers such as Microsoft Windows
139 machines, xrdp and VirtualBox.
140
141 %description wayland -l pl.UTF-8
142 Klient protokołu RDP oparty na Wayland.
143
144 wlfreerdp może łączyć się z serwerami RDP, takimi jak maszyny z
145 Microsoft Windows, xrdp oraz VirtualBox.
146
147 %package x11
148 Summary:        X11 based Remote Desktop Protocol klient
149 Summary(pl.UTF-8):      Klient protokołu RDP oparty na X11
150 Group:          Applications/Communications
151 Requires:       %{name} = %{version}-%{release}
152 Provides:       xfreerdp = %{version}-%{release}
153 Obsoletes:      freerdp < 2
154
155 %description x11
156 X11 based Remote Desktop Protocol klient.
157
158 xfreerdp can connect to RDP servers such as Microsoft Windows
159 machines, xrdp and VirtualBox.
160
161 %description x11 -l pl.UTF-8
162 Klient protokołu RDP oparty na X11.
163
164 xfreerdp może łączyć się z serwerami RDP, takimi jak maszyny z
165 Microsoft Windows, xrdp oraz VirtualBox.
166
167 %package libs
168 Summary:        Core libraries implementing the RDP protocol
169 Summary(pl.UTF-8):      Główne biblioteki implementujące protokół RDP
170 Group:          Libraries
171
172 %description libs
173 Core libraries implementing the RDP protocol.
174
175 %description libs -l pl.UTF-8
176 Główne biblioteki implementujące protokół RDP.
177
178 %package devel
179 Summary:        Development files for FreeRDP 2 libraries
180 Summary(pl.UTF-8):      Pliki programistyczne bibliotek FreeRDP 2
181 Group:          Development/Libraries
182 Requires:       %{name}-libs = %{version}-%{release}
183
184 %description devel
185 This package contains the header files for developing applications
186 that use FreeRDP 2 libraries.
187
188 %description devel -l pl.UTF-8
189 Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji
190 wykorzystujących biblioteki FreeRDP 2.
191
192 %prep
193 %setup -q -n freerdp-%{version}
194 %patch0 -p1
195 %patch1 -p1
196
197 cat << EOF > xfreerdp.desktop
198 [Desktop Entry]
199 Type=Application
200 Name=X FreeRDP
201 NoDisplay=true
202 Comment=Connect to RDP server and display remote desktop
203 Comment[pl]=Połączenie z serwerem RDP i wyświetlanie zdalnego pulpitu
204 Icon=%{name}
205 Exec=%{_bindir}/xfreerdp
206 Terminal=false
207 Categories=Network;RemoteAccess;
208 EOF
209
210 %build
211 install -d build
212 cd build
213 %cmake .. \
214         -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \
215         %{cmake_on_off alsa WITH_ALSA} \
216         %{!?with_ffmpeg:-DWITH_CAIRO=ON} \
217         -DWITH_CUNIT=OFF \
218         %{cmake_on_off cups WITH_CUPS} \
219         -DWITH_DEBUG_LICENSE=ON \
220         %{cmake_on_off directfb WITH_DIRECTFB} \
221         %{cmake_on_off ffmpeg WITH_DSP_FFMPEG} \
222         %{cmake_on_off faac WITH_FAAC} \
223         %{cmake_on_off faad WITH_FAAD2} \
224         %{cmake_on_off ffmpeg WITH_FFMPEG} \
225         %{cmake_on_off gsm WITH_GSM} \
226         %{cmake_on_off gstreamer WITH_GSTREAMER_1_0} \
227         %{cmake_on_off kerberos5 WITH_GSSAPI} \
228         -DWITH_JPEG=ON \
229         %{cmake_on_off systemd WITH_LIBSYSTEMD} \
230         %{cmake_on_off opencl WITH_OPENCL} \
231         %{cmake_on_off openh264 WITH_OPENH264} \
232         -DWITH_OSS=ON \
233         %{cmake_on_off pcsc WITH_PCSC} \
234         %{cmake_on_off pulseaudio WITH_PULSE} \
235         -DWITH_SERVER=ON \
236         %{cmake_on_off soxr WITH_SOXR} \
237         %{cmake_on_off sse2 WITH_SSE2} \
238         %{cmake_on_off ffmpeg WITH_SWSCALE} \
239         %{cmake_on_off wayland WITH_WAYLAND} \
240         %{cmake_on_off x11 WITH_X11} \
241         %{cmake_on_off x264 WITH_X264} \
242         -DWITH_XCURSOR=ON \
243         -DWITH_XEXT=ON \
244         -DWITH_XINERAMA=ON \
245         -DWITH_XKBFILE=ON \
246         -DWITH_XV=ON
247
248 %{__make}
249
250 %install
251 rm -rf $RPM_BUILD_ROOT
252
253 %{__make} -C build install \
254         INSTALL="install -p" \
255         DESTDIR=$RPM_BUILD_ROOT
256
257 desktop-file-install --dir=$RPM_BUILD_ROOT%{_desktopdir} xfreerdp.desktop
258 install -p -D resources/FreeRDP_Icon_256px.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
259
260 %clean
261 rm -rf $RPM_BUILD_ROOT
262
263 %post
264 %update_icon_cache hicolor
265
266 %postun
267 %update_icon_cache hicolor
268
269 %post   libs -p /sbin/ldconfig
270 %postun libs -p /sbin/ldconfig
271
272 %files
273 %defattr(644,root,root,755)
274 %attr(755,root,root) %{_bindir}/freerdp-proxy
275 %attr(755,root,root) %{_bindir}/freerdp-shadow-cli
276 %attr(755,root,root) %{_bindir}/winpr-hash
277 %attr(755,root,root) %{_bindir}/winpr-makecert
278 %{_iconsdir}/hicolor/256x256/apps/freerdp2.png
279 %{_mandir}/man1/freerdp-shadow-cli.1*
280 %{_mandir}/man1/winpr-hash.1*
281 %{_mandir}/man1/winpr-makecert.1*
282 %{_mandir}/man7/wlog.7*
283
284 %if %{with directfb}
285 %files dfb
286 %defattr(644,root,root,755)
287 %doc doc/README.directfb
288 %attr(755,root,root) %{_bindir}/dfreerdp
289 %endif
290
291 %if %{with wayland}
292 %files wayland
293 %defattr(644,root,root,755)
294 %attr(755,root,root) %{_bindir}/wlfreerdp
295 %{_mandir}/man1/wlfreerdp.1*
296 %endif
297
298 %if %{with x11}
299 %files x11
300 %defattr(644,root,root,755)
301 %attr(755,root,root) %{_bindir}/xfreerdp
302 %{_desktopdir}/xfreerdp.desktop
303 %{_mandir}/man1/xfreerdp.1*
304 %endif
305
306 %files libs
307 %defattr(644,root,root,755)
308 %doc ChangeLog README.md
309 %attr(755,root,root) %{_libdir}/libfreerdp-client%{freerdp_api}.so.*.*.*
310 %attr(755,root,root) %ghost %{_libdir}/libfreerdp-client%{freerdp_api}.so.2
311 %attr(755,root,root) %{_libdir}/libfreerdp-server%{freerdp_api}.so.*.*.*
312 %attr(755,root,root) %ghost %{_libdir}/libfreerdp-server%{freerdp_api}.so.2
313 %attr(755,root,root) %{_libdir}/libfreerdp-shadow%{freerdp_api}.so.*.*.*
314 %attr(755,root,root) %ghost %{_libdir}/libfreerdp-shadow%{freerdp_api}.so.2
315 %attr(755,root,root) %{_libdir}/libfreerdp-shadow-subsystem%{freerdp_api}.so.*.*.*
316 %attr(755,root,root) %ghost %{_libdir}/libfreerdp-shadow-subsystem%{freerdp_api}.so.2
317 %attr(755,root,root) %{_libdir}/libfreerdp%{freerdp_api}.so.*.*.*
318 %attr(755,root,root) %ghost %{_libdir}/libfreerdp%{freerdp_api}.so.2
319 %attr(755,root,root) %{_libdir}/libuwac0.so.*.*.*
320 %attr(755,root,root) %ghost %{_libdir}/libuwac0.so.0
321 %attr(755,root,root) %{_libdir}/libwinpr%{freerdp_api}.so.*.*.*
322 %attr(755,root,root) %ghost %{_libdir}/libwinpr%{freerdp_api}.so.2
323 %attr(755,root,root) %{_libdir}/libwinpr-tools%{freerdp_api}.so.*.*.*
324 %attr(755,root,root) %ghost %{_libdir}/libwinpr-tools%{freerdp_api}.so.2
325
326 %files devel
327 %defattr(644,root,root,755)
328 %attr(755,root,root) %{_libdir}/libfreerdp-client%{freerdp_api}.so
329 %attr(755,root,root) %{_libdir}/libfreerdp-server%{freerdp_api}.so
330 %attr(755,root,root) %{_libdir}/libfreerdp-shadow%{freerdp_api}.so
331 %attr(755,root,root) %{_libdir}/libfreerdp-shadow-subsystem%{freerdp_api}.so
332 %attr(755,root,root) %{_libdir}/libfreerdp%{freerdp_api}.so
333 %attr(755,root,root) %{_libdir}/libuwac0.so
334 %attr(755,root,root) %{_libdir}/libwinpr%{freerdp_api}.so
335 %attr(755,root,root) %{_libdir}/libwinpr-tools%{freerdp_api}.so
336 %{_includedir}/freerdp2
337 %{_includedir}/uwac0
338 %{_includedir}/winpr2
339 %{_pkgconfigdir}/freerdp-client2.pc
340 %{_pkgconfigdir}/freerdp-server2.pc
341 %{_pkgconfigdir}/freerdp-shadow2.pc
342 %{_pkgconfigdir}/freerdp2.pc
343 %{_pkgconfigdir}/uwac0.pc
344 %{_pkgconfigdir}/winpr-tools2.pc
345 %{_pkgconfigdir}/winpr2.pc
346 %{_libdir}/cmake/FreeRDP-Client2
347 %{_libdir}/cmake/FreeRDP-Server2
348 %{_libdir}/cmake/FreeRDP-Shadow2
349 %{_libdir}/cmake/FreeRDP2
350 %{_libdir}/cmake/WinPR2
351 %{_libdir}/cmake/uwac0
This page took 0.286999 seconds and 2 git commands to generate.