File libtunepimp.spec of Package libtunepimp

#
# spec file for package libtunepimp (Version 0.5.3)
#
# Copyright (c) 2009 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:        140
# 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
%patch -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