1 |
Summary: Open source remote desktop protocol (RDP) server |
2 |
Name: xrdp |
3 |
Epoch: 1 |
4 |
Version: 0.9.16 |
5 |
Release: %mkrel 1 |
6 |
License: ASL 2.0 |
7 |
Group: Networking/Remote access |
8 |
URL: http://www.xrdp.org/ |
9 |
Source0: https://github.com/neutrinolabs/xrdp/releases/download/v%{version}/xrdp-%{version}.tar.gz |
10 |
Source1: https://raw.githubusercontent.com/neutrinolabs/xrdp/devel/instfiles/pam.d/xrdp-sesman.system |
11 |
Source2: xrdp.sysconfig |
12 |
Source3: xrdp.logrotate |
13 |
Source4: openssl.conf |
14 |
Patch0: xrdp-0.9.9-sesman.patch |
15 |
Patch1: xrdp-0.9.16-xrdp-ini.patch |
16 |
Patch2: xrdp-0.9.4-service.patch |
17 |
Patch3: xrdp-0.9.10-scripts-libexec.patch |
18 |
Patch4: xrdp-0.9.6-script-interpreter.patch |
19 |
Patch5: xrdp-0.9.16-arch.patch |
20 |
Patch6: xrdp-0.9.14-vnc-uninit.patch |
21 |
Patch7: xrdp-0.9.15-sesman-ini.patch |
22 |
Patch50: xrdp-0.9.16-linking.patch |
23 |
|
24 |
BuildRequires: pkgconfig(x11) |
25 |
BuildRequires: pkgconfig(xfixes) |
26 |
BuildRequires: pkgconfig(xrandr) |
27 |
BuildRequires: openssl |
28 |
BuildRequires: lame-devel |
29 |
BuildRequires: pam-devel |
30 |
BuildRequires: pkgconfig(libjpeg) |
31 |
BuildRequires: pkgconfig(fuse) |
32 |
BuildRequires: pkgconfig(openssl) >= 1.1 |
33 |
BuildRequires: pkgconfig(opus) |
34 |
BuildRequires: pkgconfig(pixman-1) |
35 |
BuildRequires: pkgconfig(systemd) |
36 |
BuildRequires: pkgconfig(glib-2.0) |
37 |
BuildRequires: nasm |
38 |
|
39 |
|
40 |
# tigervnc-server-minimal provides Xvnc (default for now) |
41 |
Requires: tigervnc-server |
42 |
Requires: xinitrc |
43 |
Requires(post): rpm-helper >= %{rpmhelper_required_version} |
44 |
Requires(preun): rpm-helper >= %{rpmhelper_required_version} |
45 |
Requires(posttrans): openssl |
46 |
|
47 |
%description |
48 |
xrdp provides a fully functional RDP server compatible with a wide range |
49 |
of RDP clients, including FreeRDP and Microsoft RDP client. |
50 |
|
51 |
%package devel |
52 |
Summary: Headers and pkg-config files needed to compile xrdp backends |
53 |
|
54 |
%description devel |
55 |
This package contains headers necessary for developing xrdp backends that |
56 |
talk to xrdp. |
57 |
|
58 |
%prep |
59 |
%autosetup -p1 |
60 |
|
61 |
# missing file from source tarball |
62 |
if [[ ! -f instfiles/pam.d/xrdp-sesman.system ]]; then |
63 |
cp -a %{SOURCE1} instfiles/pam.d/xrdp-sesman.system |
64 |
fi |
65 |
|
66 |
# create 'bash -l' based startwm, to pick up PATH etc. |
67 |
echo '#!/bin/bash -l |
68 |
. %{_libexecdir}/xrdp/startwm.sh' > sesman/startwm-bash.sh |
69 |
|
70 |
%build |
71 |
autoreconf -fi |
72 |
%configure --enable-fuse \ |
73 |
--enable-pixman \ |
74 |
--enable-painter \ |
75 |
--enable-ipv6 \ |
76 |
--enable-mp3lame \ |
77 |
--enable-opus \ |
78 |
--enable-jpeg \ |
79 |
--enable-tjpeg \ |
80 |
--enable-vsock \ |
81 |
--with-socketdir=%{_rundir}/%{name} |
82 |
|
83 |
%make_build |
84 |
|
85 |
%install |
86 |
%make_install |
87 |
|
88 |
#remove .la and .a files |
89 |
find %{buildroot} -name '*.a' -delete |
90 |
find %{buildroot} -name '*.la' -delete |
91 |
|
92 |
# remove libpainter devel files |
93 |
rm -f %{buildroot}%{_includedir}/painter.h \ |
94 |
%{buildroot}%{_libdir}/libpainter.* \ |
95 |
%{buildroot}%{_libdir}/pkgconfig/libpainter.pc |
96 |
|
97 |
# remove .so files for non-modules |
98 |
rm -f %{buildroot}%{_libdir}/xrdp/libcommon.so \ |
99 |
%{buildroot}%{_libdir}/xrdp/libscp.so \ |
100 |
%{buildroot}%{_libdir}/xrdp/libxrdp.so \ |
101 |
%{buildroot}%{_libdir}/xrdp/libxrdpapi.so \ |
102 |
%{buildroot}%{_libdir}/librfxencode.so |
103 |
|
104 |
#install xrdp sysconfig /etc/sysconfig/xrdp |
105 |
%{__install} -Dp -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/xrdp |
106 |
|
107 |
#install logrotate /etc/logrotate.d/xrdp |
108 |
%{__install} -Dp -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/xrdp |
109 |
|
110 |
#install openssl.conf /etc/xrdp |
111 |
%{__install} -Dp -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/xrdp/openssl.conf |
112 |
|
113 |
#install 'bash -l' startwm script |
114 |
%{__install} -Dp -m 755 sesman/startwm-bash.sh %{buildroot}%{_libexecdir}/xrdp/startwm-bash.sh |
115 |
|
116 |
#move startwm and reconnectwm scripts to libexec |
117 |
%{__mv} -f %{buildroot}%{_sysconfdir}/xrdp/startwm.sh %{buildroot}%{_libexecdir}/xrdp/ |
118 |
%{__mv} -f %{buildroot}%{_sysconfdir}/xrdp/reconnectwm.sh %{buildroot}%{_libexecdir}/xrdp/ |
119 |
|
120 |
%post |
121 |
%_create_ssl_certificate %{name} |
122 |
%_post_service %{name} |
123 |
|
124 |
%preun |
125 |
%_preun_service %{name} |
126 |
|
127 |
%posttrans |
128 |
if [ ! -s %{_sysconfdir}/xrdp/rsakeys.ini ]; then |
129 |
(umask 377; %{_bindir}/xrdp-keygen xrdp %{_sysconfdir}/xrdp/rsakeys.ini >/dev/null) |
130 |
fi |
131 |
chmod 400 %{_sysconfdir}/xrdp/rsakeys.ini |
132 |
|
133 |
if [ ! -s %{_sysconfdir}/xrdp/cert.pem ]; then |
134 |
(umask 377; openssl req -x509 -newkey rsa:2048 -sha256 -nodes -days 3652 \ |
135 |
-keyout %{_sysconfdir}/xrdp/key.pem \ |
136 |
-out %{_sysconfdir}/xrdp/cert.pem \ |
137 |
-config %{_sysconfdir}/xrdp/openssl.conf >/dev/null 2>&1) |
138 |
fi |
139 |
chmod 400 %{_sysconfdir}/xrdp/cert.pem |
140 |
chmod 400 %{_sysconfdir}/xrdp/key.pem |
141 |
|
142 |
|
143 |
%files |
144 |
%doc COPYING *.txt |
145 |
%dir %{_libdir}/xrdp |
146 |
%dir %{_sysconfdir}/xrdp |
147 |
%dir %{_sysconfdir}/xrdp/pulse |
148 |
%dir %{_datadir}/xrdp |
149 |
%dir %{_libexecdir}/xrdp |
150 |
%config(noreplace) %{_sysconfdir}/xrdp/xrdp.ini |
151 |
%config(noreplace) %{_sysconfdir}/pam.d/xrdp-sesman |
152 |
%config(noreplace) %{_sysconfdir}/logrotate.d/xrdp |
153 |
%config(noreplace) %{_sysconfdir}/sysconfig/xrdp |
154 |
%config(noreplace) %{_sysconfdir}/xrdp/sesman.ini |
155 |
%exclude %{_sysconfdir}/xrdp/xrdp.sh |
156 |
%exclude %ghost %{_sysconfdir}/xrdp/*.pem |
157 |
%exclude %ghost %{_sysconfdir}/xrdp/rsakeys.ini |
158 |
%{_sysconfdir}/xrdp/km*.ini |
159 |
%{_sysconfdir}/xrdp/openssl.conf |
160 |
%{_sysconfdir}/xrdp/xrdp_keyboard.ini |
161 |
%{_libexecdir}/xrdp/startwm*.sh |
162 |
%{_libexecdir}/xrdp/reconnectwm.sh |
163 |
%{_bindir}/xrdp-genkeymap |
164 |
%{_bindir}/xrdp-sesadmin |
165 |
%{_bindir}/xrdp-keygen |
166 |
%{_bindir}/xrdp-sesrun |
167 |
%{_bindir}/xrdp-dis |
168 |
%{_sbindir}/xrdp-chansrv |
169 |
%{_sbindir}/xrdp |
170 |
%{_sbindir}/xrdp-sesman |
171 |
%{_datadir}/xrdp/ad256.bmp |
172 |
%{_datadir}/xrdp/cursor0.cur |
173 |
%{_datadir}/xrdp/cursor1.cur |
174 |
%{_datadir}/xrdp/xrdp256.bmp |
175 |
%{_datadir}/xrdp/sans-10.fv1 |
176 |
%{_datadir}/xrdp/ad24b.bmp |
177 |
%{_datadir}/xrdp/xrdp24b.bmp |
178 |
%{_datadir}/xrdp/xrdp_logo.bmp |
179 |
%{_mandir}/man5/* |
180 |
%{_mandir}/man8/* |
181 |
%{_mandir}/man1/* |
182 |
%{_libdir}/lib*.so.* |
183 |
%{_libdir}/xrdp/lib*.so.* |
184 |
%{_libdir}/xrdp/libmc.so |
185 |
%{_libdir}/xrdp/libvnc.so |
186 |
%{_libdir}/xrdp/libxup.so |
187 |
%{_sysconfdir}/xrdp/pulse/default.pa |
188 |
%{_unitdir}/xrdp-sesman.service |
189 |
%{_unitdir}/xrdp.service |
190 |
%ghost %{_localstatedir}/log/xrdp.log |
191 |
%ghost %{_localstatedir}/log/xrdp-sesman.log |
192 |
%attr(0600,root,root) %verify(not size md5 mtime) %{_sysconfdir}/xrdp/rsakeys.ini |
193 |
|
194 |
%files devel |
195 |
%{_includedir}/ms-* |
196 |
%{_includedir}/xrdp* |
197 |
%{_includedir}/rfxcodec_*.h |
198 |
%{_libdir}/pkgconfig/xrdp.pc |
199 |
%{_libdir}/pkgconfig/rfxcodec.pc |