File id3lib.spec of Package id3lib

#
# spec file for package id3lib (Version 3.8.3)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

Name:           id3lib
BuildRequires:  dos2unix doxygen gcc-c++ libstdc++-devel zlib-devel
License:        LGPL v2.1 or later
Group:          System/Libraries
Group:          System/Libraries
AutoReqProv:    on
Version:        3.8.3
Release:        175
Source0:        %{name}-%{version}.tar.bz2
Patch1:         id3lib-%{version}-autoconf.patch
Patch2:         id3lib-%{version}-cleanup.patch
Patch3:         id3lib-%{version}-doxygen.patch
Patch4:         id3lib-%{version}-gcc34.patch
Patch5:         id3lib-%{version}-UTF16-writing-bug.patch
Patch6:         id3lib-%{version}-zlib.patch
Patch7:         id3lib-%{version}-uninitialized.patch
Patch8:         id3lib-%{version}-tag_file.patch
Patch9:         id3lib-%{version}-missing_c_includes.patch
Patch10:        id3lib-%{version}-fix_m4_quoting.patch
Patch11:        id3lib-%{version}-unsigned_argc.patch
Patch12:        id3lib-%{version}-iomanip_h.patch
Url:            http://id3lib.sourceforge.net/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        A Library for Manipulating ID3v1 and ID3v2 tags

%description
This package provides a software library for manipulating ID3v1 and
ID3v2 tags. It provides a convenient interface for software developers
to include standards-compliant ID3v1/2 tagging capabilities in their
applications. Features include identification of valid tags, automatic
size conversions, synchronization and resynchronization of tag frames,
seamless tag compression and decompression, and optional padding
facilities.



Authors:
--------
    Scott Thomas Haug <scott@id3.org>
    John Adcock <johnadcock@hotmail.com>
    Dirk Mahoney <dirk@id3.org>

%package      devel
Summary:        Documentation and Headers for id3lib
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version} zlib-devel

%description	devel
This package contains the headers and documentation for the id3lib API
that programmers will need to develop applications which use id3lib,
the software library for ID3v1 and ID3v2 tag manipulation.



Authors:
--------
    Scott Thomas Haug <scott@id3.org>
    John Adcock <johnadcock@hotmail.com>
    Dirk Mahoney <dirk@id3.org>

%package      examples
Summary:        Example Applications for the id3lib Library
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}

%description	examples
This package contains simple example applications that make use of
id3lib, a software library for ID3v1 and ID3v2 tag manipulation.



Authors:
--------
    Scott Thomas Haug <scott@id3.org>
    John Adcock <johnadcock@hotmail.com>
    Dirk Mahoney <dirk@id3.org>

%prep
%setup -q
%patch1
%patch2
%patch3
%patch4 -p1
%patch5 -p1
%patch6
%patch7
%patch8
%patch9
%patch10
%patch11
%patch12
for i in doc/id3v2.3.0{.txt,.html}; do
  dos2unix $i
done

%build
rm acconfig.h
libtoolize --force
aclocal -I m4
autoheader
automake --add-missing --force
autoconf
export CFLAGS="$RPM_OPT_FLAGS -fstack-protector"
export CXXFLAGS="$CFLAGS"
export CXXCPP="g++ -E"
./configure --mandir=%{_mandir} \
	    --prefix=%{_prefix}  \
	    --libdir=%{_prefix}/%_lib  \
            --infodir=%{_infodir} \
            --sysconfdir=%{_sysconfdir} \
	    --enable-debug=no
make

