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