%define module	Image-Size
%define name	perl-%{module}
%define version 3.232
%define release 1%{_dist_release}

Name: 		%{name}
Version:	%{version}
Release:	%{release}
Summary:	Read the dimensions of an image in several popular formats
License:	Artistic and GPL
Group:          Development/Libraries
URL:		http://search.cpan.org/dist/%{module}

Source0:        http://search.cpan.org/CPAN/authors/id/R/RJ/RJRAY/%{module}-%{version}.tar.gz

BuildRoot:	%{_tmppath}/%{name}-%{version}-root
BuildArch:	noarch
BuildRequires:  perl(Compress::Zlib)
BuildRequires:	perl(File::Spec) >= 0.8
BuildRequires:	perl(Module::Build) >= 0.4
BuildRequires:	perl(Test::More) >= 0.80
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires:       perl(Compress::Zlib)

Vendor:         Project Vine
Distribution:   Vine Linux

%description
Image::Size is a library based on the image-sizing code in the wwwimagesize
script, a tool that analyzes HTML files and adds HEIGHT and WIDTH tags to
IMG directives.

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

pushd lib/Image/
iconv -f iso-8859-1 -t utf-8 -o Size.pm{.utf8,}
mv Size.pm{.utf8,}
popd


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

%install
rm -rf %{buildroot}
%{__make} pure_install DESTDIR=%{buildroot}

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

%{_fixperms} %{buildroot}/*

%check
%{__make} test

%clean 
rm -rf %{buildroot}


%files
%defattr(-,root,root)
%{_bindir}/*
%{_mandir}/*/*
%{perl_vendorlib}/Image
#{perl_vendorlib}/auto/Image


%changelog
* Fri Dec 12 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 3.232-1
- updated to 3.232
- dropt Source1 which doesn't need any more
- built with perl 5.16.3

* Fri Mar 09 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 3.2-1
- updated to 3.2; spec revamped based on Fedora's 3.2-8

* Sat Apr 30 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.1-3
- rebuild with perl-5.12.3

* Sun Feb 15 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 3.1.1-2
- added BuildRequires: perl-Test-Pod, perl-Test-Pod-Coverage
- changed Group to Development/Libraries

* Mon May 05 2008 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> - 3.1.1-1
- rebuild with perl 5.10
- new versioning policy

* Sun Mar 02 2008 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 3.1.1-0vl1
- built for release

* Sun Mar 02 2008 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 3.1.1-0vl0.1
- test package for VineSeed
- new upstream release 
- add Vendor/Distribution tag

* Thu Jul 05 2007 Guillaume Rousse <guillomovitch@mandriva.org> 3.01-1mdv2008.0
+ Revision: 48726
- switch to Module::Build

  + Olivier Thauvin <nanardon@mandriva.org>
    - buildrequires
    - 3.01


* Mon Jul 17 2006 Christiaan Welvaart <cjw@daneel.dyndns.org> 1:3.0-2
- add BuildRequires: perl-Compress-Zlib

* Fri Jun 16 2006 Guillaume Rousse <guillomovitch@mandriva.org> 1:3.0-1mdv2007.0
- new version
- rpmbuildupdate aware
- spec cleanup
- better summary

* Tue Jan 18 2005 Abel Cheung <deaddog@mandrake.org> 2.992-3mdk
- rebuild

* Tue Aug 12 2003 Per ﾘyvind Karlsen <peroyvind@linux-mandrake.com> 2.992-2mdk
- rebuild for new perl
- use %%makeinstall_std macro

* Mon Jul 21 2003 Fran輟is Pons <fpons@mandrakesoft.com> 2.992-1mdk
- 2.992.

