%define real_name Net-Radius

Summary:	Object-oriented Perl interface to RADIUS
Name:		perl-Net-Radius
Version:	 1.56
Release:	1%{?dist}
License:	Artistic or GPL+
Group:		Development/Libraries
URL:		http://search.cpan.org/dist/Net-Radius/
Source:		http://www.cpan.org/modules/by-module/Net/Net-Radius-%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch:	noarch
BuildRequires:	perl
BuildRequires:	perl(ExtUtils::MakeMaker)
BuildRequires:	perl(Digest::MD5)
BuildRequires:	perl(Test::More)
BuildRequires:	perl(Test::Warn)
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))

%description
Object-oriented Perl interface to RADIUS.

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

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

%install
rm -rf %{buildroot}
make pure_install PERL_INSTALL_ROOT=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
find %{buildroot} -type d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w %{buildroot}/*
find contrib/ docs/ examples/ -type f -exec %{__chmod} a-x {} \;

%clean
rm -rf %{buildroot}

%files
%defattr(-, root, root, -)
%doc Changes MANIFEST MANIFEST.SKIP META.yml
%doc README README.3COM README.VSA README.broken README.packets README.server
%doc version.pl contrib/ docs/ examples/
%{perl_vendorlib}/*
%{_mandir}/man3/*

%changelog
* Tue Mar 13 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.56-1
- initial build for Vine Linux
