File xrdp.spec of Package xrdp

#
# spec file for package xrdp (Version 0.4.1)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#


Url:            http://xrdp.sourceforge.net/

Name:           xrdp
Version:        0.4.1
Release:        16
License:        GPL v2 or later
Requires:       dbus-1 xorg-x11-libXau xorg-x11-server-dmx xorg-x11-server-rdp
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  dbus-1-devel gcc-c++ glibc-devel libavahi-devel openssl-devel pam-devel pkg-config xorg-x11-libXau-devel
Group:          System/X11/Utilities
Summary:        Open Source remo desktop protocol (RDP) server
Source:         http://dl.sf.net/xrdp/xrdp-%{version}.tar.bz2
Patch0:         xrdp-0.4.1..48f00f.diff.bz2
Patch1:         xrdp-NOMAD.diff
Patch2:         xrdp-avahi.diff
# PATCH-FIX-OPENSUSE xrdp-lsb.patch bnc442211 - hfiguiere@novell.com
Patch3:         xrdp-lsb.patch

%description
A full functionnal Linux terminal server, capable of accepting
connection from rdesktop and Microsoft's own terminal server / remote
desktop clients.



%prep
%setup
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p0
%{__perl} -pi.orig -e 's|/lib\b|/%{_lib}|g' instfiles/*.sh

%build
sh ./bootstrap
%configure
make

%install
%{__make} install DESTDIR=$RPM_BUILD_ROOT
chmod a-x %{buildroot}%{_sysconfdir}/xrdp/*.ini
rm -f %{buildroot}/%{_libdir}/%{name}/*.*a
ln -sf %{_sysconfdir}/init.d/xrdp %{buildroot}/%{_sbindir}/rcxrdp

%clean
rm -rf "$RPM_BUILD_ROOT"

%post
/sbin/ldconfig
#{fillup_and_insserv -f -y xrdp}
/usr/bin/xrdp-keygen xrdp /etc/xrdp/rsakeys.ini

%preun
%stop_on_removal xrdp

%postun
/sbin/ldconfig
%restart_on_update xrdp
%{insserv_cleanup}

%files
%defattr(-,root,root)
%doc COPYING *.txt 
%{_libdir}/xrdp/
%{_sysconfdir}/init.d/xrdp
%doc %{_mandir}/man5/*.5*
%doc %{_mandir}/man8/*.8*
%{_bindir}/xrdp*
%{_sbindir}/*
%{_datadir}/xrdp/
%config(noreplace) %{_sysconfdir}/xrdp/
%config(noreplace) %{_sysconfdir}/pam.d/xrdp-sesman

%changelog
* Sun Nov 23 2008 davidr@novell.com
- Use authorization files for all sessions. (bnc#442223)
- USe authorization file for X11rdp. (bnc#442223)
* Tue Nov 18 2008 davidr@novell.com
- Fix initial screen resolution.
* Wed Nov 12 2008 davidr@novell.com
- Fix X server startup issue.
  * Avoid using unix domain socket files to determine the
  presence of X servers.
* Fri Nov 07 2008 hfiguiere@suse.de
- Remove fuzz from xrdp-avahi.diff
- Add xrdp-lsb.patch
  * Make the init script LSB compliant (bnc#442211)
* Fri Nov 07 2008 hfiguiere@suse.de
- Add /usr/sbin/rcxrdp (bnc#442692)
* Thu Nov 06 2008 ro@suse.de
- fix last change (just adding "#" does not work for
  multiline rpm macros)
* Wed Nov 05 2008 hfiguiere@suse.de
- Don't enable xrdp by default (bnc#441742)
* Mon Oct 27 2008 davidr@novell.com
- Include .so files for modules.
* Mon Oct 27 2008 davidr@novell.com
- Update xrdp-NOMAD.diff
  * Fix zlib compression.
* Sun Oct 12 2008 hfiguiere@suse.de
- Update xrdp-NOMAD.diff
  * Fix openSUSE branding
* Wed Oct 08 2008 hfiguiere@suse.de
- Update xrdp-avahi.diff
  * remove warnings for missing prototypes.
* Wed Sep 17 2008 hfiguiere@suse.de
- Update xrdp-NOMAD.diff
  * Fix Xdmx command line arguments
  * Fix session data matching for XDMX sessions
* Thu Sep 11 2008 hfiguiere@suse.de
- Add Avahi support.
- More comprehensive support of NOMAD.
* Tue Sep 02 2008 hfiguiere@suse.de
- Initial release.
openSUSE Build Service is sponsored by