Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 4204bcf3f010cd9b101a610762baf471 > files > 1

portaudio-18.1-1mdk.src.rpm

%define	name	portaudio
%define	version	18.1
%define	release	1mdk

%define	major	0
%define libname	%mklibname %{name} %{major}

Summary:	PortAudio is a free, cross platform, open-source, audio I/O library
Name:		%{name}
Version:	%{version}
Release:	%{release}
URL:		http://www.portaudio.com/
License:	BSD
Source0:	%{name}_v18_1.tar.bz2
Patch0:		portaudio_v18_1-mdk.diff.bz2
Group:		System/Libraries
BuildConflicts:	%{name}-devel
BuildRoot:	%{_tmppath}/%{name}-%{version}-root

%description
PortAudio is a free, cross platform, open-source, audio I/O 
library. It lets you write simple audio programs in 'C' that will
compile and run on many platforms including Windows, Macintosh 
(8,9,X), Unix (OSS), SGI, and BeOS. PortAudio is intended to
promote the exchange of audio synthesis software between
developers on different platforms, and was recently selected as
the audio component of a larger PortMusic project that includes
MIDI and sound file support. 

PortAudio provides a very simple API for recording and/or playing
sound using a simple callback function. Example programs are 
included that synthesize sine waves and pink noise, perform fuzz
distortion on a guitar, list available audio devices, etc. 

%package -n	%{libname}
Summary:	PortAudio is a free, cross platform, open-source, audio I/O library
Group:          System/Libraries

%description -n	%{libname}
PortAudio is a free, cross platform, open-source, audio I/O 
library. It lets you write simple audio programs in 'C' that will
compile and run on many platforms including Windows, Macintosh 
(8,9,X), Unix (OSS), SGI, and BeOS. PortAudio is intended to
promote the exchange of audio synthesis software between
developers on different platforms, and was recently selected as
the audio component of a larger PortMusic project that includes
MIDI and sound file support. 

PortAudio provides a very simple API for recording and/or playing
sound using a simple callback function. Example programs are 
included that synthesize sine waves and pink noise, perform fuzz
distortion on a guitar, list available audio devices, etc. 

%package -n	%{libname}-devel
Summary:	Static library and header files for the PortAudio library
Group:		Development/C
Obsoletes:	%{name}-devel lib%{name}-devel 
Provides:	%{name}-devel lib%{name}-devel 
Requires:	%{libname} = %{version}-%{release}

%description -n	%{libname}-devel
PortAudio is a free, cross platform, open-source, audio I/O 
library. It lets you write simple audio programs in 'C' that will
compile and run on many platforms including Windows, Macintosh 
(8,9,X), Unix (OSS), SGI, and BeOS. PortAudio is intended to
promote the exchange of audio synthesis software between
developers on different platforms, and was recently selected as
the audio component of a larger PortMusic project that includes
MIDI and sound file support. 

PortAudio provides a very simple API for recording and/or playing
sound using a simple callback function. Example programs are 
included that synthesize sine waves and pink noise, perform fuzz
distortion on a guitar, list available audio devices, etc. 

This package contains the static PortAudio library and its header
files.

%prep

%setup -q -n %{name}_v18_1
# fix dir perms
find . -type d | xargs chmod 755

# fix file perms
find . -type f | xargs chmod 644

# strip away annoying ^M
for i in html txt cc h in am; do
    find . -type f -name "*.${i}" | xargs perl -p -i -e 's/\r//'
done

chmod 755 configure
perl -p -i -e 's/\r//' configure

%patch0 -p0 -b .mdk

%build

%configure

%make CC="gcc" \
    CFLAGS="%{optflags} -fPIC -DPIC -D_REENTRANT -D_GNU_SOURCE -Ipa_common -Ipablio"

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

install -d %{buildroot}/%{_includedir}
install -d %{buildroot}/%{_libdir}

install -m0755 libportaudio.so.%{major}.%{version} %{buildroot}/%{_libdir}/
ln -snf libportaudio.so.%{major}.%{version} %{buildroot}%{_libdir}/libportaudio.so.%{major}
ln -snf libportaudio.so.%{major}.%{version} %{buildroot}%{_libdir}/libportaudio.so
install -m0644 libportaudio.a %{buildroot}%{_libdir}/
install -m0644 pa_common/portaudio.h %{buildroot}%{_includedir}/
install -m0644 pablio/pablio.h %{buildroot}%{_includedir}/
install -m0644 pablio/ringbuffer.h %{buildroot}%{_includedir}/

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files -n %{libname}
%defattr(-,root,root)
%doc LICENSE.txt README.txt
%{_libdir}/*.so.*

%files -n %{libname}-devel
%defattr(-,root,root)
%doc docs/*
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/*.a

%changelog
* Sun Sep 12 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 18.1-1mdk
- initial mandrake package
- build it different and add pablio to it (P0)