Name: 		perl-ExtUtils-AutoInstall
Version: 	0.63
Release: 	2%{?_dist_release}
Summary: 	Automatic install of dependencies via CPAN
License: 	GPL+ or Artistic
Group: 		Development/Libraries
URL: 		http://search.cpan.org/dist/ExtUtils-AutoInstall/
Source: 	http://search.cpan.org/CPAN/authors/id/A/AU/AUTRIJUS/ExtUtils-AutoInstall-%{version}.tar.gz
Patch0:		eai.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

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

BuildRequires:  perl(CPANPLUS) >= 0.043
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(Sort::Versions) >= 1.2
BuildRequires:	perl(LWP::Simple)
BuildRequires:	perl(CPAN)

Vendor:         Project Vine
Distribution:   Vine Linux

%description
ExtUtils::AutoInstall lets module writers specify a more sophisticated
form of dependency information than the PREREQ_PM option offered by 
ExtUtils::MakeMaker.

%prep
%setup -q -n ExtUtils-AutoInstall-%{version}
%patch0 -p1

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor --defaultdeps
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 d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w %{buildroot}/*

%clean
rm -rf %{buildroot}

%check
make test

%files
%defattr(-,root,root,-)
# For license text(s), see the perl package
%doc Changes AUTHORS README TODO META.yml SIGNATURE
%{perl_vendorlib}/ExtUtils
%{_mandir}/man3/*

%changelog
* Thu Mar 08 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.63-2
- spec overhauled

* Wed Mar 30 2011 IWAI, Masaharu <iwai@alib.jp> 0.63-1
- build with perl 5.12.3
- apply new versioning policy

* Fri Feb 16 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.63-0vl1
- new upstream release
- changed Group to Development/Libraries

* Sat Dec  4 2004 IWAI, Masaharu <iwai@alib.jp> 0.61-0vl1
- new upstream release
- build on perl-5.8.6-0vl1

* Sun Jul  6 2003 IWAI Masaharu <iwai@alib.jp> 0.52-0vl1
- first build for Vine Linux
