File rdesktop.spec of Package rdesktop

%define realname rdesktop
%define srcext   tar.bz2

%define dir_ver  %{realver}

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

# Build-time parameters
BuildRequires: autoconf automake libtool
BuildRequires: pkg-config
BuildRequires: pkgconfig(krb5-gssapi)
BuildRequires: pkgconfig(xrandr) pkgconfig(xcursor)
BuildRequires: pkgconfig(libtasn1)
BuildRequires: pkgconfig(nettle) pkgconfig(hogweed) pkgconfig(gnutls) >= 3.2.0
BuildRequires: pkgconfig(libpcsclite)
BuildRequires: pkgconfig(ao) pkgconfig(libpulse) pkgconfig(alsa) pkgconfig(samplerate)
BuildRoot:     %{_tmppath}/%{name}-root
Source:        http://sourceforge.net/projects/rdesktop/files/rdesktop/%{dir_ver}/%{realname}-%{version}%{?extraver}.%{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, 2008 and 2012 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}-%{version}%{?extraver}
test -x configure || autoreconf --install

%build
_CFLAGS='%{optflags} %{?gcc_lto}'
_LDFLAGS='-Wl,--as-needed -Wl,--strip-all -Wl,--no-undefined -Wl,-z,now -Wl,-z,relro %{?gcc_lto}'
%configure \
 --with-ipv6 \
 CFLAGS="$_CFLAGS" \
 LDFLAGS="$_LDFLAGS"
%{__make} %{?_smp_mflags}

%install
%{__make} install DESTDIR=%{buildroot}

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

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

%changelog
openSUSE Build Service is sponsored by