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