Name:           perl-Math-BigInt-GMP
Version:        1.24
Release:        1%{?_dist_release}
Summary:        Math::BigInt::GMP Perl module
License:        GPL+ or Artistic
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/Math-BigInt-GMP/
Source0:        http://search.cpan.org/CPAN/authors/id/P/PJ/PJACKLAM/Math-BigInt-GMP-%{version}.tar.gz
BuildRequires:  gmp-devel
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(Math::BigInt) >= 1.87
BuildRequires:  perl(Test::More)
BuildRequires:  perl(Test::Pod)
BuildRequires:  perl(Test::Pod::Coverage) >= 1.08
BuildRequires:  perl(YAML)
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%{?perl_default_filter}

Vendor:         Project Vine
Distribution:   Vine Linux
Packager:       shaolin

%description
This package contains a replacement (drop-in) module for Math::BigInt's
core, Math::BigInt::Calc.pm. It needs the new versions of Math::BigInt and
Math::BigFloat as they are from Perl 5.7.x onwards.

%prep
%setup -q -n Math-BigInt-GMP-%{version}

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}

%install
make pure_install PERL_INSTALL_ROOT=%{buildroot}

find %{buildroot} -type f -name .packlist -exec rm -f {} \;
find %{buildroot} -type f -name '*.bs' -size 0 -exec rm -f {} \;
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;

%{_fixperms} %{buildroot}/*

%check
make test

%files
%doc BUGS CHANGES CREDITS LICENSE README TODO
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/Math*
%{_mandir}/man3/*

%changelog
* Mon Mar 12 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.24-1
- initial build for Vine Linux
- the newest upstream so far is 1.37 that needs perl(Math::BigInt) >= 1.993,
  better consider upgrading to 1.37 after we upgrade perl to 5.14.x