%install
make DESTDIR=$RPM_BUILD_ROOT install
make docs
make -C examples clean
rm -rf examples/.deps
chmod 644 examples/*
# strip down the doc and examples directories so we can copy w/impunity
for i in doc/ examples/ ; do \
    find ./$i  -name 'Makefile*' -exec rm {} \; ; done

%clean
rm -rf $RPM_BUILD_ROOT

%post
%run_ldconfig

%postun
%run_ldconfig

%files
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog HISTORY NEWS README THANKS TODO
%{_prefix}/%_lib/*.so.*

%files devel
%defattr(-, root, root)
%{_prefix}/include/id3*.h
%{_prefix}/include/id3
%{_prefix}/%_lib/*.la
%{_prefix}/%_lib/*.a
%{_prefix}/%_lib/*.so
%doc doc/*.*
%doc doc/api

%files examples
%defattr(-, root, root)
%doc examples
%{_prefix}/bin/id3*
%changelog
* Tue Nov 13 2007 - lmichnovic@suse.cz
- unified names of patches to %%{name}-%%{version}-*.patch
* Tue Nov 13 2007 - lmichnovic@suse.cz
- no need to check presence of deprecated iomanip.h in configure
  (*iomanip_h.patch)
* Wed Nov 07 2007 - lmichnovic@suse.cz
- devel package doesn't require %%release any more, only %%version
- no need to include same doc in subpackages
* Wed Oct 31 2007 - pth@suse.de
- Include cstring, not string.h as the code using string functions
  is in namespace std.
- Argc is 'int', not 'unsigned int'
- Fix quoting of function names in AC_DEFUNs
- Rename the gcc43 patch to something more meaningful
- Fix files with DOS line ending.
* Mon Oct 01 2007 - coolo@suse.de
- some gcc 4.3 compilation fixes
* Wed Sep 05 2007 - ltinkl@suse.cz
- fix #307073 - VUL-0: id3lib: New id3lib3.8.3
* Thu Mar 29 2007 - rguenther@suse.de
- add zlib-devel BuildRequires
* Fri Jun 30 2006 - nadvornik@suse.cz
- linked with -lz [#189302]
- fixed uninitialized variables
* Mon Feb 20 2006 - sbrabec@suse.cz
- Fixed UTF-16 writing bug (from Spoon, thanks to Jerome Couderc).
  http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Jan 12 2006 - nadvornik@suse.cz
- compile with -fstack-protector
* Thu Aug 12 2004 - ro@suse.de
- added libpng to neededforbuild (for doxygen)
* Fri Jan 16 2004 - meissner@suse.de
- Upgraded to 3.8.3
- Added fixes necessary for gcc 3.4.
* Sat Jan 10 2004 - adrian@suse.de
- add %%run_ldconfig
* Wed Jan 08 2003 - pthomas@suse.de
- Update to 3.8.2
- Call autotools directly as autoreconf doesn't work.
- Fix detection of iconv prototype.
- Really include the documentation generated by doxygen in
  id3lib-devel.
* Tue Nov 12 2002 - nadvornik@suse.cz
- updated to 3.8.1: bugfix release
* Wed Aug 14 2002 - pthomas@suse.de
- Update to 3.8.0 final.
- Change configure.in and m4/*.m4 to make acconfig.h obsolete.
- Add explicit specialization for char_traits<unsigned char>
  to id3lib_strings.h
- Add hack to make libtool 1.4.2 use c++ for linking thus
  making it depend on the correct version of libstc++.
* Wed Jul 10 2002 - nadvornik@suse.cz
- updated to 3.8.0pre3
* Tue May 21 2002 - ro@suse.de
- use libdir
* Wed May 08 2002 - ro@suse.de
- fix compilation with gcc-3 again
  (filebuf from FILE* constructor only as gxx-extension now)
* Wed Apr 03 2002 - nadvornik@suse.cz
- fixed to compile with new autoconf
* Mon Feb 18 2002 - schwab@suse.de
- Fix for gcc 3.
* Tue Jan 08 2002 - rvasice@suse.cz
- update to version 3.8.0pre2
* Mon Aug 27 2001 - rvasice@suse.cz
- fix to build on ia64 and s390
* Thu Jun 21 2001 - rvasice@suse.cz
- initial package release (version 3.8.0)
openSUSE Build Service is sponsored by