File openal-soft-win32.spec of Package openal-soft-win32

# norootforbuild

%define _prefix /opt/cross/i386-mingw32msvc

Name:		openal-soft-win32
Release:	1
BuildRoot:	%{_tmppath}/%{name}-%{version}-build
BuildRequires:	cmake
BuildRequires:  cross-mingw-binutils cross-mingw-gcc cross-mingw-runtime cross-mingw-w32api
BuildRequires:  directx-headers
%{expand:%(sed -n -e '/^\(Group\|License\|Version\|Summary\|URL\|Source\):/p;/^Patch[[:digit:]]*:/p;/^%package/q' < %_sourcedir/openal-soft.spec)}
Source0:	openal-soft-%{version}.tar.bz2
Source1:        dsound.h
Patch2:		dsound.h.diff
Source98:       toolchain-mingw32.cmake
Source99:       openal-soft.spec

%description
OpenAL is an audio library designed in the spirit of OpenGL--machine
independent, cross platform, and data format neutral with a clean,
simple C-based API.

OpenAL Soft is an alternative software implementation with a shared
and a cleaned up codebase, based on the windows reference
implementation.


Authors:
--------
	Chris Robinson

%prep
%setup -q -n openal-soft-%version
cd build
cp %SOURCE1 .
%patch2 -p0

%build
cd build
cmake \
    -D CMAKE_TOOLCHAIN_FILE=%SOURCE99 \
    -D CMAKE_INSTALL_PREFIX=%_prefix \
    -D CMAKE_C_FLAGS:STRING="$RPM_OPT_FLAGS" \
    ..
make VERBOSE=1 %{?jobs:-j %jobs}

%install
cd build
make DESTDIR=$RPM_BUILD_ROOT install

%clean
rm -rf "$RPM_BUILD_ROOT"

%files
%defattr(-,root,root)
%dir %_prefix
%dir %_prefix/bin
%_prefix/bin/openal-info.exe
%_prefix/bin/OpenAL32.dll
%dir %_prefix/include
%_prefix/include/AL
%dir %_prefix/lib
%_prefix/lib/libOpenAL32.dll.a
%dir %_prefix/lib/pkgconfig
%_prefix/lib/pkgconfig/openal.pc

openSUSE Build Service is sponsored by