Blob Blame History Raw
Summary:        Real-time Audio I/O Library
Name:           rtaudio
Version:        4.0.7
Release:        1%{?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:
#    VERSION=4.0.7
#    wget -N http://www.music.mcgill.ca/~gary/rtaudio/release/rtaudio-$VERSION.tar.gz
#    tar zxf rtaudio-$VERSION.tar.gz
#    rm -fr rtaudio-$VERSION/include/ rtaudio-$VERSION/tests/Windows
#    tar zcf rtaudio-$VERSION-fe.tar.gz rtaudio-$VERSION
Source0:        %{name}-%{version}-fe.tar.gz
# Upstream supports shared libraries, but they don't put proper sonames. Fix:
Patch0:         %{name}-fix-soname.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  alsa-lib-devel
BuildRequires:  jack-audio-connection-kit-devel
# No longer providing static library only
Obsoletes:      rtaudio-devel < 4.0.7

%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
Requires:       %{name} = %{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
%patch0 -p1 -b .soname

# 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}

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_includedir} %{buildroot}%{_libdir}
cp -a RtAudio.h RtError.h %{buildroot}%{_includedir}
cp -a lib%{name}.so* %{buildroot}%{_libdir}

%clean
rm -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%doc readme doc/release.txt
%{_libdir}/lib%{name}.so.*

%files devel
%defattr(-,root,root,-)
%doc doc/html doc/images tests
%{_includedir}/*.h
%{_libdir}/lib%{name}.so

%changelog
* Fri Feb 05 2010 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 4.0.7-1
- Update to 4.0.7
- Upstream is supporting shared libraries now. Drop the static library

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Fri Jun 05 2009 Orcan Ogetbil <oget [DOT] fedora [AT] gmail [DOT] com> 4.0.6-1
- Update to 4.0.6

* 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