File portaudio.spec of Package portaudio
#
# spec file for package portaudio
#
# Copyright (c) 2012 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/
#
%define soname 2
Name: portaudio
Version: 19_20111121
Release: 0
Summary: Portable Real-Time Audio Library
License: BSD-3-Clause
Group: Development/Libraries/C and C++
Url: http://www.portaudio.com/
Source: http://www.portaudio.com/archives/pa_stable_v%{version}.tgz
Source1: baselibs.conf
%define lname libportaudio%{soname}
BuildRequires: alsa-devel
BuildRequires: doxygen
BuildRequires: libjack-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
PortAudio is a portable audio I/O library designed for cross-platform
support of audio. It uses a callback mechanism to request audio
processing. Audio can be generated in various formats, including 32 bit
floating point, and will be converted to the native format internally.
%package -n %lname
Summary: Portable Real-Time Audio Library
Group: System/Libraries
# portaudio was last used in openSUSE 12.1
Provides: portaudio = %{version}
Obsoletes: portaudio < %{version}
%description -n %lname
PortAudio is a portable audio I/O library designed for cross-platform
support of audio. It uses a callback mechanism to request audio
processing. Audio can be generated in various formats, including 32 bit
floating point, and will be converted to the native format internally.
%package devel
Summary: Development package for the portaudio library
Group: Development/Languages/C and C++
Requires: %lname = %{version}
%description devel
This package contains the files needed to compile programs that use the
portaudio library.
%prep
%setup -q -n portaudio
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" qa/loopback/src/paqa.c src/common/pa_front.c
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M:%%S')
sed -i "s/__TIME__/\"$FAKE_BUILDTIME\"/" qa/loopback/src/paqa.c src/common/pa_front.c
%build
%configure --disable-static \
--with-alsa=yes \
--with-jack=yes \
--with-oss=yes
make %{?_smp_mflags}
doxygen
%install
make install DESTDIR=%{?buildroot}
rm -f %{buildroot}/%{_libdir}/*.la
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files -n %lname
%defattr(-,root,root)
%{_libdir}/lib*.so.%{soname}*
%files devel
%defattr(-,root,root)
%doc README.txt LICENSE.txt
%doc doc/html
%{_includedir}/*
%{_libdir}/pkgconfig/*.pc
%{_libdir}/lib*.so
%changelog