Name:           perl-Net-Frame
Summary:        the base framework for frame crafting
Version:        1.09
Release:        2%{?_dist_release}
License:        Artistic/GPL
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/Net-Frame/

Source:         http://search.cpan.org/CPAN/authors/id/G/GO/GOMOR/Net-Frame-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

BuildArch:      noarch
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl-Class-Gomor >= 1.00
BuildRequires:  perl-Net-IPv6Addr
BuildRequires:  perl-Bit-Vector
BuildRequires:  perl-Socket6

Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%description
the base framework for frame crafting.

%prep
%setup -q -n Net-Frame-%{version}

%build
%{__perl} Makefile.PL INSTALLDIRS="vendor"
%{__make} %{?_smp_mflags}

%install
%{__rm} -rf %{buildroot}
%{__make} pure_install DESTDIR=%{buildroot}

### Clean up buildroot
find %{buildroot} -name .packlist -exec %{__rm} {} \;

### Clean up docs
find examples/ -type f -exec %{__chmod} a-x {} \;

%check
%{__make} test

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-, root, root, 0755)
%doc Changes LICENSE LICENSE.Artistic MANIFEST META.yml README examples/
%doc %{_mandir}/man3/Net::Frame*.3pm*
%dir %{perl_vendorlib}/Net/
%{perl_vendorlib}/Net/Frame/
%{perl_vendorlib}/Net/Frame.pm

%changelog
* Mon Mar 05 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.09-2
- fix BuildRequires (for tests)

* Mon Mar 05 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.09-1
- initial build for Vine Linux
