File libresample.spec of Package libresample

#
# spec file for package libresample
#
# Copyright (c) 2017 SUSE LINUX 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 sover  1
%define libname %{name}%{sover}
Name:           libresample
Version:        0.1.3
Release:        0
Summary:        A real-time library for audio sampling rate conversion
License:        LGPL-2.1+
Group:          Development/Libraries/C and C++
Url:            http://ccrma-www.stanford.edu/~jos/resample/Free_Resampling_Software.html
Source:         %{name}-%{version}.tar.bz2
Patch0:         libresample-0.1.3-shlib-cmake.patch
Patch1:         libresample-0.1.3-shlib-cmake-pkgconfig.patch
Patch2:         libresample-fix--0.1.3-shlib-cmake-pkgconfig.patch
BuildRequires:  cmake
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(samplerate)
BuildRequires:  pkgconfig(sndfile)
#BuildRequires:  doxygen
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
A real-time library for audio sampling rate conversion providing
several features relative to resample-1.7 on which it is based:

    * Input and output signals are in memory (as opposed to sound
      files).

    * Computations are in floating-point (instead of fixed-point).

    * Filter table increased by a factor of 32, yielding more accurate
      results, even without linear interpolation (which also makes it
      faster).

    * Data can be processed in small chunks, enabling time-varying
      resampling ratios (ideal for time-warping applications and
      supporting an ``external clock input'' in software).

    * Easily applied to any number of simultaneous data channels

%package -n %{libname}
Summary:        A real-time library for audio sampling rate conversion
Group:          System/Libraries

%description -n %{libname}
A real-time library for audio sampling rate conversion providing
several features relative to resample-1.7 on which it is based:

    * Input and output signals are in memory (as opposed to sound
      files).

    * Computations are in floating-point (instead of fixed-point).

    * Filter table increased by a factor of 32, yielding more accurate
      results, even without linear interpolation (which also makes it
      faster).

    * Data can be processed in small chunks, enabling time-varying
      resampling ratios (ideal for time-warping applications and
      supporting an ``external clock input'' in software).

    * Easily applied to any number of simultaneous data channels

%package devel
Summary:        Development files for libresample
Group:          Development/Libraries/C and C++
Requires:       %{libname} = %{version}-%{release}

%description devel
Development files for libresample.

%prep
%setup -q
%patch0 -p1
%patch1 -p1 -b .pkgconfig
%patch2 -p1

%build
%cmake
make VERBOSE=1 %{?_smp_mflags}

%install
%cmake_install

#%%check
#cd build
#ctest .

%post   -n libresample%{sover} -p /sbin/ldconfig
%postun -n libresample%{sover} -p /sbin/ldconfig

%files -n libresample%{sover}
%defattr(-,root,root,-)
%doc LICENSE.txt README.txt
#%%{_bindir}/compareresample
#%%{_bindir}/resample-sndfile
%{_libdir}/libresample.so.*

%files devel
%defattr(-,root,root,-)
%doc LICENSE.txt README.txt
#%%doc docs/html
%{_includedir}/libresample.h
%{_libdir}/libresample.so
%{_libdir}/pkgconfig/libresample.pc

%changelog
openSUSE Build Service is sponsored by