# Don't create a debuginfo package since it would be empty
%define debug_package %{nil}
Summary: Real-time Audio I/O Library
Name: rtaudio
Version: 4.0.5
Release: 3%{?dist}
License: MIT
Group: System Environment/Libraries
URL: http://www.music.mcgill.ca/~gary/rtaudio/
# The original tarball contains nonfree bits. We remove them and create a free tarball:
# wget -N http://www.music.mcgill.ca/~gary/rtaudio/release/rtaudio-4.0.5.tar.gz
# tar zxf rtaudio-4.0.5.tar.gz
# rm -fr rtaudio-4.0.5/include/ rtaudio-4.0.5/tests/Windows
# tar zcf rtaudio-4.0.5-fe.tar.gz rtaudio-4.0.5
Source0: %{name}-%{version}-fe.tar.gz
# Make rtaudio compilable against gcc-4.4
# https://sourceforge.net/tracker/index.php?func=detail&aid=2644431&group_id=162430&atid=823757
Patch1: rtaudio-gcc44.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: alsa-lib-devel jack-audio-connection-kit-devel doxygen
%description
RtAudio is a set of C++ classes that provide a common API for realtime audio
input/output across different operating systems. RtAudio significantly
simplifies the process of interacting with computer audio hardware. It was
designed with the following objectives:
* object-oriented C++ design
* simple, common API across all supported platforms
* allow simultaneous multi-api support
* support dynamic connection of devices
* provide extensive audio device parameter control
* allow audio device capability probing
* automatic internal conversion for data format, channel number compensation,
(de)interleaving, and byte-swapping
%package devel
Summary: Real-time Audio I/O Library
Group: System Environment/Libraries
Provides: %{name}-static = %{version}-%{release}
%description devel
RtAudio is a set of C++ classes that provide a common API for realtime audio
input/output across different operating systems. RtAudio significantly
simplifies the process of interacting with computer audio hardware. It was
designed with the following objectives:
* object-oriented C++ design
* simple, common API across all supported platforms
* allow simultaneous multi-api support
* support dynamic connection of devices
* provide extensive audio device parameter control
* allow audio device capability probing
* automatic internal conversion for data format, channel number compensation,
(de)interleaving, and byte-swapping
%prep
%setup -q
%patch1 -p1
# We are going to build the doxygen documentation from source
rm -fr doc/html
# Remove empty directory
rm -fr tests/Debug
# To pass the optflags properly
sed -i '/CFLAGS *=/d' Makefile.in
# To fix the ppc64 compilation issue
cp -p /usr/lib/rpm/config.{sub,guess} config/
%build
export CFLAGS="%optflags -fPIC"
%configure --with-jack --with-alsa
make %{?_smp_mflags}
# Doxygen documentation:
pushd doc/doxygen
doxygen
popd
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_includedir} %{buildroot}%{_libdir}
cp -a RtAudio.h RtError.h %{buildroot}%{_includedir}
cp -a lib%{name}.a %{buildroot}%{_libdir}
%clean
rm -rf %{buildroot}
%files devel
%defattr(-,root,root,-)
%doc readme doc/release.txt doc/html doc/images tests
%{_includedir}/*.h
%{_libdir}/lib%{name}.a
%changelog
* Sat Feb 28 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 4.0.5-3
- Don't remove the tests/Release directory
* Fri Feb 27 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 4.0.5-2
- Build static library only
* Tue Feb 24 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 4.0.5-1
- Initial build