File soundtouch.spec of Package soundtouch.9257

#
# spec file for package soundtouch
#
# Copyright (c) 2015 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/
#


Name:           soundtouch
Url:            http://www.surina.net/soundtouch
Summary:        Audio Processing Library
License:        LGPL-2.1+
Group:          Productivity/Multimedia/Sound/Editors and Convertors
Version:        1.8.0
Release:        0
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  gcc-c++
BuildRequires:  libtool
BuildRequires:  pkg-config
Source:         http://www.surina.net/soundtouch/%{name}-%{version}.tar.gz
# From http://ftp.debian.org/debian/pool/main/s/soundtouch/soundtouch_1.6.0-3.debian.tar.gz
Source1:        soundstretch.1
Source99:       baselibs.conf
Patch0:         soundtouch-fix-buffer-overflow.patch
# PATCH-FIX-UPSTREAM soundtouch-throw-exception.patch https://gitlab.com/soundtouch/soundtouch/commit/a1c400eb2cff849c0e5f9d6916d69ffea3ad2c85 -- Fix issue CVE-2018-17096: Replace assert with runtime exception
Patch1:         soundtouch-throw-exception.patch
# PATCH-FIX-UPSTREAM soundtouch-avoid-assert.patch https://gitlab.com/soundtouch/soundtouch/commit/59129fa33d183e66f0a276795a59aa61a3e2fa06 -- Eliminate assert condition
Patch2:         soundtouch-avoid-assert.patch
# PATCH-FIX-UPSTREAM soundtouch-round-buffer.patch https://gitlab.com/soundtouch/soundtouch/commit/09e04252dde9ef02a7d254315b13089996afe302 -- Fix CVE-2018-17097 by rounding working buffer size
Patch3:         soundtouch-round-buffer.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
SoundTouch is an open source audio processing library that allows
changing the sound tempo, pitch and playback rate parameters
independently from each other.
*Easy-to-use implementation of time-stretch, pitch-shift and sample
 rate transposing routines.
*High-performance object-oriented C++ implementation.
*Clear and easy-to-use programming interface via a single C++ class.
*Supported audio data format : 16Bit integer or 32bit floating point
 PCM mono/stereo
*Capable of real-time audio stream processing:
 input/output latency max. ~ 100 ms.
 Processing 44.1kHz/16bit stereo sound in realtime requires a 133 Mhz
 Intel Pentium processor or better.
*Additional assembler-level and Intel-MMX instruction set optimizations
 for Intel x86 compatible processors, offering several times increase
 in the processing performance.

%package -n libSoundTouch0
Summary:        Audio Processing Library
Group:          System/Libraries

%description -n libSoundTouch0
SoundTouch is an open source audio processing library that allows
changing the sound tempo, pitch and playback rate parameters
independently from each other.

%package devel
Summary:        Audio Processing Library
Group:          Development/Languages/C and C++
Requires:       libSoundTouch0 = %{version}
Requires:       glibc-devel

%description devel
SoundTouch is an open-source audio processing library that allows
changing the sound tempo, pitch and playback rate parameters
independently from each other.

%prep
%setup -q -n %{name}
tr -d '\r' <README.html >README.html~
touch -r README.html README.html~
mv README.html~ README.html
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1

%build
./bootstrap
%configure\
	--enable-shared\
	--disable-static
make %{?_smp_mflags} pkgdocdir=%{_docdir}/%{name}

%install
%makeinstall pkgdocdir=%{_docdir}/%{name}
rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.la
# Add man page for soundstretch generated by help2man
mkdir -p %{buildroot}%{_mandir}/man1
cp %{S:1} %{buildroot}%{_mandir}/man1

%post -n libSoundTouch0 -p /sbin/ldconfig

%postun -n libSoundTouch0 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc %{_docdir}/%{name}
%{_bindir}/*
%{_mandir}/man1/*

%files -n libSoundTouch0
%defattr(-,root,root)
%{_libdir}/libSoundTouch.so.0*

%files devel
%defattr(-,root,root)
%{_datadir}/aclocal/*.m4
%{_includedir}/soundtouch
%{_libdir}/pkgconfig/*.pc
%{_libdir}/*.so

%changelog
openSUSE Build Service is sponsored by