File whois.spec of Package whois

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



Name:           whois
Version:        5.0.11
Release:        5
License:        GPL-2.0+
Summary:        Whois Client Program
Url:            http://www.linux.it/~md/software/
Group:          Productivity/Networking/Other
Source:         http://ftp.debian.org/debian/pool/main/w/whois/%{name}_%{version}.tar.bz2
Patch1:         whois-4.7.33-nb.patch
Patch2:         whois-5.0.11-mkpasswd-support-Owl-patched-libcrypt.diff
Patch3:         whois-5.0.11-mkpasswd-crypt_gensalt-might-change-the-prefix.diff
Patch4:         whois-5.0.11-mkpasswd-support-8bit-characters.diff
Patch5:         whois-5.0.11-mkpasswd-add-support-for-the-new-2y-blowfish-tag-CVE-2011-2483.diff
Patch6:         whois-5.0.11-mkpasswd-set-default-blowfish-rounds-to-5.diff
Patch7:         whois-5.0.11-mkpasswd-remove-obsolete-settings.diff
Patch8:         whois-5.0.11-mkpasswd-fix-compiler-warnings.diff
BuildRequires:  libidn-devel
%if 0%{?suse_version} <= 1140
BuildRequires:  libxcrypt-devel
%endif
Provides:       ripe-whois-tools
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This is a new whois (RFC 954) client rewritten from scratch by Marco
d'Itri. It is derived from and compatible with the usual BSD and RIPE
whois(1) programs. It is intelligent and can automatically select the
appropriate whois server for most queries. This package also contains
mkpasswd, a simple front-end to crypt(3).

%prep
%setup -n whois-%{version}
%patch1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
rename no nb po/no.*

%build
make all mkpasswd HAVE_LIBIDN=1 HAVE_ICONV=1 \
%if 0%{?suse_version} <= 1140
	HAVE_XCRYPT=1 \
%else
	HAVE_CRYPT_GENSALT=1 \
%endif
	CFLAGS="%{optflags}"

%install
mkdir -p %{buildroot}{/usr/bin,%{_mandir}/man1}
make BASEDIR=%{buildroot} mandir=%{_mandir} prefix=/usr \
	install install-mkpasswd install-pos
%find_lang %{name}

%clean
rm -rf  %{buildroot}

%files -f %{name}.lang
%defattr(-,root,root)
%doc README debian/changelog debian/copyright
%{_bindir}/mkpasswd
%{_bindir}/whois
%{_mandir}/man1/mkpasswd.*
%{_mandir}/man1/whois.*

%changelog