-%include /usr/lib/rpm/macros.perl
-%define pdir Text
-%define pnam PDF
+#
+# Conditional build:
+%bcond_without tests # do not perform "make test"
+
+%define pdir Text
+%define pnam PDF
Summary: Text::PDF perl module
-Summary(pl): Modu³ perla Text::PDF
+Summary(pl.UTF-8): Moduł perla Text::PDF
+%define base_version 0.29
Name: perl-Text-PDF
-Version: 0.20
+Version: %{base_version}a
Release: 1
-License: GPL
+# one module mentions License=Artistic
+License: Artistic
Group: Development/Languages/Perl
-Source0: ftp://ftp.cpan.org/pub/CPAN/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
+Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: 2fdf4c3170e53a083715888237914a9b
Patch0: %{name}-fix.patch
-BuildRequires: rpm-perlprov >= 3.0.3-16
-BuildRequires: perl >= 5.6.1
+URL: http://search.cpan.org/dist/Text-PDF/
BuildRequires: perl-Compress-Zlib
BuildRequires: perl-Font-TTF
+BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: rpm-perlprov >= 4.1-13
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Text::PDF - PDF manipulation module.
-%description -l pl
-Text::PDF umo¿liwia operowanie na plikach PDF.
+%description -l pl.UTF-8
+Text::PDF umożliwia operowanie na plikach PDF.
%prep
-%setup -q -n %{pdir}-%{pnam}-%{version}
+%setup -q -n %{pdir}-%{pnam}-%{base_version}
%patch0 -p1
%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 *txt
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc *.gz
+%doc *txt lib/Text/PDF/changes
%attr(755,root,root) %{_bindir}/*
-%{perl_sitelib}/Text/PDF
+%{perl_vendorlib}/Text/PDF.pm
+%dir %{perl_vendorlib}/Text/PDF
+%{perl_vendorlib}/Text/PDF/*.pm
%{_mandir}/man3/*