%define pkgname XML-Simple

Summary: Easy API to maintain XML (esp config files).
Name: perl-%{pkgname}
Version: 2.18
Release: 2%{?_dist_release}
Group: Development/Libraries
License: Artistic
URL: http://search.cpan.org/author/GRANTM/%{pkgname}-%{version}/

Source: http://search.cpan.org/CPAN/authors/id/G/GR/GRANTM/%{pkgname}-%{version}.tar.gz

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: perl(XML::Parser)
BuildRequires: perl(XML::SAX)
BuildRequires: perl(XML::NamespaceSupport)
BuildRequires: perl(XML::LibXML)
BuildRequires: perl(Test::More)
BuildArch: noarch

%description
The XML::Simple module provides a simple API layer on top of an
underlying XML parsing module (either XML::Parser or one of the SAX2
parser modules).  Two functions are exported: "XMLin()" and
"XMLout()".

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

%build
perl Makefile.PL INSTALLDIRS=vendor
make

%install
rm -rf %{buildroot}
make install DESTDIR=$RPM_BUILD_ROOT
rm -f %{buildroot}/%{perl_archlib}/perllocal.pod
rm -rf %{buildroot}/%{perl_vendorarch}/auto/

%check || :
make test

%clean
rm -rf %{buildroot}

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

%changelog
* Sat Apr 30 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.18-2
- rebuild with perl-5.12.3

* Sat May 31 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.18-1
- applied new versioning policy
- rebuilt with perl-5.10.0-2

* Sun Sep 30 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.18-0vl1
- new upstream
- changed Group to Development/Libraries

* Thu Jul 13 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.14-0vl2
- changed Group to Development/Languages
- installed to vendor_perl

* Thu Mar 16 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 2.14-0vl1
- initial build for Vine Linux

* Thu Oct 30 2003 Axel Thimm <Axel.Thimm@physik.fu-berlin.de>
- Updated to 2.09.

* Mon Apr  7 2003 Axel Thimm <Axel.Thimm@physik.fu-berlin.de>
- Update to 2.03.
- Rewritten specfile with new macros.

* Fri Jan 3 2003 Axel Thimm <Axel.Thimm@physik.fu-berlin.de>
- Initial build (cpan2rpm).
