# $Id: libid3tag.spec,v 1.9 2004/02/19 09:37:51 dude Exp $

Summary: Library for reading and writing ID3v1 and ID3v2 tags.
Summary(ja): ID3 タグを読み書きするためのライブラリ
Name: libid3tag
Version: 0.15.1b
Release: 6%{_dist_release}
Group: system
Vendor: Project Vine
Distribution: Vine Linux
Packager: inagaki

License: GPLv2
URL: https://www.underbit.com/products/mad/
Source: ftp://ftp.mars.org/pub/mpeg/%{name}-%{version}.tar.gz
Patch0: libid3tag-0.15.1b-fix_overflow.patch
Patch1: libid3tag-0.15.1b-id3v1-zero-padding.patch
Patch2: libid3tag-0.15.1b-handle-unknown-encoding.patch
Patch3: libid3tag-0.15.1b-id3v2-endless-loop.patch
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=869598
Patch4: libid3tag-0.15.1b-gperf-size_t.patch

Buildroot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: zlib-devel
BuildRequires: gcc-c++
BuildRequires: gperf
Conflicts: libmad < 0.15.1b

%description
A library for reading and (eventually) writing ID3 tags, both ID3v1 and the
various versions of ID3v2.


%package devel
Summary: Header and library for developing programs that will use libid3tag.
Summary(ja): libid3tag を使うプログラムを開発するためのライブラリ
Group: programming
Requires: %{name} = %{version}
Requires: zlib-devel

%description devel
A library for reading and (eventually) writing ID3 tags, both ID3v1 and the
various versions of ID3v2.

This package contains the header file as well as the static library needed
to develop programs that will use libid3tag for ID3 tar reading and writing.


%debug_package


%prep
%setup -q
%patch0 -p0 -b .CVE-2008-2109
%patch1 -p1 -b .zero-padding
%patch2 -p1 -b .unknown-encoding
%patch3 -p0 -b .endless-loop
%patch4 -p1 -b .gperf

touch NEWS AUTHORS ChangeLog

# Force these files to be regenerated from the .gperf sources.
rm compat.c frametype.c

cat << EOF > id3tag.pc
prefix=%{_prefix}
exec_prefix=%{_prefix}
libdir=%{_libdir}
includedir=%{_includedir}

Name: id3tag
Description: ID3 tag library
Requires:
Version: %{version}
Libs: -L%{_libdir} -lid3tag -lz
Cflags: -I%{_includedir}
EOF


%build
autoreconf -vfi
%configure --disable-static
make %{_smp_mflags}


%install
rm -rf %{buildroot}
%makeinstall
rm -vf $RPM_BUILD_ROOT%{_libdir}/*.la
install -m 644 -D id3tag.pc %{buildroot}%{_libdir}/pkgconfig/id3tag.pc


%clean
rm -rf %{buildroot}


%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig


%files 
%defattr(-, root, root)
%license COPYRIGHT
%doc CHANGES COPYING CREDITS README TODO
%{_libdir}/*.so.*


%files devel
%defattr(-, root, root)
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/*


%changelog
* Sun Sep 13 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.15.1b-6
- dropped Patch10.
- imported Patch0-4 from rawhide.

* Sun Aug 24 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.15.1b-5
- rebuild with VineSeed environment

* Sun Oct 03 2010 Shu KONNO <owa@bg.wakwak.com> 0.15.1b-4
- rebuilt with rpm-4.8.1 for pkg-config

* Fri Jul  3 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.15.1b-3
- spec in UTF-8
- added --disable-static option to %%configure

* Sun Jun 15 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.15.1b-2vl5
- rebuilt for VineSeed

* Sat Jun 07 2008 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> - 0.15.1b-2vl4
- add patch10 for fix CVE-2008-2109 (ID3_FIELD_TYPE_STRINGLIST field)
- new versioning policy
- add Vendor/Distribution tag

* Thu Mar 11 2004 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 0.15.1b-1vl1
- based on freshrpms package
- rebuild for Vine Linux
- added Japanese summary
- added %post and %postun script

* Thu Feb 19 2004 Matthias Saou <http://freshrpms.net/> - 0.15.1b-1.fr
- Update to 0.15.1b.

* Sun Nov  2 2003 Matthias Saou <http://freshrpms.net/> - 0.15.0b-4.fr
- Rebuild for Fedora Core 1.

* Wed Sep  3 2003 Matthias Saou <matthias.saou@est.une.marmotte.net>
- Fixed the -I in the pkgconfig file, thanks to Michael A. Peters.

* Thu Aug 28 2003 Matthias Saou <matthias.saou@est.une.marmotte.net>
- Added id3tag.pc required by gstreamer-plugins.
- Added zlib-devel dep to the devel package.

* Mon Jul 21 2003 Matthias Saou <matthias.saou@est.une.marmotte.net>
- Added zlib-devel build dep.

* Wed Jun 25 2003 Matthias Saou <matthias.saou@est.une.marmotte.net>
- Initial release of 0.15.0b.

