File perl-IO-Socket-INET6.spec of Package perl-IO-Socket-INET6

#
# spec file for package perl-IO-Socket-INET6
#
# 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/
#

# norootforbuild

%bcond_with test

Name:           perl-IO-Socket-INET6
%define cpan_name IO-Socket-INET6
Summary:        Object interface for AF_INET|AF_INET6 domain sockets
Version:        2.67
Release:        1
License:        GPL+ or Artistic
Group:          Development/Libraries/Perl
Url:            http://search.cpan.org/dist/IO-Socket-INET6/
#Source:         http://www.cpan.org/modules/by-module/IO/IO-Socket-INET6-%{version}.tar.gz
Source:         %{cpan_name}-%{version}.tar.bz2
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires:  perl
BuildRequires:  perl(Module::Build)
BuildRequires:  perl-macros
%if %{with test}
BuildRequires:  perl(Test::Pod) >= 1.14
BuildRequires:  perl(Test::Pod::Coverage) >= 1.04
%endif
BuildRequires:  perl(Carp)
BuildRequires:  perl(Errno)
BuildRequires:  perl(Exporter)
BuildRequires:  perl(IO::Socket)
BuildRequires:  perl(Socket)
BuildRequires:  perl(Socket6) >= 0.12
BuildRequires:  perl(strict)
BuildRequires:  perl(warnings)
Requires:       perl(Carp)
Requires:       perl(Errno)
Requires:       perl(Exporter)
Requires:       perl(IO::Socket)
Requires:       perl(Socket)
Requires:       perl(Socket6) >= 0.12
Requires:       perl(strict)
Requires:       perl(warnings)

%description
IO::Socket::INET6 provides an object interface to creating and using
   sockets in either AF_INET or AF_INET6 domains. It is built upon the
   IO::Socket interface and inherits all the methods defined by IO::Socket.

Authors:
--------
    Rafael Martinez Torres <rafael.martinez@novagnet.com>

%prep
%setup -q -n %{cpan_name}-%{version}

%build
%{__perl} Build.PL installdirs=vendor
./Build
#exclude this test as it needs IPv6 network
mv t/io_sock6.t t/io_sock6.tt

%if %{with test}

%check
#disable test suite as it doesn't work at all without being online  
#and our build hosts are completly without network interfaces
./Build test
%endif

%install
./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
%perl_gen_filelist

%clean
%{__rm} -rf $RPM_BUILD_ROOT

%files -f %{name}.files
%defattr(-,root,root,-)
%doc ChangeLog README

%changelog