2014-07-22 18:57:37 +00:00
#
# spec file for package xrdp
#
2017-02-19 14:38:36 +00:00
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
2014-07-22 18:57:37 +00:00
#
# 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/
#
2016-09-21 11:37:09 +00:00
%define _fwdefdir %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
2014-07-22 18:57:37 +00:00
Name : xrdp
2016-09-21 11:37:09 +00:00
Version : 0.9.0~git.1456906198.f422461
2014-07-22 18:57:37 +00:00
Release : 0
2016-10-12 06:56:56 +00:00
Summary : Remote desktop protocol (RDP) server
2016-09-21 11:37:09 +00:00
License : Apache-2.0 and GPL-2.0+
2014-07-22 18:57:37 +00:00
Group : System/X11/Utilities
2016-09-21 11:37:09 +00:00
Url : https://github.com/neutrinolabs/xrdp
Source0 : xrdp-%{version} .tar.gz
Source1 : xrdp.fw
Source2 : sysconfig.xrdp
Source3 : force_stop
Source4 : openSUSE.bmp
2014-07-22 18:57:37 +00:00
Source100 : %{name} -rpmlintrc
2016-09-21 11:37:09 +00:00
# PATCH-FIX-OPENSUSE xrdp-pam.patch bnc#441750 - hfiguiere@novell.com
Patch1 : xrdp-pam.patch
# PATCH-FIX-UPSTREAM xrdp-fix-buildtime-warnings.patch - fezhang@suse.com -- fix warnings in build time, backported from upstream devel branch
Patch2 : xrdp-fix-buildtime-warnings.patch
# PATCH-FIX-OPENSUSE xrdp-default-config.patch - cyberorg@opensuse.org -- Adjust default settings to openSUSE standards
Patch3 : xrdp-default-config.patch
# PATCH-FIX-OPENSUSE xrdp-disable-8-bpp-vnc-support.patch bsc#991059 - fezhang@suse.com -- disable 8 bpp support for vnc connections
Patch4 : xrdp-disable-8-bpp-vnc-support.patch
2017-02-19 14:38:36 +00:00
# PATCH-FIX-UPSTREAM xrdp-Allow-sessions-with-32-bpp.patch.patch bsc#1022098 - vliaskovitis@suse.com -- Allow sessions with 32 bpp
Patch5 : xrdp-Allow-sessions-with-32-bpp.patch.patch
# PATCH-FIX-UPSTREAM xrdp-vnc-enable-32-bpp-support-for-Xvnc-it-actually-works.patch bsc#1022098 - vliaskovitis@suse.com -- vnc: enable 32 bpp support for Xvnc, it actually works
Patch6 : xrdp-vnc-enable-32-bpp-support-for-Xvnc-it-actually-works.patch
# PATCH-FIX-UPSTREAM xrdp-Fix-support-for-32-bpp-clients-connecting-to-16-bpp-.patch bsc#1022098 - vliaskovitis@suse.com -- Fix support for 32-bpp clients connecting to 16-bpp VNC
Patch7 : xrdp-Fix-support-for-32-bpp-clients-connecting-to-16-bpp-.patch
2016-09-21 11:37:09 +00:00
# PATCH-FEATURE-SLE xrdp-avahi.diff bnc#586785 - hfiguiere@novell.com -- Add Avahi support
Patch11 : xrdp-avahi.diff
# PATCH-FIX-SLE xrdp-filter-tab-from-mstsc-on-focus-change.patch bnc#601996 bnc#623534 - dliang@novell.com -- filter the fake tab key which is used to notify the session
Patch12 : xrdp-filter-tab-from-mstsc-on-focus-change.patch
# PATCH-FIX-SLE xrdp-bsc965647-allow-admin-choose-desktop.patch bsc#965647 - fezhang@suse.com -- Allow administrator choose the desktop displayed
Patch13 : xrdp-bsc965647-allow-admin-choose-desktop.patch
# PATCH-FEATURE-SLE xrdp-fate318398-change-expired-password.patch fate#318398 - fezhang@suse.com -- enable user to update expired password via PAM
Patch14 : xrdp-fate318398-change-expired-password.patch
2017-04-04 07:12:31 +00:00
# PATCH-FEATURE-SLE xrdp-fate319683-allow-vnc-resizing.patch fate#319683 bsc#948062 - fezhang@suse.com -- allow resizing in VNC sessions
Patch15 : xrdp-fate319683-allow-vnc-resizing.patch
2016-09-21 11:37:09 +00:00
# PATCH-FIX-OPENSUSE xrdp-openSUSE-logo.patch - fezhang@suse.com -- use openSUSE logo in login dialog
Patch21 : xrdp-openSUSE-logo.patch
2014-07-22 18:57:37 +00:00
BuildRequires : autoconf
BuildRequires : automake
2016-09-21 11:37:09 +00:00
BuildRequires : fdupes
2014-07-22 18:57:37 +00:00
BuildRequires : libX11-devel
BuildRequires : libXfixes-devel
BuildRequires : libXrandr-devel
2016-09-21 11:37:09 +00:00
BuildRequires : libavahi-devel
BuildRequires : libtool
BuildRequires : openssl-devel
BuildRequires : pam-devel
BuildRequires : pkg-config
BuildRequires : pkgconfig(systemd)
Requires : xorg-x11-Xvnc
2014-07-22 18:57:37 +00:00
BuildRoot : %{_tmppath} /%{name} -%{version} -build
%description
2016-10-12 06:56:56 +00:00
A fully functional Linux terminal server, capable of accepting
2016-09-21 11:37:09 +00:00
connection from rdesktop and Microsoft's own terminal server / remote
desktop clients.
2014-07-22 18:57:37 +00:00
%prep
%setup -q
2015-10-19 07:24:42 +00:00
%patch1 -p1
2016-09-21 11:37:09 +00:00
%patch2 -p1
%patch3 -p1
%patch4 -p1
2017-02-19 14:38:36 +00:00
%patch5 -p1
%patch6 -p1
%patch7 -p1
2016-09-21 11:37:09 +00:00
%if ! 0%{?is_opensuse}
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
2017-04-04 07:12:31 +00:00
%patch15 -p1
2016-09-21 11:37:09 +00:00
%else
%patch21 -p1
%endif
2014-07-22 18:57:37 +00:00
%build
2016-09-21 11:37:09 +00:00
sh ./bootstrap
%configure \
--with-systemdsystemunitdir=%{_unitdir}
make %{?_smp_mflags}
2014-07-22 18:57:37 +00:00
2016-09-21 11:37:09 +00:00
%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install
2016-10-12 06:56:56 +00:00
find %{buildroot} -name '*.a' -delete
2016-09-21 11:37:09 +00:00
find %{buildroot} -type f -name " * . l a " -delete -print
mkdir -p %{buildroot} /%{_fwdefdir}
install -m 644 %{SOURCE1} %{buildroot} /%{_fwdefdir} /xrdp
mkdir -p %{buildroot} /%{_localstatedir} /adm/fillup-templates
install -m 644 %{SOURCE2} %{buildroot} /%{_localstatedir} /adm/fillup-templates/sysconfig.xrdp
mkdir -p %{buildroot} /%{_prefix} /lib/initscripts/legacy-actions/xrdp
install -m 755 %{SOURCE3} %{buildroot} /%{_prefix} /lib/initscripts/legacy-actions/xrdp/force_stop
%if 0%{?is_opensuse}
install %{SOURCE4} %{buildroot} %{_datadir} /%{name} /
2014-07-22 18:57:37 +00:00
%endif
2016-09-21 11:37:09 +00:00
ln -sf %{_sbindir} /service %{buildroot} %{_sbindir} /rcxrdp
ln -sf %{_sbindir} /service %{buildroot} %{_sbindir} /rcxrdp-sesman
2014-07-22 18:57:37 +00:00
2016-09-21 11:37:09 +00:00
# remove init script that conflicts with systemd service
rm -rf %{buildroot} /%{_initddir}
2014-07-22 18:57:37 +00:00
2016-09-21 11:37:09 +00:00
%fdupes -s %{buildroot}
2014-07-22 18:57:37 +00:00
%pre
2016-09-21 11:37:09 +00:00
%service_add_pre xrdp-sesman.service
%service_add_pre xrdp.service
2014-07-22 18:57:37 +00:00
%post
/sbin/ldconfig
2016-09-21 11:37:09 +00:00
%service_add_post xrdp-sesman.service
%service_add_post xrdp.service
%{fillup_only -n xrdp}
if [ ! -e %{_sysconfdir} /xrdp/rsakeys.ini ]; then
xrdp-keygen xrdp %{_sysconfdir} /xrdp/rsakeys.ini
if [ $? -ne 0 ] || [ ! -e %{_sysconfdir} /xrdp/rsakeys.ini ]; then
echo " C o u l d n o t g e n e r a t e r s a k e y s . i n i , p l e a s e c h e c k m a n u a l l y ! "
2014-07-22 18:57:37 +00:00
fi
fi
exit 0
2016-09-21 11:37:09 +00:00
%preun
%stop_on_removal
%service_del_preun xrdp.service
%service_del_preun xrdp-sesman.service
2014-07-22 18:57:37 +00:00
%postun
/sbin/ldconfig
2016-09-21 11:37:09 +00:00
%service_del_postun xrdp.service
%service_del_postun xrdp-sesman.service
2014-07-22 18:57:37 +00:00
%restart_on_update
%files
2016-09-21 11:37:09 +00:00
%defattr (-,root,root)
%dir %{_datadir} /xrdp
%dir %{_libdir} /xrdp
%dir %{_sysconfdir} /xrdp
%dir %{_sysconfdir} /xrdp/pulse
%config %{_fwdefdir} /xrdp
%config (noreplace) %{_sysconfdir} /default/xrdp
%config (noreplace) %{_sysconfdir} /pam.d/xrdp-sesman
%config (noreplace) %{_sysconfdir} /xrdp/sesman.ini
%config (noreplace) %{_sysconfdir} /xrdp/xrdp.ini
%doc COPYING *.txt
%{_bindir} /xrdp*
%{_datadir} /xrdp/*
%{_libdir} /xrdp/*
%{_mandir} /man1/*
%{_mandir} /man5/*
%{_mandir} /man8/*
%{_prefix} /lib/initscripts/legacy-actions/xrdp
%{_sbindir} /rc*
%{_sbindir} /xrdp*
%{_sysconfdir} /xrdp/km*.ini
%{_sysconfdir} /xrdp/pulse/default.pa
%{_sysconfdir} /xrdp/xrdp_keyboard.ini
%{_unitdir} /xrdp*
%ghost %{_localstatedir} /log/xrdp-sesman.log
%config (noreplace) %{_sysconfdir} /xrdp/
%ghost %config (noreplace) %{_sysconfdir} /xrdp/rsakeys.ini
%config %{_localstatedir} /adm/fillup-templates/sysconfig.xrdp
2014-07-22 18:57:37 +00:00
%changelog