File liblastfm.spec of Package liblastfm

#
# spec file for package liblastfm
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright 2009 Buschmann <buschmann23@opensuse.org>
#
# 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:           liblastfm
Version:        0.3.3
Release:        0
Summary:        A Qt C++ Library for the Last.fm Webservices
License:        GPL-3.0+
Group:          System/Libraries
Url:            http://github.com/mxcl/liblastfm
# https://download.github.com/mxcl-liblastfm-0.3.3-0-gf0b3239.zip
Source0:        mxcl-liblastfm-%{version}-0-gf0b3239.tar.bz2
# PATCH-FIX-OPENSUSE liblastfm_qmake.patch -- Fix hard-coded libdir
Patch0:         liblastfm_qmake.patch
# PATCH-FIX-OPENSUSE liblastfm-sort.patch aj@suse.de -- Sort lastfm.h to have same order each build
Patch1:         liblastfm-sort.patch
# PATCH-FIX-OPENSUSE liblastfm-ruby19.patch idoenmez@suse.de -- Fix build with Ruby 1.9
Patch2:         liblastfm-ruby19.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  fdupes
BuildRequires:  fftw3-devel
BuildRequires:  libqt4-devel >= 4.4.0
BuildRequires:  libsamplerate-devel
BuildRequires:  ruby
Requires:       ruby

%description
liblastfm is a collection of libraries to help you integrate Last.fm services
into your rich desktop software. It is officially supported software developed
by Last.fm staff.

%package -n liblastfm0
Summary:        A Qt C++ Library for the Last.fm Webservices
Group:          System/Libraries

%description -n liblastfm0
liblastfm is a collection of libraries to help you integrate Last.fm services
into your rich desktop software. It is officially supported software developed
by Last.fm staff.

%package -n liblastfm-devel
Summary:        Development Files for the Last.fm Webservices
Group:          Development/Libraries/C and C++
Requires:       liblastfm0 = %{version}
Requires:       libqt4-devel

%description -n liblastfm-devel
liblastfm is a collection of libraries to help you integrate Last.fm services
into your rich desktop software. It is officially supported software developed
by Last.fm staff.

This package contains development files for liblastfm.

%prep
%setup -qn mxcl-liblastfm-1c739eb
%patch0 -p1
%patch1
%if 0%{?suse_version} >= 1220
%patch2 -p1
%endif

%build
  export LIB=%{_lib}
  ./configure --prefix %{_prefix} --release --no-strip
  make CXXFLAGS+="%{optflags} -fPIC -fvisibility-inlines-hidden" %{?_smp_mflags} VERBOSE=1

%install
  make DESTDIR=%{buildroot} install
  %fdupes -s %{buildroot}

%clean
  rm -rf %{buildroot}

%post -n liblastfm0 -p /sbin/ldconfig

%postun -n liblastfm0 -p /sbin/ldconfig

%files -n liblastfm0
%defattr(-,root,root,-)
%doc COPYING README
%{_libdir}/liblastfm.so.0*
%{_libdir}/liblastfm_fingerprint.so.0*

%files -n liblastfm-devel
%defattr(-,root,root,-)
%{_libdir}/liblastfm_fingerprint.so
%{_libdir}/liblastfm.so
%{_includedir}/lastfm.h
%{_includedir}/lastfm

%changelog
openSUSE Build Service is sponsored by