# # spec file for package xrdp # # Copyright (c) 2014 Aeneas Jaißle # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %if 0%{?suse_version} >= 1220 %define with_systemd 1 %else %define with_systemd 0 %endif Name: xrdp Version: 0.9.0 Release: 0 Summary: An open source RDP server License: Apache-2.0 Group: System/X11/Utilities Url: http://www.xrdp.org/ Source0: %{name}-%{version}.tar.xz Source1: sysconfig.%{name} Source2: openSUSE.bmp Source100: %{name}-rpmlintrc # PATCH-FIX-SUSE -- Adjust default settings to openSUSE standards Patch0: %{name}-get-it-working.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: fuse-devel BuildRequires: libopenssl-devel BuildRequires: libtool BuildRequires: pam-devel BuildRequires: pkg-config BuildRequires: libX11-devel BuildRequires: libXfixes-devel BuildRequires: libXrandr-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?with_systemd} == 1 %systemd_requires %else Requires(pre): %insserv_prereq %endif Requires(pre): %fillup_prereq %description Based on the work of FreeRDP and rdesktop, xrdp uses the remote desktop protocol to present a GUI to the user. The goal of this project is to provide a fully functional Linux terminal server, capable of accepting connections from rdesktop, freerdp, and Microsoft's own terminal server / remote desktop clients. %prep %setup -q cp sesman/sesman.ini sesman/sesman.ini.example cp xrdp/xrdp.ini xrdp/xrdp.ini.example %patch0 -p1 %build ./bootstrap %{configure} \ %if 0%{?with_systemd} == 1 --with-systemdsystemunitdir=%{_unitdir} \ %endif --enable-fuse \ --disable-static # More confgiure options: # --enable-jpeg \ # --enable-kerberos \ # --enable-loadpulsemodules \ # --enable-neutrinordp \ # --enable-pamuserpass \ # --enable-simplesound \ # --enable-tjpeg \ # --enable-xrdpdebug \ # --enable-xrdpvr \ %{__make} %{?_smp_mflags} %install %{__make} install DESTDIR=%{buildroot} %if 0%{?with_systemd} == 1 rm -r %{buildroot}%{_initrddir} %if 0%{?suse_version} >= 1230 %{__ln_s} %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} %{__ln_s} %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}-sesman %else %{__ln_s} /sbin/service %{buildroot}%{_sbindir}/rc%{name} %{__ln_s} /sbin/service %{buildroot}%{_sbindir}/rc%{name}-sesman %endif %else %{__ln_s} %{_initrddir}/%{name} %{buildroot}%{_sbindir}/rc%{name} %endif # create sysconfig file and ghost rsakeys.ini install -d %{buildroot}%{_localstatedir}/adm/fillup-templates install %{SOURCE1} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name} install %{SOURCE2} %{buildroot}%{_datadir}/%{name}/ touch %{buildroot}%{_sysconfdir}/%{name}/rsakeys.ini # remove libtool cruft find %{buildroot}%{_libdir}/%{name} -name *.la -delete %if 0%{?with_systemd} == 1 %pre %service_add_pre %{name}.service %service_add_pre %{name}-sesman.service %endif %preun %if 0%{?with_systemd} == 1 %service_del_preun %{name}.service %service_del_preun %{name}-sesman.service %else %stop_on_removal %endif %post /sbin/ldconfig %if 0%{?with_systemd} == 1 %service_add_post %{name}.service %service_add_post %{name}-sesman.service %fillup_only %else %fillup_and_insserv %endif # generate a keypair used to perform authentication to the remote client if ! [[ -e %{_sysconfdir}/%{name}/rsakeys.ini ]]; then xrdp-keygen xrdp if ! [[ $? == 0 ]]; then echo "Could not generate rsakeys.ini, please check manually!" fi fi exit 0 %postun /sbin/ldconfig %if 0%{?with_systemd} == 1 %service_add_post %{name}.service %service_add_post %{name}-sesman.service %else %insserv_cleanup %endif %restart_on_update %files %defattr(-, root, root, -) %doc COPYING sesman/sesman.ini.example xrdp/xrdp.ini.example %config %{_sysconfdir}/default/%{name} %config %{_sysconfdir}/pam.d/%{name}-sesman %dir %{_sysconfdir}/%{name} %config %{_sysconfdir}/%{name}/km-0407.ini %config %{_sysconfdir}/%{name}/km-0409.ini %config %{_sysconfdir}/%{name}/km-040c.ini %config %{_sysconfdir}/%{name}/km-0410.ini %config %{_sysconfdir}/%{name}/km-0419.ini %config %{_sysconfdir}/%{name}/km-041d.ini %config %{_sysconfdir}/%{name}/km-0816.ini %ghost %config(noreplace) %{_sysconfdir}/%{name}/rsakeys.ini %config(noreplace) %{_sysconfdir}/%{name}/sesman.ini %config(noreplace) %{_sysconfdir}/%{name}/startwm.sh %config(noreplace) %{_sysconfdir}/%{name}/%{name}.ini %config(noreplace) %{_sysconfdir}/%{name}/%{name}.sh %config %{_localstatedir}/adm/fillup-templates/sysconfig.%{name} %{_bindir}/%{name}-dis %{_bindir}/%{name}-genkeymap %{_bindir}/%{name}-keygen %{_bindir}/%{name}-sesadmin %{_bindir}/%{name}-sesrun %{_sbindir}/%{name} %{_sbindir}/%{name}-chansrv %{_sbindir}/%{name}-sesman %{_sbindir}/%{name}-sessvc %{_sbindir}/rc%{name} %if 0%{?with_systemd} == 1 %{_unitdir}/%{name}.service %{_unitdir}/%{name}-sesman.service %{_sbindir}/rc%{name}-sesman %else %{_initrddir}/%{name} %endif %dir %{_libdir}/%{name} %{_libdir}/%{name}/libcommon.so* %{_libdir}/%{name}/libmc.so* %{_libdir}/%{name}/librdp.so* %{_libdir}/%{name}/libscp.so* %{_libdir}/%{name}/libvnc.so* %{_libdir}/%{name}/libxrdp.so* %{_libdir}/%{name}/libxrdpapi.so* %{_libdir}/%{name}/libxup.so* %{_mandir}/man*/%{name}*.gz %{_mandir}/man5/sesman.ini.5.gz %dir %{_datadir}/%{name} %{_datadir}/%{name}/* %changelog