--- /dev/null
+--- tmp/openal/linux/configure.in.orig Fri Feb 14 20:52:54 2003
++++ tmp/openal/linux/configure.in Fri Feb 14 20:59:11 2003
+@@ -75,23 +75,7 @@
+ enable_paranoid_locks=no
+ enable_empty_locks=no
+
+-CFLAGS="-O6 -fexpensive-optimizations -funroll-all-loops -funroll-loops -fomit-frame-pointer -finline-functions -ffast-math $CFLAGS"
+-
+-dnl add -march
+-case "$target" in
+- *i386*)
+- CFLAGS="$CFLAGS -march=i386" ;;
+- *i486*)
+- CFLAGS="$CFLAGS -march=i486" ;;
+- *i586*)
+- CFLAGS="$CFLAGS -march=i586" ;;
+- *i686*)
+- CFLAGS="$CFLAGS -march=i686" ;;
+- mips*)
+- CFLAGS="$CFLAGS -march=mips" ;;
+- *)
+- echo "Unknown target $target" ;;
+-esac
++CFLAGS="-fexpensive-optimizations -funroll-all-loops -funroll-loops -fomit-frame-pointer -finline-functions -ffast-math $CFLAGS"
+
+ fi
+
+@@ -229,7 +229,7 @@
+ [ --enable-dmalloc enable DMALLOC support [default=no]],
+ , enable_dmalloc=no)
+ if test x$enable_dmalloc = xyes; then
+- AC_CHECK_HEADER(dmalloc.h,
++ AC_CHECK_HEADER(dmalloc.h,[
+ dnl header found
+ AC_DEFINE(DMALLOC)
+ AC_DEFINE(DMALLOC_FUNC_CHECK)
+@@ -239,14 +239,14 @@
+ REDUNDANT_DECLS_WARN=no,
+ dnl header not found, check local/include
+ dnl invalid cache
+- AC_CHECK_HEADER(/usr/local/include/dmalloc.h,
++ AC_CHECK_HEADER(/usr/local/include/dmalloc.h,[
+ dnl header found in local/include
+ AC_DEFINE(DMALLOC)
+ AC_DEFINE(DMALLOC_FUNC_CHECK)
+ INCLUDES="$CFLAGS -include \"/usr/local/include/dmalloc.h\""
+ LIBS="$LIBS -ldmallocth"
+ SHOULD_USE_WERROR=no
+- REDUNDANT_DECLS_WARN=no))
++ REDUNDANT_DECLS_WARN=no])])
+ fi
+
+ dnl efence stuff
+@@ -640,7 +640,7 @@
+ if test x$enable_vorbis = xyes; then
+
+ AC_CHECK_LIB(vorbisfile, ov_info,
+- AC_DEFINE( VORBIS_SUPPORT )
++ AC_DEFINE([VORBIS_SUPPORT])
+ LIBS="$LIBS -lvorbis -lvorbisfile",, -lvorbis )
+
+ fi # enable_vorbis = no
---- linux/Makefile.in Fri Jan 26 19:04:32 2001
-+++ linux/Makefile.in.works Sun Aug 5 12:29:26 2001
-@@ -1,6 +1,6 @@
+--- tmp/openal/linux/Makefile.in.orig Fri Feb 14 21:50:11 2003
++++ tmp/openal/linux/Makefile.in Fri Feb 14 21:53:11 2003
+@@ -1,8 +1,10 @@
INSTALL=@INSTALL@
LN_S=@LN_S@
-DESTDIR=@prefix@/
-+DESTDIR=$(prefix)/
- DESTINC=$(DESTDIR)include
- DESTLIB=$(DESTDIR)lib
+-DESTINC=$(DESTDIR)include
+-DESTLIB=$(DESTDIR)lib
++includedir=@includedir@
++libdir=@libdir@
++DESTDIR=
++DESTINC=$(DESTDIR)$(includedir)
++DESTLIB=$(DESTDIR)$(libdir)
MAKE=@MAKE@
+ MAJOR_VERSION=@MAJOR_VERSION@
+ MINOR_VERSION=@MINOR_VERSION@
+@@ -43,8 +45,8 @@
+ $(INSTALL) -d -m 755 $(DESTLIB)
+ $(INSTALL) -m 755 src/libopenal.a $(DESTLIB)
+ $(INSTALL) -m 755 src/libopenal.so.$(VERSION) $(DESTLIB)
+- $(LN_S) -f $(DESTLIB)/libopenal.so.$(VERSION) $(DESTLIB)/libopenal.so.$(MAJOR_VERSION)
+- $(LN_S) -f $(DESTLIB)/libopenal.so.$(VERSION) $(DESTLIB)/libopenal.so
++ $(LN_S) -f libopenal.so.$(VERSION) $(DESTLIB)/libopenal.so.$(MAJOR_VERSION)
++ $(LN_S) -f libopenal.so.$(VERSION) $(DESTLIB)/libopenal.so
+ $(INSTALL) -m 444 ../include/AL/al.h $(DESTINC)/AL
+ $(INSTALL) -m 444 ../include/AL/alc.h $(DESTINC)/AL
+ $(INSTALL) -m 444 ../include/AL/alu.h $(DESTINC)/AL
+#
+# Conditional build:
+# _without_alsa - without ALSA support
+# _without_doc - don't build HTML documentation (from SGML source)
+# _with_mmx - use MMX (won't run on non-MMX CPU)
+#
+%ifarch athlon
+%define _with_mmx 1
+%endif
+%ifnarch i586 i686 athlon
+%define _with_mmx 0
+%endif
Summary: Open Audio Library
Summary(pl): Otwarta Biblioteka D¼wiêku
Name: OpenAL
Version: 0.0.6
Release: 1
License: LGPL
-Group: X11/Libraries
+Group: Libraries
Vendor: Loki Entertainment Software - http://www.lokigames.com/
# This is tarball taken directly form Mandrake Cooker .src.rpm
Source0: %{name}-linuxonly-20010805.tar.bz2
# Those patches came from Mandrake Cooker (only changed names)
Patch0: %{name}-prefix.patch
Patch1: %{name}-build.patch
+Patch2: %{name}-acfix.patch
+Patch3: %{name}-info.patch
URL: http://www.openal.com/
-BuildRequires: alsa-lib-devel
BuildRequires: SDL-devel
+%{!?_without_alsa:BuildRequires: alsa-lib-devel}
+BuildRequires: autoconf
+BuildRequires: automake
+%{!?_without_doc:BuildRequires: docbook-utils}
+%{!?_without_doc:BuildRequires: gnome-doc-tools}
BuildRequires: libvorbis-devel
+%{?_with_mmx:BuildRequires: nasm}
BuildRequires: smpeg-devel
+BuildRequires: texinfo
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
%description
OpenAL, the Open Audio Library, is a joint effort to create an open,
vendor-neutral, cross-platform API for interactive, primarily
%package devel
Summary: Headers for OpenAL
Summary(pl): Pliki nag³ówkowe do OpenAL
-Group: X11/Development/Libraries
+Group: Development/Libraries
Requires: %{name} = %{version}
%description devel
%package static
Summary: OpenAL static library
Summary(pl): Statyczna biblioteka OpenAL
-Group: X11/Development/Libraries
+Group: Development/Libraries
Requires: %{name}-devel = %{version}
%description static
Biblioteka OpenAL do statycznego linkowania.
%prep
-%setup -q -n tmp/openal
-%patch0 -p0
+%setup -q -n tmp
+%patch0 -p1
+%patch2 -p1
+%patch3 -p1
+cd openal
%patch1 -p0
+echo 'AC_DEFUN([AC_HAS_MMX],[$%{?_with_mmx:1}%{!?_with_mmx:2}])' >> linux/acinclude.m4
+
%build
-cd linux
-sh ./autogen.sh
-%configure --enable-prefix=%{_prefix} \
- --enable-optimization \
- --enable-alsa \
- --enable-sdl \
- --enable-vorbis \
- --enable-smpeg \
- --enable-capture \
- --with-gcc=%{__cc}
+cd openal/linux
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%configure \
+ %{!?debug:--enable-optimization} \
+ %{?_with_mmx:--enable-arch-asm} \
+ %{!?_without_alsa:--enable-alsa} \
+ --enable-sdl \
+ --enable-vorbis \
+ --enable-smpeg \
+ --enable-capture \
+ --with-gcc=%{__cc}
+
%{__make}
+cd ../docs
+%{!?_without_doc:%{__make} full-html}
+
%install
rm -rf $RPM_BUILD_ROOT
-cd linux
-%makeinstall
+install -d $RPM_BUILD_ROOT%{_infodir}
-mkdir -p $RPM_BUILD_ROOT%{_infodir}
-install -c doc/openal.info $RPM_BUILD_ROOT%{_infodir}
+cd openal/linux
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
-# This needs patch, but is it worth to waste time ?
-rm -f $RPM_BUILD_ROOT%{_libdir}/libopenal.{so,so.0}
+install doc/openal.info $RPM_BUILD_ROOT%{_infodir}
%clean
rm -rf $RPM_BUILD_ROOT
%postun devel
[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
-
%files
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/*.so*
+%doc openal/linux/{CREDITS,ChangeLog,NOTES,TODO}
+%attr(755,root,root) %{_libdir}/lib*.so.*.*
%files devel
%defattr(644,root,root,755)
-%doc %{_infodir}/openal.info.*
-%{_includedir}/AL/*.h
+%doc openal/linux/doc/LOKI* %{!?_without_doc:openal/docs/oalspecs-full}
+%attr(755,root,root) %{_libdir}/lib*.so
+%{_includedir}/AL
+%{_infodir}/openal.info*
%files static
%defattr(644,root,root,755)