-%include /usr/lib/rpm/macros.perl
-Summary: PodToHTML perl module
-Summary(pl): Modu³ perla PodToHTML
+#
+# Conditional build:
+%bcond_without tests # do not perform "make test"
+
+%define pdir PodToHTML
+Summary: PodToHTML Perl module - converts POD to HTML or PostScript
+Summary(pl.UTF-8): Moduł Perla PodToHTML - konwersja plików POD do formatu HTML lub PostScript
Name: perl-PodToHTML
-Version: 0.04
-Release: 4
-License: GPL
+Version: 0.08
+Release: 2
+# same as perl
+License: GPL v1+ or Artistic
Group: Development/Languages/Perl
-Group(pl): Programowanie/Jêzyki/Perl
-Source0: ftp://ftp.perl.org/pub/CPAN/modules/by-module//PodToHTML-%{version}.tar.gz
-BuildRequires: rpm-perlprov >= 3.0.3-16
-BuildRequires: perl >= 5.6
-BuildRequires: perl-PodParser
-BuildRequires: perl-HTML-Tree
+Source0: http://www.cpan.org/modules/by-module/Pod/PodToHTML-%{version}.tar.gz
+# Source0-md5: fec09c1e062ed4c670b6b982649e2f24
+URL: http://search.cpan.org/dist/PodToHTML/
BuildRequires: perl-HTML-Parser
BuildRequires: perl-HTML-Stream
+BuildRequires: perl-HTML-Tree
BuildRequires: perl-URI
-%requires_eq perl
-Requires: %{perl_sitearch}
+BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: rpm-perlprov >= 4.1-13
+Requires: perl-Pod-Parser
+BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define _noautoreq perl(Pod::Parser)
+
%description
-PodToHTML - converts POD to HTML or PostScript.
+PodToHTML Perl module converts POD to HTML or PostScript.
-%description -l pl
-PodToHTML - konwertuje pliki POD do formatu HTML lub PostScript.
+%description -l pl.UTF-8
+Moduł Perla PodToHTML konwertuje pliki POD do formatu HTML lub
+PostScript.
%prep
%setup -q -n PodToHTML-%{version}
%build
-perl Makefile.PL
+%{__perl} Makefile.PL \
+ INSTALLDIRS=vendor
%{__make}
+%{?with_tests:%{__make} test}
+
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
-
-gzip -9nf README
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc README.gz
+%doc README
%attr(755,root,root) %{_bindir}/podtohtml
-
-%{perl_sitelib}/Pod/*.pm
-%{perl_sitearch}/auto/PodToHTML
-
+%{perl_vendorlib}/Pod/*.pm
%{_mandir}/man[13]/*