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