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