%define target arm-gp2x-linux
%define target_prefix %{_prefix}/%{target}
Name: %{target}-SDL
Version: 1.2.9
Release: 4%{?dist}
Summary: Cross Compiled SDL Library targeted at %{target}
Group: Development/Libraries
License: LGPLv2+
URL: http://www.libsdl.org
Source0: http://www.libsdl.org/release/SDL-%{version}.tar.gz
Patch0: gp2x-SDL.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
BuildRequires: %{target}-gcc
BuildArch: noarch
Requires: %{target}-glibc
%description
This is a Cross Compiled version of the SDL Library, which can be used to
compile and link binaries for the %{target} platform, instead of for the
native %{_arch} platform.
%prep
%setup -q -n SDL-%{version}
%patch0 -p1
%build
./configure --prefix=%{target_prefix} --build=`./config.guess` --host=%{target} \
--enable-shared --enable-static \
--enable-pthreads --enable-pthreads-sem --enable-threads \
--disable-alsa --disable-cdrom
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm $RPM_BUILD_ROOT%{target_prefix}/lib/libSDL.la
# create a sdl-config symlink
mkdir -p $RPM_BUILD_ROOT%{_bindir}
ln -s ../%{target}/bin/sdl-config $RPM_BUILD_ROOT%{_bindir}/%{target}-sdl-config
# we don't want these as we are a cross version
rm -r $RPM_BUILD_ROOT%{target_prefix}/man
rm -r $RPM_BUILD_ROOT%{target_prefix}/share
# despite us being noarch redhat-rpm-config insists on stripping our files
# and on running find-debuginfo.sh on our files
%define __debug_install_post %{nil}
%define __os_install_post /usr/lib/rpm/redhat/brp-compress
# stop rpm from claiming we provide and need native .so files <sigh>
%define _use_internal_dependency_generator 0
%define __find_requires %{nil}
%define __find_provides %{nil}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc BUGS COPYING CREDITS README README-SDL.txt README.GP2X TODO
%{_bindir}/%{target}-sdl-config
%{target_prefix}/bin
%{target_prefix}/include/SDL
%{target_prefix}/lib/libSDL*
%changelog
* Mon Aug 6 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.2.9-4
- Add _smp_mflags to the make invocation
* Sat Aug 4 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.2.9-3
- Add missing %%defattr to %%files
- Strip some unneeded file removals / additions from Patch0, dramatically
reducing it in size
- Update License tag for new Licensing Guidelines compliance
- Do NOT provide and require native .so files <sigh>
* Thu Jun 07 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.2.9-2
- various cleanups
* Mon Jun 04 2007 Emmanuel Chebesi <e.f.chebesi@student.hhs.nl> 1.2.9-1
- added patch with gp2x SDL configurations
- changed configure and version SDL added buildRequires
* Thu Jun 02 2007 Koos Termeulen <koostermeulen@gmail.com> 1.2.9-1
- Initial release