File libechonest.spec of Package libechonest
#
# spec file for package libechonest
#
# Copyright (c) 2013 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/
#
%define _major_version 2
%define _minor_version 1
%define _patch_version 0
%define soname %{_major_version}_%{_minor_version}
Name: libechonest
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: libqjson-devel
BuildRequires: libqt4-devel
Version: %{_major_version}.%{_minor_version}.%{_patch_version}
Release: 0
Source0: libechonest-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: https://projects.kde.org/libechonest
# main package
Summary: Qt library for communicating with The Echo Nest
License: GPL-2.0+
Group: System/Libraries
%description
It currently supports almost all of the features of the Echo Nest API, including all the API functions.
# bin package
%package -n libechonest%{soname}
Summary: Qt library for communicating with The Echo Nest
Group: System/Libraries
%description -n libechonest%{soname}
It currently supports almost all of the features of the Echo Nest API, including all the API functions.
# devel package
%package -n libechonest-devel
Summary: Qt library for communicating with The Echo Nest
Group: Development/Libraries/C and C++
Requires: libechonest%{soname} = %{version}
%description -n libechonest-devel
It currently supports almost all of the features of the Echo Nest API, including all the API functions.
%prep
%setup -q -n libechonest-%{version}
%build
export CXXFLAGS="%{optflags}"
export CFLAGS="%{optflags}"
cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
%if "%{_lib}" == "lib64"
-DLIB_SUFFIX=64
%endif
make VERBOSE=1 %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install
%clean
rm -rf %{buildroot}
%post -n libechonest%{soname} -p /sbin/ldconfig
%postun -n libechonest%{soname} -p /sbin/ldconfig
%files -n libechonest%{soname}
%defattr(-,root,root,-)
%{_libdir}/libechonest*.so.*
%files -n libechonest-devel
%defattr(-,root,root,-)
%{_libdir}/libechonest.so
%{_includedir}/echonest/
%{_libdir}/pkgconfig/libechonest.pc
%changelog