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