File libtunepimp.spec of Package libtunepimp
#
# spec file for package libtunepimp
#
# Copyright (c) 2015 SUSE LINUX 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/
#
Name: libtunepimp
Version: 0.5.3
Release: 0
Summary: Library That Provides Access to the MusicBrainz Server
License: LGPL-2.1+
Group: System/Libraries
Url: http://www.musicbrainz.org/
# upstream ftp seems no longer available - see:
# ftp://ftp.musicbrainz.org/pub/musicbrainz
Source0: libtunepimp-%{version}.tar.bz2
Source1: baselibs.conf
Patch0: %{name}-fixes.patch
Patch1: %{name}-ltdl.patch
# 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: autoconf
BuildRequires: automake
BuildRequires: curl-devel
BuildRequires: flac-devel
BuildRequires: gcc-c++
BuildRequires: libexpat-devel
BuildRequires: libmpcdec-devel
BuildRequires: libmusicbrainz-devel
BuildRequires: libofa-devel
BuildRequires: libtool
BuildRequires: libvorbis-devel
BuildRequires: readline-devel
BuildRequires: taglib-devel
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?BUILD_ORIG}
BuildRequires: mad-devel
BuildRequires: mpeg4ip-devel
%if 0%{?BUILD_ORIG_ADDON}
Provides: patched_subset
%else
Provides: %{name}-orig-addon = %{version}
Obsoletes: %{name}-orig-addon < %{version}
%endif
%else
Provides: patched_subset
%endif
%if 0%{?BUILD_ORIG}
%if ! 0%{?BUILD_ORIG_ADDON}
Obsoletes: libtunepimp-mad
%endif
%endif
%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.
%package -n libtunepimp5
Summary: Library That Provides Access to the MusicBrainz Server
Group: System/Libraries
Requires: %{name} >= %{version}
%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.
%if 0%{?BUILD_ORIG}
%if 0%{?BUILD_ORIG_ADDON}
%package orig-addon
Summary: Library That Provides Access to the MusicBrainz Server
Group: System/Libraries
Requires: %{name} = %{version}
Supplements: %{name}
Provides: libtunepimp-mad
Obsoletes: libtunepimp-mad < %{version}
%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.
%endif
%endif
%package devel
Summary: Include Files and Libraries mandatory for Development
Group: Development/Libraries/C and C++
Requires: %{name} = %{version} libstdc++-devel
%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.
%prep
%setup -q
%patch0
%patch1
%build
autoreconf -fiv
%if 0%{?BUILD_ORIG}
# Aliasing problems in mp4.cpp:
export CXXFLAGS="%{optflags} -fno-strict-aliasing"
%endif
%configure \
--disable-static \
--with-pic
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
%if ! 0%{?BUILD_ORIG}
rm -f %{buildroot}%{_libdir}/tunepimp/plugins/mp3.tpp
rm -f %{buildroot}%{_libdir}/tunepimp/plugins/mp4.tpp
%endif
find %{buildroot} -type f -name "*.la" -delete -print
%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