-%define perl_sitelib %(eval "`perl -V:installsitelib`"; echo $installsitelib)
-Summary: File-Cat perl module
-Summary(pl): Modu³ perla File-Cat
+%include /usr/lib/rpm/macros.perl
+%define pdir File
+%define pnam Cat
+Summary: File::Cat perl module
+Summary(pl): Modu³ perla File::Cat
Name: perl-File-Cat
Version: 1.2
-Release: 3
-Copyright: GPL
+Release: 9
+License: GPL
Group: Development/Languages/Perl
-Group(pl): Programowanie/Jêzyki/Perl
-Source: ftp://ftp.perl.org/pub/CPAN/modules/by-module/File/File-Cat-%{version}.tar.gz
-BuildRequires: perl >= 5.005_03-10
-%requires_eq perl
-Requires: %{perl_sitearch}
-BuildRoot: /tmp/%{name}-%{version}-root
+Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: 300600b3786cec4360e88947f775f4fb
+BuildRequires: rpm-perlprov >= 4.1-13
+BuildRequires: perl-devel >= 5.6
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-File-Cat perl module - Perl implementation of cat(1).
+File::Cat perl module - Perl implementation of cat(1).
%description -l pl
-Modu³ perla File-Cat - cat(1) dla perla.
+Modu³ perla File::Cat - cat(1) dla perla.
%prep
-%setup -q -n File-Cat-%{version}
+%setup -q -n %{pdir}-%{pnam}-%{version}
%build
-perl Makefile.PL
-make
+%{__perl} Makefile.PL \
+ INSTALLDIRS=vendor
+%{__make}
%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/*