Name:		libsamplerate
Version:	0.1.9
Release:	3
Summary:	Sample Rate Converter for audio
License:	BSD
URL:		http://www.mega-nerd.com/SRC/
Source0:	http://www.mega-nerd.com/SRC/%{name}-%{version}.tar.gz
BuildRequires:	alsa-lib-devel gcc pkgconfig
BuildRequires:	fftw-devel >= 0.15.0 libsndfile-devel >= 1.0.6

%description
Secret Rabbit Code (aka libsamplerate) is a Sample Rate Converter for
audio. SRC is capable of arbitrary and time varying conversions; from
downsampling by a factor of 12 to upsampling by the same factor.  The
conversion ratio can also vary with time for speeding up and slowing
down effects.

%package 	devel
Summary:	The devel for %{name}
Requires:	%{name} = %{version}-%{release}, pkgconfig

%description devel
Include Files and Libraries mandatory for Development

%prep
%autosetup -n %{name}-%{version} -p1

%build
%configure --disable-dependency-tracking --disable-fftw 
%{?disable_rpath}
make %{?_smp_mflags}

%install
%make_install htmldocdir=%{_docdir}/%{name} 

%check
export LD_LIBRARY_PATH=`pwd`/src/.libs
make check
unset LD_LIBRARY_PATH

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%doc AUTHORS COPYING README
%{_docdir}/%{name}/* 
%{_bindir}/sndfile-resample
%{_libdir}/%{name}.so.*
%exclude %{_libdir}/%{name}.a
%exclude %{_libdir}/%{name}.la

%files devel
%{_includedir}/samplerate.h
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/samplerate.pc

%changelog
* Fri Aug 23 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.1.9-3
- Package init
