Summary: TagLib Audio Meta-Data Library
Name: taglib
Version: 1.6.1
Release: 1%{?_dist_release}
License: LGPL/MPL
Group: System Environment/Libraries
Source: http://developer.kde.org/~wheeler/files/src/taglib-%{version}.tar.gz
Patch0:	http://www.cc.rim.or.jp/~yaz/taglib-1.4_wchar.diff
URL: http://developer.kde.org/~wheeler/taglib.html
Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: zlib-devel
BuildRequires: cmake >= 2.6.0

%description
TagLib is a library for reading and editing the meta-data of 
several popular audio formats. Currently it supports both ID3v1 
and ID3v2 for MP3 files, Ogg Vorbis comments and ID3 tags 
and Vorbis comments in FLAC files. 

%package devel
Summary: TagLib Development environment
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
Libraries and header files required for TagLib development.

%prep
%setup -q
%patch0 -p1 -b .wchar

%build
mkdir %{name}-build
pushd %{name}-build
%cmake ..
popd
make %{?_smp_mflags} -C %{name}-build

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT -C %{name}-build

rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc AUTHORS COPYING.* NEWS
%{_libdir}/lib*.so.*

%files devel
%defattr(-,root,root)
%{_bindir}/*
%{_includedir}/taglib
#{_libdir}/lib*.la
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc

%changelog
* Fri Jan  1 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.6.1-1
- new upstream release
- used cmake for building

* Sun Jul 21 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.5-1
- new upstream release
- removed lib*.la files

* Mon Jun 18 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.4-0vl3
- rebuilt with new toolchain

* Thu Nov 30 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 1.4-0vl2
- add wchar.diff (patch0)
  cf. http://mail.kde.org/pipermail/taglib-devel/2006-November/000532.html

* Sat Jan 28 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 1.4-0vl1
- source upgrade
- add BuildRequires: zlib-devel
- add taglib.pc to devel package

* Thu Oct 21 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.3-0vl1
- source upgrade

* Wed Jun 16 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.1-0vl2
- add all files under %%{_includedir}/taglib to devel package

* Tue Jun 15 2004 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 1.1-0vl1
- Initial packaging
