Summary: Fast, high-quality sample rate conversion library
Name: zita-resampler
Version: 0.1.1
Release: 5%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: http://www.kokkinizita.net/linuxaudio/zita-resampler/resampler.html
Source0: http://www.kokkinizita.net/linuxaudio/downloads/zita-resampler-%{version}.tar.bz2
# abort() in undefined in the header file unless we #include <stdlib.h>
# Patch sent upstream via email as there is no bug tracker
Patch0: zita-resampler-fix-include.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libsndfile-devel
%description
zita-resampler is a C++ library for resampling audio signals. It is
designed to be used within a real-time processing context, to be fast,
and to provide high-quality sample rate conversion.
The library operates on signals represented in single-precision
floating point format. For multichannel operation both the input and
output signals are assumed to be stored as interleaved samples.
The API allows a trade-off between quality and CPU load. For the
latter a range of approximately 1:6 is available. Even at the highest
quality setting zita-resampler will be faster than most similar
libraries, e.g. libsamplerate.
%package devel
Summary: Development libraries and headers for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
This package contains the headers and development libraries for %{name}.
%prep
%setup -q
%patch0 -p1 -b .fix.include
# To make sure to have the correct Fedora specific flags:
sed -i 's|-O2|%{optflags} -I../libs|' libs/Makefile
sed -i 's|-O3|%{optflags} -I../libs|' apps/Makefile
%build
export LDFLAGS="-L../libs"
make %{?_smp_mflags} -C libs
# In order to build apps, we need to create the symlink
# Note that this is originally done at "make install" stage
ln -sf libzita-resampler.so.%{version} libs/libzita-resampler.so
make %{?_smp_mflags} -C apps
%install
rm -rf %{buildroot}
make PREFIX=%{buildroot}%{_prefix} LIBDIR=%{_lib} -C libs install
# The application name is too generic. Just rename:
mkdir -p %{buildroot}%{_bindir}
install -pm 755 apps/resample %{buildroot}%{_bindir}/zita-resample
%clean
rm -rf %{buildroot}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING
%{_libdir}/lib%{name}.so.*
%{_bindir}/zita-resample
%files devel
%defattr(-,root,root,-)
%doc docs/*
%{_includedir}/%{name}.h
%{_libdir}/lib%{name}.so
%changelog
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Aug 04 2010 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 0.1.1-3
- Fix header includes
* Sat Apr 10 2010 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 0.1.1-2
- Fix libdir on non-*x86* systems
* Sat Apr 10 2010 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> - 0.1.1-1
- Update to 0.1.1
- Prepare package for Fedora (specfile from PlanetCCRMA)
* Wed Oct 29 2008 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu> 0.1.0-1
- initial release