%define name perl-MP3-Info
%define real_name MP3-Info

Summary: Perl module to manipulate / fetch info from MP3 audio files
Name: %{name}
Version: 1.24
Release: 1%{?_dist_release}
License: Artistic
Group: Development/Libraries
URL: http://search.cpan.org/~daniel/MP3-Info/
Source: http://search.cpan.org/CPAN/authors/id/D/DA/DANIEL/%{real_name}-%{version}.tar.gz

Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildArch: noarch
BuildRequires: perl

Obsoletes: perl-MPEG-MP3Info
Provides: perl-MPEG-MP3Info = %{version}

%description
Manipulate / fetch info from MP3 audio files : winamp genres, mp3tag, mp3info.

A wrapper module is included so scripts calling MPEG::MP3Info will still work.

%prep
%setup -q -n %{real_name}-%{version}

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make

%install 
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

[ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress

find $RPM_BUILD_ROOT \( -name perllocal.pod -o -name .packlist \) -exec rm -v {} \;

find $RPM_BUILD_ROOT/usr -type f -print |
	sed "s@^$RPM_BUILD_ROOT@@g" |
	grep -v perllocal.pod |
	grep -v "\.packlist" > MP3-info-%{version}-filelist
if [ "$(cat MP3-info-%{version}-filelist)X" = "X" ] ; then
     echo "ERROR: EMPTY FILE LIST"
     exit -1
fi


%check
make test

%clean
rm -rf $RPM_BUILD_ROOT

%files -f MP3-info-%{version}-filelist
%defattr(-,root,root)

%changelog
* Thu Nov 12 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.24-1
- new upstream release
- applied new versioning policy

* Thu Aug  9 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.23-0vl1
- new upstream release
- changed Group to Development/Libraries

* Sat Jul 15 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.20-0vl1
- new upstream release
- changed Group to Development/Languages

* Mon Jan 10 2005 Satoshi MACHINO <machino@vinelinux.org> 1.10-0vl1
- new upstream release
- built with perl-5.8.6

* Sat Oct 02 2004 Satoshi MACHINO <machino@vinelinux.org> 1.02-4vl1
- rebuilt for VineLinux

* Wed Feb 25 2004 Olivier Thauvin <thauvin@aerov.jussieu.fr> 1.02-4mdk
- rebuild
- own dir

* Wed Aug 13 2003 Per 룴촽vind Karlsen <peroyvind@linux-mandrake.com> 1.02-3mdk
- rebuild for new perl
- drop Prefix tag
- don't use PREFIX
- use %%makeinstall_std macro

* Tue May 27 2003 Thierry Vignaud <tvignaud@mandrakesoft.com> 1.02-2mdk
- rebuild for new auto{prov,req}

* Fri Apr 18 2003 Fran룶췳is Pons <fpons@mandrakesoft.com> 1.02-1mdk
- 1.02.

* Tue Jul  9 2002 Pixel <pixel@mandrakesoft.com> 1.01-2mdk
- rebuild for perl 5.8.0

* Tue Mar 26 2002 Fran룶췳is Pons <fpons@mandrakesoft.com> 1.01-1mdk
- 1.01.

* Wed Jan 23 2002 Fran룶췳is Pons <fpons@mandrakesoft.com> 1.00-1mdk
- 1.00.

* Thu Nov 08 2001 Fran룶췳is Pons <fpons@mandrakesoft.com> 0.91-5mdk
- added url tag.

* Mon Oct 15 2001 Stefan van der Eijk <stefan@eijk.nu> 0.91-4mdk
- BuildRequires: perl-devel

* Wed Sep 05 2001 Fran룶췳is Pons <fpons@mandrakesoft.com> 0.91-3mdk
- update provides tag.

* Sun Jun 17 2001 Geoffrey Lee <snailtalk@mandrakesoft.com> 0.91-2mdk
- Rebuild for the latest perl.

* Tue Feb 27 2001 Fran룶췳is Pons <fpons@mandrakesoft.com> 0.91-1mdk
- 0.91.

* Mon Aug 07 2000 Fran룶췳is Pons <fpons@mandrakesoft.com> 0.80-3mdk
- added missing clean.

* Thu Aug 03 2000 Fran룶췳is Pons <fpons@mandrakesoft.com> 0.80-2mdk
- macroszifications.
- noarch.
- add doc.

* Mon Apr  3 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 0.80-1mdk
- 0.80 with new name (obsoletes perl-MPEG-MP3Info)
- fixed group
- rebuild with new perl
- fixed location

* Thu Dec  2 1999 Jerome Dumonteil <jd@mandrakesoft.com>
- typo in description

* Thu Dec  2 1999 Jerome Dumonteil <jd@mandrakesoft.com>
- first version of rpm.
