File libmusicbrainz.spec of Package libmusicbrainz

#
# spec file for package libmusicbrainz
#
# Copyright (c) 2011 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:           libmusicbrainz
BuildRequires:  gcc-c++ libexpat-devel
BuildRequires:  libtool pkg-config
Summary:        Library That Provides Access to the MusicBrainz Server
License:        LGPL-2.1+
Group:          System/Libraries
Version:        2.1.5
Release:        16
Url:            http://www.musicbrainz.org/
Source:         %{name}-%{version}.tar.bz2
Patch0:         libmusicbrainz-2.1.5-gcc43.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.

%package -n libmusicbrainz4
License:        LGPL-2.1+
Group:          System/Libraries
Summary:        Library That Provides Access to the MusicBrainz Server
Provides:       %{name} = %{version}
Obsoletes:      %{name} < %{version}

%description -n libmusicbrainz4
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 devel
License:        LGPL-2.1+
Group:          Development/Libraries/C and C++
Requires:       libmusicbrainz4 = %{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.

%prep
%setup -q
%patch0 -p1

%build
autoreconf -fiv
%configure --disable-static --with-pic
%{__make} %{?jobs:-j%jobs}

%install
%makeinstall
rm -f %{buildroot}%{_libdir}/libmusicbrainz.la

%clean
rm -rf $RPM_BUILD_ROOT

%post -n libmusicbrainz4 -p /sbin/ldconfig

%postun -n libmusicbrainz4 -p /sbin/ldconfig

%files -n libmusicbrainz4
%defattr(-, root, root)
%doc AUTHORS COPYING ChangeLog README TODO
%{_libdir}/libmusicbrainz.so.4*

%files devel
%defattr(-, root, root)
%doc examples/*cpp examples/*c
%{_includedir}/musicbrainz
%{_libdir}/libmusicbrainz.so
%{_libdir}/pkgconfig/*.pc

%changelog