Merge pull request #581 from ArvidNorr/errorcode
[platform/upstream/freerdp.git] / freerdp.spec
1 # rpmbuild -ta freerdp-<...>.tar.gz
2
3 Name:           freerdp
4 Version:        1.0.1
5 Release:        1%{?dist}
6 Summary:        Remote Desktop Protocol functionality
7
8 Group:          Applications/Communications
9 License:        Apache License 2.0
10 URL:            http://www.freerdp.com/
11 Source0:        https://github.com/downloads/FreeRDP/FreeRDP/%{name}-%{version}.tar.gz
12 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
13
14 BuildRequires:  cmake
15 BuildRequires:  xmlto
16 BuildRequires:  openssl-devel
17 BuildRequires:  libX11-devel
18 BuildRequires:  libXext-devel
19 BuildRequires:  libXinerama-devel
20 BuildRequires:  libXcursor-devel
21 BuildRequires:  libXdamage-devel
22 BuildRequires:  libXv-devel
23 BuildRequires:  libxkbfile-devel
24 BuildRequires:  pulseaudio-libs-devel
25 BuildRequires:  cups-devel
26 BuildRequires:  alsa-lib-devel
27 BuildRequires:  pcsc-lite-devel
28 BuildRequires:  desktop-file-utils
29
30 %description
31 FreeRDP is a free implementation of the Remote Desktop Protocol (RDP)
32 according to the Microsoft Open Specifications.
33
34
35 %package        -n xfreerdp
36 Summary:        Remote Desktop Protocol client
37 Group:          Applications/Communications
38 Requires:       %{name}-libs = %{version}-%{release}
39 Requires:       %{name}-plugins-standard = %{version}-%{release}
40 %description    -n xfreerdp
41 FreeRDP is a free implementation of the Remote Desktop Protocol (RDP)
42 according to the Microsoft Open Specifications.
43
44
45 %package        libs
46 Summary:        Core libraries implementing the RDP protocol
47 Group:          Applications/Communications
48 %description    libs
49 libfreerdp-core can be embedded in applications.
50
51 libfreerdp-channels and libfreerdp-kbd might be convenient to use in X
52 applications together with libfreerdp-core.
53
54 libfreerdp-core can be extended with plugins handling RDP channels.
55
56 %package        plugins-standard
57 Summary:        Plugins for handling the standard RDP channels
58 Group:          Applications/Communications
59 Requires:       %{name}-libs = %{version}-%{release}
60 %description    plugins-standard
61 A set of plugins to the channel manager implementing the standard virtual
62 channels extending RDP core functionality. For instance, sounds, clipboard
63 sync, disk/printer redirection, etc.
64
65
66 %package        devel
67 Summary:        Libraries and header files for embedding and extending freerdp
68 Group:          Applications/Communications
69 Requires:       %{name}-libs = %{version}-%{release}
70 Requires:       pkgconfig
71 %description    devel
72 Header files and unversioned libraries for libfreerdp-core, libfreerdp-channels,
73 libfreerdp-locale, libfreerdp-cache, libfreerdp-codec, libfreerdp-rail,
74 libfreerdp-gdi and libfreerdp-utils.
75
76 %prep
77
78 %setup -q
79
80 cat << EOF > xfreerdp.desktop 
81 [Desktop Entry]
82 Type=Application
83 Name=X FreeRDP
84 NoDisplay=true
85 Comment=Connect to RDP server and display remote desktop
86 Icon=%{name}
87 Exec=/usr/bin/xfreerdp
88 Terminal=false
89 Categories=Network;RemoteAccess;
90 EOF
91
92
93 %build
94
95 cmake \
96         -DCMAKE_INSTALL_PREFIX:PATH=/usr \
97         -DWITH_CUPS:BOOL=ON \
98         -DWITH_PCSC:BOOL=ON \
99         -DWITH_PULSEAUDIO:BOOL=ON \
100         -DWITH_X11:BOOL=ON \
101         -DWITH_XCURSOR:BOOL=ON \
102         -DWITH_XEXT:BOOL=ON \
103         -DWITH_XINERAMA:BOOL=ON \
104         -DWITH_XKBFILE:BOOL=ON \
105         -DWITH_XV:BOOL=ON \
106         -DWITH_ALSA:BOOL=ON \
107         -DWITH_CUNIT:BOOL=OFF \
108         -DWITH_DIRECTFB:BOOL=OFF \
109         -DWITH_FFMPEG:BOOL=OFF \
110         -DWITH_SSE2:BOOL=OFF \
111         .
112
113 make %{?_smp_mflags}
114
115
116 %install
117 rm -rf $RPM_BUILD_ROOT
118
119 make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
120
121 desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications xfreerdp.desktop
122 install -p -D resources/FreeRDP_Icon_256px.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
123
124
125 %clean
126 rm -rf $RPM_BUILD_ROOT
127
128
129 %post
130 # This is no gtk application, but try to integrate nicely with GNOME if it is available
131 gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
132
133
134 %post libs -p /sbin/ldconfig
135
136
137 %postun libs -p /sbin/ldconfig
138
139
140 %files -n xfreerdp
141 %defattr(-,root,root,-)
142 %{_bindir}/xfreerdp
143 %{_mandir}/man1/xfreerdp.*
144 %{_datadir}/applications/xfreerdp.desktop
145 %{_datadir}/icons/hicolor/256x256/apps/%{name}.png
146
147 %files libs
148 %defattr(-,root,root,-)
149 %doc LICENSE README ChangeLog
150 %{_libdir}/lib%{name}-*.so.*
151 %dir %{_libdir}/%{name}/
152
153 %files plugins-standard
154 %defattr(-,root,root,-)
155 %{_libdir}/%{name}/*
156
157 %files devel
158 %defattr(-,root,root,-)
159 %{_includedir}/%{name}/
160 %{_libdir}/lib%{name}-*.so
161 %{_libdir}/pkgconfig/%{name}.pc
162
163
164 %changelog