+#
+# Conditional build:
+%bcond_without tests # do not perform "make test"
+#
%include /usr/lib/rpm/macros.perl
-Summary: MP3-Info perl module
-Summary(pl): Modu³ perla MP3-Info
+%define pdir MP3
+%define pnam Info
+Summary: MP3::Info - manipulate / fetch info from MP3 audio files
+Summary(pl): MP3::Info - odczyt i operowanie na informacjach z plików d¼wiêkowych MP3
Name: perl-MP3-Info
-Version: 0.91
+Version: 1.13
Release: 1
-License: GPL
+License: Artistic
Group: Development/Languages/Perl
-Group(de): Entwicklung/Sprachen/Perl
-Group(pl): Programowanie/Jêzyki/Perl
-Source0: ftp://ftp.perl.org/pub/CPAN/modules/by-module/MP3/MP3-Info-%{version}.tar.gz
-BuildRequires: rpm-perlprov >= 3.0.3-16
-BuildRequires: perl >= 5.6
-%requires_eq perl
-Requires: %{perl_sitearch}
+Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: 6f7bee09a5a78d7a6bc3a3c7cf1c3354
+BuildRequires: rpm-perlprov >= 4.1-13
+BuildRequires: perl-devel >= 1:5.8.0
Obsoletes: perl-MPEG-MP3Info
+BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-MP3-Info - fetches and manipulates info from MP3 audio files.
+MP3::Info Perl module fetches and manipulates info from MP3 audio
+files.
%description -l pl
-MP3-Info - wyci±ga i umo¿liwia operowanie na informacjach z plików
-MP3.
+Modu³ Perla MP3::Info wyci±ga informacje z plików MP3 i umo¿liwia
+operowanie na nich.
%prep
-%setup -q -n MP3-Info-%{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
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
-gzip -9nf README
+cp -f eg/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc *.gz eg
-%{perl_sitelib}/MPEG/MP3Info.pm
-%{perl_sitelib}/MP3/Info.pm
+%doc README
+%{perl_vendorlib}/MPEG
+%{perl_vendorlib}/MP3
%{_mandir}/man3/*
+%dir %{_examplesdir}/%{name}-%{version}
+%attr(755,root,root) %{_examplesdir}/%{name}-%{version}/*