File libtunepimp.spec of Package libtunepimp

#
# spec file for package libtunepimp (Version 0.5.3)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           libtunepimp
# Patched code is built by default.
# Use rpmbuild -D 'BUILD_ORIG 1' to build original code.
# Use rpmbuild -D 'BUILD_ORIG 1' -D 'BUILD_ORIG_ADDON 1' to build patched build plus original as addon.
BuildRequires:  curl-devel flac-devel gcc-c++ libexpat-devel libmpcdec-devel libmusicbrainz-devel libofa-devel libvorbis-devel readline-devel taglib-devel zlib-devel
%if 0%{?BUILD_ORIG}
BuildRequires:  mad-devel mpeg4ip-devel
%if 0%{?BUILD_ORIG_ADDON}
Provides:       patched_subset
%else
Provides:       %{name}-orig-addon = %{version}
Obsoletes:      %{name}-orig-addon
%endif
%else
Provides:       patched_subset
%endif
Summary:        Library That Provides Access to the MusicBrainz Server
License:        LGPL v2.1 or later
Group:          System/Libraries
Version:        0.5.3
Release:        126
# Package name for 9.1 and SLES9:
Provides:       trm
Obsoletes:      trm
%if 0%{?BUILD_ORIG}
%if ! 0%{?BUILD_ORIG_ADDON}
Obsoletes:      libtunepimp-mad
%endif
%endif
Requires:       libtunepimp5 = %{version}
Url:            http://www.musicbrainz.org/
Source:         %{name}-%{version}.tar.bz2
Patch:          %name-fixes.patch
Patch1:         %name-ltdl.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
MusicBrainz is the second generation incarnation of the CD Index. This
server is designed to enable Audio CD, MP3, and Vorbis players to
download metadata about the music they are playing.



Authors:
--------
    Adam Wozniak <adam@mudlist.eorbit.net>
    Ben Wong <cdindex@wongs.net>
    Bert Vermeulen <bert@biot.com>
    Johnny Tevessen <j.tevessen@gmx.net>
    Jukka Poikolainen <jukka.poikolainen@poikosoft.com>
    Marc E E van Woerkom <van.woerkom@netcologne.de>
    Mark A Mankins <raider@dnaco.net>
    Rick Bradey <roundeye@bellsouth.net>
    Robert Kaye <rob@emusic.com>
    Stephen van Egmond <svanegmond@home.com>
    Winston Chang <wchang3@students.wisc.edu>
    David W. Gray <david@thegray.com>

%package -n libtunepimp5
License:        LGPL v2.1 or later
Group:          System/Libraries
Requires:       %{name} >= %{version}
Summary:        Library That Provides Access to the MusicBrainz Server

%description -n libtunepimp5
MusicBrainz is the second generation incarnation of the CD Index. This
server is designed to enable Audio CD, MP3, and Vorbis players to
download metadata about the music they are playing.



Authors:
--------
    Adam Wozniak <adam@mudlist.eorbit.net>
    Ben Wong <cdindex@wongs.net>
    Bert Vermeulen <bert@biot.com>
    Johnny Tevessen <j.tevessen@gmx.net>
    Jukka Poikolainen <jukka.poikolainen@poikosoft.com>
    Marc E E van Woerkom <van.woerkom@netcologne.de>
    Mark A Mankins <raider@dnaco.net>
    Rick Bradey <roundeye@bellsouth.net>
    Robert Kaye <rob@emusic.com>
    Stephen van Egmond <svanegmond@home.com>
    Winston Chang <wchang3@students.wisc.edu>
    David W. Gray <david@thegray.com>

%if 0%{?BUILD_ORIG}
%if 0%{?BUILD_ORIG_ADDON}

%package orig-addon
License:        LGPL v2.1 or later
Group:          System/Libraries
Requires:       %{name} = %{version}
Summary:        Library That Provides Access to the MusicBrainz Server
Provides:       libtunepimp-mad
Obsoletes:      libtunepimp-mad
%if %suse_version > 1000
Supplements:    %{name}
%endif

%description orig-addon
MusicBrainz is the second generation incarnation of the CD Index. This
server is designed to enable Audio CD, MP3, and Vorbis players to
download metadata about the music they are playing.



Authors:
--------
    Adam Wozniak <adam@mudlist.eorbit.net>
    Ben Wong <cdindex@wongs.net>
    Bert Vermeulen <bert@biot.com>
    Johnny Tevessen <j.tevessen@gmx.net>
    Jukka Poikolainen <jukka.poikolainen@poikosoft.com>
    Marc E E van Woerkom <van.woerkom@netcologne.de>
    Mark A Mankins <raider@dnaco.net>
    Rick Bradey <roundeye@bellsouth.net>
    Robert Kaye <rob@emusic.com>
    Stephen van Egmond <svanegmond@home.com>
    Winston Chang <wchang3@students.wisc.edu>
    David W. Gray <david@thegray.com>

%endif
%endif

%package devel
License:        LGPL v2.1 or later
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version} libstdc++-devel
Summary:        Include Files and Libraries mandatory for Development

%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.



Authors:
--------
    Adam Wozniak <adam@mudlist.eorbit.net>
    Ben Wong <cdindex@wongs.net>
    Bert Vermeulen <bert@biot.com>
    Johnny Tevessen <j.tevessen@gmx.net>
    Jukka Poikolainen <jukka.poikolainen@poikosoft.com>
    Marc E E van Woerkom <van.woerkom@netcologne.de>
    Mark A Mankins <raider@dnaco.net>
    Rick Bradey <roundeye@bellsouth.net>
    Robert Kaye <rob@emusic.com>
    Stephen van Egmond <svanegmond@home.com>
    Winston Chang <wchang3@students.wisc.edu>
    David W. Gray <david@thegray.com>

