File marsyas.spec of Package marsyas
#
# spec file for package marsyas
#
# Copyright (c) 2014 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 soname 0
Name:           marsyas
Version:        0.4.8
Release:        0
Summary:        Music Analysis, Retrieval and Synthesis for Audio Signals
License:        GPL-2.0
Group:          Productivity/Multimedia/Video/Editors and Convertors
Url:            http://marsyas.sness.net/
Source0:        %{name}-%{version}.tar.bz2
#PATCH-FIX-UPSTREAM marsyas-0.4.8_build.patch avvissu@yandex.ru -- Fix shared library and build on 64 bit
Patch0:         marsyas-0.4.8_build.patch
#PATCH-FIX-UPSTREAM incorrect-fsf-address.patch avvissu@yandex.ru -- Fix wrong fsf address
Patch1:         incorrect-fsf-address.patch
BuildRequires:  alsa-devel
BuildRequires:  cmake
BuildRequires:  doxygen
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  make
BuildRequires:  texinfo
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version}
BuildRequires:  fdupes
%endif
%description
Open source software framework for audio processing with specific emphasis on
Music Information Retrieval applications. It has been designed and written by
George Tzanetakis (gtzan@cs.uvic.ca) with help from students and researchers
from around the world. Marsyas has been used for a variety of projects in both
academia and industry.
%package -n     lib%{name}%{soname}
Summary:        Library for %{name}
License:        GPL-2.0
Group:          System/Libraries
%description -n lib%{name}%{soname}
Open source software framework for audio processing with specific emphasis on
Music Information Retrieval applications. It has been designed and written by
George Tzanetakis (gtzan@cs.uvic.ca) with help from students and researchers
from around the world. Marsyas has been used for a variety of projects in both
academia and industry.
%package devel
Summary:        Development file for %{name}
Group:          Development/Libraries/C and C++
Requires:       alsa-devel
Requires:       lib%{name}%{soname} = %{version}
%description devel
This package contains development files (headers, shared library links) and
is needed to build applications with %{name}
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
export CFLAGS="%{optflags}"
export CXXFLAGS="%{optflags}"
mkdir build
pushd build
# FIXME: you should use %%cmake macros
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} ../src
#cmake ../doc
make %{?_smp_mflags}
popd
%install
pushd build
make DESTDIR=%{buildroot} install %{?_smp_mflags}
popd
%if 0%{?suse_version}
%fdupes -s %{buildroot}
%endif
%post   -n lib%{name}%{soname} -p /sbin/ldconfig
%postun -n lib%{name}%{soname} -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_bindir}/WHaSp
%{_bindir}/aim
%{_bindir}/audioCompare
%{_bindir}/bextract
%{_bindir}/extractBassFeatures
%{_bindir}/extractMoodFeatures
%{_bindir}/extractRhythmFeatures
%{_bindir}/helloWorld
%{_bindir}/ibt
%{_bindir}/kea
%{_bindir}/mirex_extract
%{_bindir}/mirex_train_and_predict
%{_bindir}/mkcollection
%{_bindir}/mudbox
%{_bindir}/onsets
%{_bindir}/orcarecord
%{_bindir}/peakClustering
%{_bindir}/peakClustering2
%{_bindir}/peakClusteringEval
%{_bindir}/peakSynth
%{_bindir}/phasevocoder
%{_bindir}/pitchdtw
%{_bindir}/pitchdtw_pair
%{_bindir}/pitchextract
%{_bindir}/record
%{_bindir}/rhythmMap
%{_bindir}/sfinfo
%{_bindir}/sfplay
%{_bindir}/sfplugin
%{_bindir}/sound2png
%{_bindir}/sound2sound
%{_bindir}/speakerSeg
%{_bindir}/speakerSeg2
%{_bindir}/tempo
%{_bindir}/virtualsensor
%{_bindir}/wreckBeach
%files -n lib%{name}%{soname}
%defattr(-,root,root)
%{_libdir}/lib%{name}.so.*
%files devel
%defattr(-,root,root)
%{_libdir}/lib%{name}.so
%dir %{_includedir}/%{name}
%{_includedir}/%{name}/*.h
%changelog