File SDL-win32.spec of Package SDL-win32

# norootforbuild

Name:           SDL-win32
BuildRequires:  cross-mingw-binutils cross-mingw-gcc cross-mingw-runtime cross-mingw-w32api
BuildRequires:  directx-headers
BuildRequires:  nasm
Release:        1
%{expand:%(sed -n -e '/^\(Group\|License\|Version\|Summary\|URL\|Source\):/p;/^Patch[[:digit:]]*:/p;/^%package/q' < %_sourcedir/SDL.spec)}
# from ioquake3
Source999:      SDL.spec
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This is the "Simple DirectMedia Layer" library. It provides a generic
API for access to audio, keyboard, mouse, and display framebuffer
across multiple platforms.



Authors:
--------
    Sam Lantinga <slouken@libsdl.org>

%prep
%setup -q -n SDL-%{version}
%{expand:%(sed -n -e '/^%patch[[:digit:]]*/p' <%_sourcedir/SDL.spec)}

%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
export CXXFLAGS="$CFLAGS"
./autogen.sh
./configure \
    --host=i386-mingw32msvc \
    --prefix=/opt/cross/i386-mingw32msvc \
    --disable-stdio-redirect \
    --disable-debug
make %{?jobs:-j %jobs}

%install
make install DESTDIR=$RPM_BUILD_ROOT
# no need for man pages here
rm -r $RPM_BUILD_ROOT/opt/cross/i386-mingw32msvc/share/man
chmod 644 $RPM_BUILD_ROOT/opt/cross/i386-mingw32msvc/lib/*.a

%clean
rm -rf "$RPM_BUILD_ROOT"

%files
%defattr(-,root,root)
%doc README-SDL.txt COPYING CREDITS BUGS
/opt/cross/i386-mingw32msvc