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