Name:           perl-Heap
Version:        0.80
Release:        2%{?_dist_release}
Summary:        Perl extension for keeping data partially sorted

Group:          Development/Libraries
License:        GPL+ or Artistic
URL:            http://search.cpan.org/dist/Heap
Source0:        http://search.cpan.org/CPAN/authors/id/J/JM/JMM/Heap-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

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

%description
The Heap collection of modules provide routines that manage a heap of 
elements. A heap is a partially sorted structure that is always able to 
easily extract the smallest of the elements in the structure (or the 
largest if a reversed compare routine is provided).

If the collection of elements is changing dynamically, the heap has less 
overhead than keeping the collection fully sorted.

The elements must be objects as described in "Heap::Elem" and all 
elements inserted into one heap must be mutually compatible - either 
the same class exactly or else classes that differ only in ways unrelated 
to the Heap::Elem interface.

%prep
%setup -q -n Heap-%{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 d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w %{buildroot}/*


%check
make test


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%doc Changes README
%{perl_vendorlib}/*
%{_mandir}/man3/*.3*


%changelog
* Mon Jun 30 2014 IWAI, Masaharu <iwaim.sub@gmail.com> 0.80-2
- build with Perl 5.16

* Fri Mar 02 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.80-1
- initial build for Vine Linux

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.80-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Fri Jun 17 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.80-9
- Perl mass rebuild

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.80-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Fri Dec 17 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.80-7
- 661697 rebuild for fixing problems with vendorach/lib

* Sun May 02 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.80-6
- Mass rebuild with perl-5.12.0

* Mon Dec  7 2009 Stepan Kasal <skasal@redhat.com> - 0.80-5
- rebuild against perl 5.10.1

* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.80-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.80-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Fri Feb  8 2008 Tom "spot" Callaway <tcallawa@redhat.com> 0.80-2
- rebuild for new perl

* Wed Aug  8 2007 Patrice Dumas <pertusus@free.fr> 0.80-1
- update to 0.80

* Tue Jul 18 2006 Patrice Dumas <pertusus@free.fr> 0.71-2
- Initial packaging
