File rdesktop.spec of Package rdesktop

%define realname rdesktop
%define realver  1.7.0
%define srcext   gz

# Common info
Name:          %{realname}
Version:       %{realver}
Release:       wiz%{?extraver:0.}1
License:       GPL
Group:         Productivity/Networking/Remote Desktop
URL:           http://www.rdesktop.org/
Summary:       A Remote Desktop Protocol Client

# Build-time parameters
BuildRequires: pkgconfig pcsc-lite-devel alsa-devel
%if 0%{?suse_version}
BuildRequires: libopenssl-devel xorg-x11-util-devel xorg-x11-devel libsamplerate-devel
%else
BuildRequires: openssl-devel libX11-devel libXrandr-devel
%endif
BuildRoot:     %{_tmppath}/%{name}-root
Source:        %{realname}-%{realver}%{?extraver:%{extraver}}.tar.%{srcext}

%description
rdesktop is an open source client for Windows Remote Desktop Services,
capable of natively speaking Remote Desktop Protocol (RDP) in order to present
the user's Windows desktop. rdesktop is known to work with Windows versions
such as NT 4 Terminal Server, 2000, XP, 2003, 2003 R2, Vista, 2008, 7,
and 2008 R2.

rdesktop currently runs on most UNIX based platforms with the X Window System,
and other ports should be fairly straightforward.

# Preparation step (unpackung and patching if necessary)
%prep
%setup -q -n %{realname}-%{realver}%{?extraver:%{extraver}}

%build
%configure \
 --with-openssl=%{_prefix} \
 --with-sound=alsa \
 --with-ipv6 \
 LDFLAGS="-Wl,--as-needed -Wl,--strip-all"
%__make %{?_smp_mflags}

%install
%__make install DESTDIR=%{buildroot}

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc COPYING README doc/AUTHORS doc/ChangeLog doc/HACKING doc/TODO doc/*.txt
%{_bindir}/*
%{_datadir}/%{name}/
%doc %{_mandir}/man1/*

%changelog
openSUSE Build Service is sponsored by