%prep
%setup -q
%patch0 -p1
%patch1

%build
autoreconf -fiv
%if 0%{?BUILD_ORIG}
# Aliasing problems in mp4.cpp:
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%endif
%configure --disable-static --with-pic
make %{?jobs:-j%jobs}

%install
%makeinstall
%if ! 0%{?BUILD_ORIG}
rm -f $RPM_BUILD_ROOT%{_libdir}/tunepimp/plugins/mp3.tpp
rm -f $RPM_BUILD_ROOT%{_libdir}/tunepimp/plugins/mp4.tpp
%endif
rm -f %{buildroot}%{_libdir}/lib*.la

%clean
rm -rf $RPM_BUILD_ROOT

%post -n libtunepimp5 -p /sbin/ldconfig

%postun -n libtunepimp5 -p /sbin/ldconfig

%files
%defattr(-, root, root)
%doc AUTHORS ChangeLog COPYING README.LGPL TODO
%dir %{_libdir}/tunepimp
%{_bindir}/*
%dir %{_libdir}/tunepimp/plugins
%{_libdir}/tunepimp/plugins/flac.tpp
%{_libdir}/tunepimp/plugins/mpc.tpp
%{_libdir}/tunepimp/plugins/speex.tpp
%{_libdir}/tunepimp/plugins/tta.tpp
%{_libdir}/tunepimp/plugins/vorbis.tpp
%{_libdir}/tunepimp/plugins/wav.tpp
%{_libdir}/tunepimp/plugins/wma.tpp
%{_libdir}/tunepimp/plugins/wv.tpp
%if 0%{?BUILD_ORIG}
%if 0%{?BUILD_ORIG_ADDON}

%files orig-addon
%defattr(-, root, root)
%endif
%{_libdir}/tunepimp/plugins/mp3.tpp
%{_libdir}/tunepimp/plugins/mp4.tpp
%endif

%files -n libtunepimp5
%defattr(-, root, root)
%{_libdir}/lib*.so.*

%files devel
%defattr(-, root, root)
%doc examples/Makefile* examples/*c
%{_includedir}/*
%{_libdir}/lib*.so

%changelog
* Wed Aug 27 2008 crrodriguez@suse.de
- fix build, libexpat-devel buildRequire is needed here, not
  as a dependency for libmusicbrainz-devel
* Thu May 22 2008 crrodriguez@suse.de
- disable unusable static libraries
* Tue Apr 15 2008 schwab@suse.de
- Fix use of libltdl interface.
* Fri Jan 18 2008 meissner@suse.de
- added zlib-devel to BuildRequires
* Wed Oct 24 2007 meissner@suse.de
- fixed gcc43 build
* Wed Jul 25 2007 sbrabec@suse.cz
- Updated to version 0.5.3:
  * Support for FLAC 1.1.3.
  * Fixed linking of the wav plugin.
  * Fixed crash on extracting PUID from XML.
- Split package according to shared library packaging policy.
* Fri Apr 13 2007 tiwai@suse.de
- fixed build with FLAC 1.1.4.
* Fri Oct 20 2006 sbrabec@suse.cz
- Updated to version 0.5.2:
  * Case insensitive checking for the .mp3 extension
  * Fallback to ID3v2 TDRC if TDRL is not found
  * Ignore "MP3ext" in the padding area of ID3 tags
  * Removed track lookup parts of libtunepimp
  * WavPack, Speex and The True Audio metadata plugins
  * Fixed non-album tracks renaming/moving
  * Trivial change to id3tag to read tags empty ID3 frames
  * Python bindings fixes
  * Fixed checking for end of stream in Ogg Vorbis and FLAC plugins
  * Added decoding to MPC plugin
  * New acoustic fingerprint technology - MusicDNS
  * New file name format variable %%albumtracks
  * New plugins: Musepack, WMA, MP4
  * Setting TDTG frame in ID3 tags
- Do not try to build mad support in distributable build.
- Removed split mad support.
* Mon Jul 31 2006 sbrabec@suse.cz
- Fixed stack overflow in lookuptools.cpp (#191496, CVE-2006-3600).
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Jan 10 2006 sbrabec@suse.cz
- Updated to version 0.4.1.
* Wed Nov 09 2005 sbrabec@suse.cz
- Fixed devel dependencies.
- Removed unneeded static modules and .la files for modules.
- Make mad split optional.
* Thu Oct 27 2005 rguenther@suse.de
- fixes for gcc 4.1 compilation.
* Wed Apr 06 2005 adrian@suse.de
- fix linking, libtunepimp used functions from libz, but didn't
  link against.
* Wed Mar 09 2005 adrian@suse.de
- avoid dependencies to main package
* Thu Jan 13 2005 adrian@suse.de
- make libtunepimp plugable. All TRM decoders are now plugins.
  We should do the same with the MetaFile readers to get rid
  off the dependencies in libtunepimp.
* Tue Aug 10 2004 adrian@suse.de
- Provides/Obsoletes trm package
* Fri Aug 06 2004 adrian@suse.de
- update to version 0.3.0
* Fri Apr 16 2004 ro@suse.de
- remove un-neccessary version line in devel subpackage
* Sun Jan 11 2004 adrian@suse.de
- add %%run_ldconfig
* Sun Aug 17 2003 ro@suse.de
- changed dependency for devel package
* Tue Aug 12 2003 sbrabec@suse.cz
- New SuSE package from libtunepimp.