File perl-NetPacket.spec of Package perl-NetPacket
#
# spec file for package perl-NetPacket
#
# Copyright (c) 2013 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: perl-NetPacket
Version: 1.4.1
Release: 0
Summary: Assemble/disassemble network packets at the protocol level
License: Artistic-2.0
Group: Development/Libraries/Perl
Source: http://search.cpan.org/CPAN/authors/id/Y/YA/YANICK/NetPacket-%{version}.tar.gz
Patch1: perl-NetPacket-backport.patch
Patch2: perl-NetPacket-bigendian.patch
Url: http://search.cpan.org/dist/NetPacket
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires: perl-macros
%if 0%{?suse_version} > 1120
BuildRequires: perl(Test::More) >= 0.94
%endif
BuildRequires: perl(Carp)
BuildRequires: perl(Module::Build)
BuildRequires: perl(Scalar::Util)
BuildRequires: perl(constant)
BuildRequires: perl(vars)
Requires: perl(constant)
Requires: perl(vars)
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
%description
"NetPacket" provides a base class for a cluster of modules related to
decoding and encoding of network protocols. Each "NetPacket" descendent
module knows how to encode and decode packets for the network protocol it
implements. Consult the documentation for the module in question for
protocol-specific implementation.
Note that there is no inheritance in the "NetPacket::" cluster of modules
other than each protocol module being a "NetPacket". This was seen to be
too restrictive as imposing inheritance relationships (for example between
the IP, UDP and TCP protocols) would make things like tunneling or other
unusual situations difficult.
%prep
%setup -q -n "NetPacket-%{version}"
%patch1
%patch2 -p1
%build
%__perl ./Build.PL
./Build
%install
./Build pure_install --destdir "%{buildroot}" --installdirs vendor
%perl_process_packlist
%if 0%{?suse_version} > 1120
%check
./Build test
%endif
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%files
%defattr(-,root,root)
%doc README LICENSE Changes
%{perl_vendorlib}/NetPacket
%{perl_vendorlib}/NetPacket.pm
%doc %{perl_man3dir}/NetPacket.%{perl_man3ext}%{ext_man}
%doc %{perl_man3dir}/NetPacket::*.%{perl_man3ext}%{ext_man}
%changelog