File perl-XML-TreePP.spec of Package perl-XML-TreePP

%define realname XML-TreePP
%define realver  0.43
%define srcext   tar.gz

%{!?perl_installarchlib:%define perl_installarchlib %(perl -V:installarchlib | sed "s!.*='!!;s!'.*!!")}

# Common info
Name:          perl-%{realname}
Version:       %{realver}
Release:       wiz%{?extraver:0.}1%{?dist}
License:       Artistic-1.0 or GPL-1.0+
Group:         Development/Libraries/Perl
Url:           http://search.cpan.org/dist/XML-TreePP/
Summary:       Pure Perl implementation for parsing/writing XML documents

# Install-time parameters
Requires:      perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires:      perl(LWP) >= 5.811

# Build-time parameters
BuildArch:     noarch
BuildRequires: perl
BuildRequires: perl(LWP) >= 5.811 perl(ExtUtils::MakeMaker) perl(Test::Simple) perl(Test::More)
BuildRoot:     %{_tmppath}/%{name}-%{version}-build
Source:        http://www.cpan.org/authors/id/K/KA/KAWASAKI/XML-TreePP-%{version}.tar.gz

%description
XML::TreePP module parses an XML document and expands it for a hash tree.
This generates an XML document from a hash tree as the opposite way around.
This is a pure Perl implementation and requires no modules depended. This
can also fetch and parse an XML document from remote web server like the
XMLHttpRequest object does at JavaScript language.

%prep
%setup -q -n %{realname}-%{realver}

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

%check
%{__make} test

%install
%{__make} DESTDIR=%{buildroot} install_vendor

%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}

%files
%defattr(644,root,root,755)
%doc Changes make-dist.sh README
%dir %{perl_vendorlib}/XML
%{perl_vendorlib}/XML/TreePP.pm
%doc %{_mandir}/man3/*
%exclude %{perl_vendorarch}/auto/XML/TreePP/.packlist
%exclude %{perl_installarchlib}/perllocal.pod

%changelog
openSUSE Build Service is sponsored by