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/
#


%define _soversion 1

Name:           liblastfm
Version:        1.0.2
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
# http://cdn.last.fm/client/liblastfm-%%{version}.tar.gz
Source0:        liblastfm-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

# PATCH-FIX-UPSTREAM liblastfm-fix-no-return-in-nonvoid-function.diff
Patch0:         liblastfm-fix-no-return-in-nonvoid-function.diff

BuildRequires:  cmake
BuildRequires:  kde4-filesystem

BuildRequires:  fdupes
BuildRequires:  fftw3-devel
BuildRequires:  libqt4-devel >= 4.8.0
BuildRequires:  libsamplerate-devel

%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 liblastfm%{_soversion}
Summary:        A Qt C++ Library for the Last.fm Webservices
Group:          System/Libraries

%description -n liblastfm%{_soversion}
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:       liblastfm%{_soversion} = %{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 -n %{name}-%{version}
%patch0 -p1

%build
%{cmake_kde4}
make VERBOSE=1

%install
%{kde4_makeinstall}

%clean
rm -rf %{buildroot}

%post -n liblastfm%{_soversion} -p /sbin/ldconfig

%postun -n liblastfm%{_soversion} -p /sbin/ldconfig

%files -n liblastfm%{_soversion}
%defattr(-,root,root,-)
%{_libdir}/liblastfm.so.*
%{_libdir}/liblastfm_fingerprint.so.*

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

%changelog