-%include /usr/lib/rpm/macros.perl
-Summary: File-Cat perl module
-Summary(pl): Modu³ perla File-Cat
+#
+# Conditional build:
+%bcond_without tests # do not perform "make test"
+
+%define pdir File
+%define pnam Cat
+Summary: File::Cat - Perl implementation of cat(1)
+Summary(pl.UTF-8): File::Cat - implementacja cat(1) w Perlu
Name: perl-File-Cat
Version: 1.2
-Release: 3
-License: GPL
+Release: 11
+License: unknown
Group: Development/Languages/Perl
-Group(pl): Programowanie/Jêzyki/Perl
-Source0: ftp://ftp.perl.org/pub/CPAN/modules/by-module/File/File-Cat-%{version}.tar.gz
-BuildRequires: rpm-perlprov >= 3.0.3-16
-BuildRequires: perl >= 5.005_03-14
-%requires_eq perl
-Requires: %{perl_sitearch}
+Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: 300600b3786cec4360e88947f775f4fb
+URL: http://search.cpan.org/dist/File-Cat/
+BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: rpm-perlprov >= 4.1-13
+BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-File-Cat perl module - Perl implementation of cat(1).
+File::Cat module - Perl implementation of cat(1).
-%description -l pl
-Modu³ perla File-Cat - cat(1) dla perla.
+File::Cat is a module of adventure, danger, and low cunning. With it,
+you will explore some of the most inane programs ever seen by mortals.
+No computer should be without one!
+
+%description -l pl.UTF-8
+Moduł File::Cat - implementacja cat(1) w Perlu.
+
+File::Cat jest modułem z przygodami, niebezpiecznym i mało pomysłowym.
+Przy jego pomocy można stworzyć kilka spośród najgłupszych programów
+jakie widzieli śmiertelnicy. Na każdym komputerze powinien być choć
+jeden taki!
%prep
-%setup -q -n File-Cat-%{version}
+%setup -q -n %{pdir}-%{pnam}-%{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
-(
- cd $RPM_BUILD_ROOT%{perl_sitearch}/auto/File/Cat
- sed -e "s#$RPM_BUILD_ROOT##" .packlist >.packlist.new
- mv .packlist.new .packlist
-)
-
-gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man3/* \
- Changes
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc Changes.gz
-
-%{perl_sitelib}/File/Cat.pm
-%{perl_sitearch}/auto/File/Cat
-
+%doc Changes
+%{perl_vendorlib}/File/Cat.pm
%{_mandir}/man3/*