Blob Blame History Raw
Name:           perl-XML-Tidy
Version:        1.2.54HJnFa
Release:        7%{?dist}
Summary:        Tidy indenting of XML documents

Group:          Development/Libraries
License:        GPLv2
URL:            http://search.cpan.org/dist/XML-Tidy
Source0:        http://search.cpan.org/CPAN/authors/id/P/PI/PIP/XML-Tidy-%{version}.tgz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(Math::BaseCnv)
BuildRequires:  perl(XML::XPath::XMLParser)
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))


%description
This module creates XML document objects (with inheritance from XML::XPath) to
tidy mixed-content (ie. non-data) text node indenting. There are also some
other handy member functions to compress && expand your XML document object
(into either a compact XML representation or a binary one).


%prep
%setup -q -n XML-Tidy-%{version}
for i in Tidy.pm README; do {
  iconv -f iso-8859-1 -t utf-8 $i > $i.conv \
  && mv $i.conv $i;
};
done;


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


%install
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*


%check
make test


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc README
%{_bindir}/xmltidy
%{perl_vendorlib}/*
%{_mandir}/man3/XML::Tidy.3pm.gz


%changelog
* Mon Dec  7 2009 Stepan Kasal <skasal@redhat.com> - 1.2.54HJnFa-7
- rebuild against perl 5.10.1

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

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

* Thu Mar  6 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.2.54HJnFa-4
- rebuild for new perl

* Wed Dec 26 2007 Xavier Bachelot <xavier@bachelot.org> - 1.2.54HJnFa-3
- Add missing BR:.

* Sat Dec 22 2007 Xavier Bachelot <xavier@bachelot.org> - 1.2.54HJnFa-2
- Clean up spec.

* Thu Aug 30 2007 Xavier Bachelot <xavier@bachelot.org> - 1.2.54HJnFa-1
- Initial build.