%define pkgname UNIVERSAL-isa

Name:           perl-%{pkgname}
Version:        1.20140927
Release:        1%{?_dist_release}
Summary:        Hack around module authors using UNIVERSAL::isa as a function

Group:          Development/Libraries
License:        Artistic or GPL+
URL:            http://search.cpan.org/dist/UNIVERSAL-isa/
Source0:        http://search.cpan.org/CPAN/authors/id/C/CH/CHROMATIC/UNIVERSAL-isa-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-root

BuildArch:      noarch
BuildRequires:	perl(CGI)
BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.30
BuildRequires:  perl(Test::More)

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

Vendor:         Project Vine
Distribution:   Vine Linux
Packager:       shaolin

%description
Whenever you use "isa" in UNIVERSAL as a function, a kitten using
Test::MockObject dies. Normally, the kittens would be helpless, but
if they use UNIVERSAL::isa (the module whose docs you are reading),
the kittens can live long and prosper.

This module replaces UNIVERSAL::isa with a version that makes sure
that if it's called as a function on objects which override isa,
isa will be called on those objects as a method.

In all other cases the real UNIVERSAL::isa is just called directly.


%prep
%setup -q -n UNIVERSAL-isa-%{version}
%{__perl} -pi -e 's{^#!%{__perl}\b}{##!%{__perl}}' lib/UNIVERSAL/isa.pm


%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} -depth -type d -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}/UNIVERSAL/
%{_mandir}/man3/*.3pm*


%changelog
* Sat Oct 11 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 1.20140927-1
- updated to 1.20140927
- build with perl 5.16.3

* Thu Mar 01 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.03-9
- rebuild

* Mon Feb 20 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.03-8
- initial build for Vine Linux

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

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

* Thu Jun 09 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.03-6
- Perl 5.14 mass rebuild

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.03-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Thu Dec 23 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.03-4
- 661697 rebuild for fixing problems with vendorach/lib

* Fri May 07 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.03-3
- Mass rebuild with perl-5.12.0

* Fri Dec  4 2009 Stepan Kasal <skasal@redhat.com> - 1.03-2
- rebuild against perl 5.10.1

* Wed Oct  7 2009 Marcela Mašláňová <mmaslano@redhat.com> - 1.03-1
- update to new upstream release

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.01-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

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

* Thu Nov 20 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.01-1
- update to 1.01

* Wed Mar 05 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.06-5
- rebuild for new perl

* Wed Jan 02 2008 Ralf Corsépius <rc040203@freenet.de> - 0.06-4
- Update License-tag.

* Tue Dec 11 2007 Ralf Corsépius <rc040203@freenet.de> - 0.06-3
- Add BR: perl(Test::More).

* Fri Sep  8 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.06-2
- Rebuild for FC6.

* Fri Feb 24 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.06-1
- Update to 0.06.
- New files: Changes and README.

* Tue Jan 31 2006 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.05-2
- Source URL correction.

* Tue Dec 27 2005 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.05-1
- First build.
