File xrdp.spec of Package xrdp

#
# spec file for package xrdp
#
# Copyright (c) 2013 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/
#


%define _fwdefdir /etc/sysconfig/SuSEfirewall2.d/services
Name:           xrdp
Version:        0.6.1
Release:        0
Summary:        Open Source remo desktop protocol (RDP) server
License:        Apache-2.0 and GPL-2.0+
Group:          System/X11/Utilities
Url:            http://xrdp.sourceforge.net/
BuildRequires:	pam-devel openssl-devel autoconf automake libtool pkg-config libavahi-devel libX11-devel libXfixes-devel
BuildRoot:     %{_tmppath}/%{name}-%{version}-build
Source0:        http://sourceforge.net/projects/xrdp/files/xrdp/%{version}/xrdp-v%{version}.tar.gz
Source1:        xrdp.fw
Patch1:         xrdp-avahi.diff
# PATCH-FIX-OPENSUSE xrdp-lsb.patch bnc#442211 - hfiguiere@novell.com
Patch2:         xrdp-lsb.patch
# PATCH-FIX-OPENSSUE xrdp-pam.patch bnc#441750 - hfiguiere@novell.com
Patch3:         xrdp-pam.patch
Patch4:         xrdp-filter-tab-from-mstsc-on-focus-change.patch
Patch5:         xrdp-tab-from-mstsc-updated.patch
# set the default crypto level to high bnc#764044 - lzwang@suse.com
Patch6:         xrdp-change-default-crypto_level.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 -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1

%build
sh ./bootstrap
%configure
make %{?_smp_mflags}

%install
make install DESTDIR=%{buildroot}
find %{buildroot} -name '*.a' -exec rm {} \;
find %{buildroot} -name '*.la' -exec rm -f {} ';'
mkdir -p $RPM_BUILD_ROOT/%{_fwdefdir}
install -m 644 %{S:1} $RPM_BUILD_ROOT/%{_fwdefdir}/xrdp

%clean
rm -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

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

%changelog
openSUSE Build Service is sponsored by