+#
+# Conditional build:
+%bcond_with tests # perform "make test" (uses network!)
+#
%include /usr/lib/rpm/macros.perl
-%define pdir Net
-%define pnam Whois
+%define pdir Net
+%define pnam Whois
Summary: Net::Whois perl module
-Summary(pl): Modu³ perla Net::Whois
+Summary(pl.UTF-8): Moduł perla Net::Whois
Name: perl-Net-Whois
Version: 1.9
-Release: 7
-License: GPL
+Release: 9
+# same as perl
+License: GPL v1+ or Artistic
Group: Development/Languages/Perl
Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
# Source0-md5: c461a0f8991d9df848f66c4189971af7
BuildRequires: rpm-perlprov >= 4.1-13
-BuildRequires: perl-devel >= 5.6
+BuildRequires: perl-devel >= 1:5.8.0
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Net::Whois - Get and parse "whois" data from InterNIC.
-%description -l pl
-Net::Whois - wsparcie dla us³ugi "whois".
+%description -l pl.UTF-8
+Net::Whois - wsparcie dla usługi "whois".
%prep
%setup -q -n %{pdir}-%{pnam}-%{version}
INSTALLDIRS=vendor
%{__make}
+%{?with_tests:%{__make} test}
+
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT