Blob Blame History Raw
Name:           perl-HTML-PrettyPrinter
Version:        0.03
Release:        3%{?dist}

Summary:        Generate nice HTML files from HTML syntax trees

Group:          Development/Libraries
License:        GPL+ or Artistic
URL:            http://search.cpan.org/dist/HTML-PrettyPrinter/
Source0:        http://search.cpan.org/CPAN/authors/id/C/CL/CLMS/HTML-PrettyPrinter-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(HTML::Entities)
BuildRequires:  perl(HTML::Element)
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))


%description
HTML::PrettyPrinter produces nicely formatted HTML code from a HTML syntax
tree. It is especially useful if the produced HTML file shall be read or
edited manually afterwards. Various parameters let you adapt the output to
different styles and requirements.


%prep
%setup -q -n HTML-PrettyPrinter-%{version}
iconv -f iso8859-1 -t utf-8 PrettyPrinter.pm > PrettyPrinter.pm.conv \
&& mv -f PrettyPrinter.pm.conv PrettyPrinter.pm 


%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 -type d -depth -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 Changes README
%{perl_vendorlib}/*
%{_mandir}/man3/*3pm.gz


%changelog
* Sat Jan 12 2008 Xavier Bachelot <xavier@bachelot.org> - 0.03-3
- Fix URL:.

* Wed Jan 09 2008 Xavier Bachelot <xavier@bachelot.org> - 0.03-2
- Remove set -x and set +x from %%prep section.
- Remove '|| :' from %%check section.

* Fri Dec 21 2007 Xavier Bachelot <xavier@bachelot.org> - 0.03-1
- Initial build.