Name: taglib
Summary: TagLib Audio Meta-Data Library
Summary(ja): オーディオメタデータライブラリ
Version: 1.9.1
Release: 2%{?_dist_release}

Group: System Environment/Libraries
License: LGPLv2 and MPL
URL: http://taglib.github.com/

Source: http://taglib.github.com/releases/taglib-%{version}.tar.gz
Patch0:	http://www.cc.rim.or.jp/~yaz/taglib-1.4_wchar.diff
Patch2: taglib-1.5rc1-multilib.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: cmake >= 2.6.0
BuildRequires: pkgconfig
BuildRequires: zlib-devel

%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
Summary(ja): TagLib 開発用ファイル
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

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

%prep
%setup -q
#patch0 -p1 -b .wchar
%patch2 -p1 -b .multilib

%build
mkdir -p %{_target_platform}
pushd %{_target_platform}
%cmake -DWITH_ASF=1 -DWITH_MP4=1 ..
popd

make %{?_smp_mflags} -C %{_target_platform}

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

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
* Sat Jul 02 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.9.1-2
- rebuild with gcc-5.4.0

* Tue Jan 20 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 1.9.1-1
- new upstream release
- dropt Patch0

* Sun Feb 10 2013 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.8-1
- new upstream release

* Mon Sep 03 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.7.2-1
- new upstream release

* Sun Oct 17 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.6.3-1
- new upstream release
- added build option for supporting ASF and MP4 files
- added Patch2 from Fedora

* Sat Oct 02 2010 Shu KONNO <owa@bg.wakwak.com> 1.6.1-2
- rebuilt with rpm-4.8.1 for pkg-config

* 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
