Summary:	SVG::Parser - XML Parser for SVG documents
Name:		perl-SVG-Parser
Version:	1.03
Release:	2%{?_dist_release}
License:	GNU/GPL 
URL:		http://search.cpan.org/~peterw/SVG-Parser/
Group:		Development/Libraries
Source0:	SVG-Parser-%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-root
BuildArch:      noarch

Requires:	perl >= 5.8.6
BuildRequires:	perl >= 5.8.6
BuildRequires:	perl(XML::Parser) perl(XML::SAX)
BuildRequires:	perl(SVG) >= 2

Vendor:		Project Vine
Distribution:   Vine Linux

%description
SVG::Parser is an XML parser for SVG Documents. It takes XML as input and produces an SVG object as its output.
SVG::Parser supports both XML::SAX and XML::Parser (Expat) parsers, with SAX preferred by default. Only one of these needs to be installed for SVG::Parser to function.
A list of preferred parsers may be specified in the import list - SVG::Parser will use the first parser that successfully loads. Some basic measures are taken to provide cross-compatability.
For more details see: http://search.cpan.org/~peterw/SVG-Parser/

%prep
%setup -q -n SVG-Parser-%{version}

%build
perl Build.PL installdirs=vendor
./Build

%check
AUTHOR_TESTING=1 ./Build test

%install
rm -rf $RPM_BUILD_ROOT 
./Build install destdir=$RPM_BUILD_ROOT

find $RPM_BUILD_ROOT \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \;
find $RPM_BUILD_ROOT/usr -type f -print | \
	sed "s@^$RPM_BUILD_ROOT@@g" | \
	grep -v perllocal.pod | \
	grep -v man3 | \
	grep -v "\.packlist" > SVG-Parser-%{version}-filelist
if [ "$(cat SVG-Parser-%{version}-filelist)X" = "X" ] ; then
    echo "ERROR: EMPTY FILE LIST"
    exit -1
fi

%clean
rm -rf $RPM_BUILD_ROOT


%files -f SVG-Parser-%{version}-filelist
%defattr(-,root,root)
%doc README CHANGES examples
%{_mandir}/man3/*
%dir %{perl_vendorlib}/SVG/Parser
%dir %{perl_vendorlib}/SVG/Parser/SAX

%changelog
* Wed Mar 30 2011 IWAI, Masaharu <iwai@alib.jp> 1.03-2
- add directories in files

* Wed Mar 30 2011 IWAI, Masaharu <iwai@alib.jp> 1.03-1
- new upstream release
- add BuildRequires: perl(XML::Parser), perl(XML::SAX), perl(SVG) >= 2
- update build, install, check section: upstream use Build.PL
- stop gzip in install section
- add documents in doc
- add Vendor tag

* Fri Jul 10 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 1.01-2
- rebuild
- applied new versioning policy

* Sat Feb 10 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.01-1vl1
- initial build for Vine Linux

* Mon Feb 05 2007 Karsten Brockmann <arcam@ccux-linux.de> 1.01-1
- Initial Release
