diff --git a/.cvsignore b/.cvsignore
index 8a31585..c943dd0 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1 @@
-portaudio_v18_1.zip
+pa_stable_v19_061121.tar.gz
diff --git a/portaudio.spec b/portaudio.spec
index 1d40f0c..db7fd8d 100644
--- a/portaudio.spec
+++ b/portaudio.spec
@@ -1,15 +1,17 @@
-%define real_version v18_1
+%define real_version v19_061121
Summary: Free, cross platform, open-source, audio I/O library
Name: portaudio
-Version: 18.1
-Release: 8%{?dist}
+Version: 19
+Release: 1%{?dist}
License: BSD-like
Group: System Environment/Libraries
URL: http://www.portaudio.com/
-Source: http://www.portaudio.com/archives/portaudio_%{real_version}.zip
+Source: http://www.portaudio.com/archives/pa_stable_%{real_version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-Provides: %{name}-devel = %{version}-%{release}
+BuildRequires: doxygen
+BuildRequires: alsa-lib-devel
+BuildRequires: jack-audio-connection-kit-devel
%description
PortAudio is a portable audio I/O library designed for cross-platform
@@ -18,37 +20,70 @@ 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 files for the portaudio audio I/O library
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}, pkgconfig
+
+%description devel
+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.
+
+This package contains files required to build applications that will use the
+portaudio library.
+
+
%prep
-%setup -n %{name}_%{real_version}
-%{__perl} -pi.orig -e 's|^(LIBINST) = /usr/local/lib|$1 = %{_libdir}|' \
- Makefile.linux
+%setup -q -n %{name}
%build
-%{__make} %{?_smp_mflags} -f Makefile.linux sharedlib \
- CFLAGS="%{optflags} -fPIC"
+%configure --disable-static
+%{__make} %{?_smp_mflags}
+# Build html devel documentation
+doxygen
%install
%{__rm} -rf %{buildroot}
-%{__install} -D -m 0755 pa_unix_oss/libportaudio.so \
- %{buildroot}%{_libdir}/libportaudio.so
-%{__install} -D -m 0644 pa_common/portaudio.h \
- %{buildroot}%{_includedir}/portaudio.h
+%{__make} install DESTDIR=%{buildroot}
%clean
%{__rm} -rf %{buildroot}
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
%files
-%defattr(-, root, root, 0755)
-%doc LICENSE.txt README.txt docs/
-%{_includedir}/*.h
+%defattr(-,root,root,-)
+%doc LICENSE.txt README.txt
+%{_libdir}/*.so.*
+
+%files devel
+%defattr(-,root,root,-)
+%doc doc/html/*
+%{_includedir}/portaudio.h
+%exclude %{_libdir}/*.la
%{_libdir}/*.so
+%{_libdir}/pkgconfig/*.pc
%changelog
+* Tue Jun 19 2007 Matthias Saou 19-1
+- Update to "stable" v19_061121.
+- Switch virtual devel provide to a real sub-package.
+- Update spec to match build changes from custom Makefile to autotools.
+- Include new pkgconfig file and require pkgconfig from the devel package.
+- Add ldconfig calls now that we have a versionned shared library.
+- Rebuild against alsa-lib and jack-audio-connection-kit.
+- Build doxygen documentation and include it in the devel package.
+
* Mon Aug 28 2006 Matthias Saou 18.1-8
- FC6 rebuild.
diff --git a/sources b/sources
index 1556983..c15f20f 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-ce66a732d263fde2b5ad2262ef37a691 portaudio_v18_1.zip
+f2ceca92b3bfc206abccfb439c169a3c pa_stable_v19_061121.tar.gz