Blob Blame History Raw
Name:           abuse
Version:        0.7.0
Release:        2%{?dist}
Summary:        The classic Crack-Dot-Com game
Group:          Amusements/Games
License:        GPL
URL:            http://www.labyrinth.net.au/~trandor/abuse/
Source0:        http://www.labyrinth.net.au/~trandor/files/abuse_sdl-%{version}.tar.bz2
Patch0:         abuse_sdl-0.7.0-debian.patch
Patch1:         abuse_sdl-0.7.0-fixes.patch
Patch2:         abuse_sdl-0.7.0-exit-intro-crash.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  ImageMagick SDL-devel alsa-lib-devel libGLU-devel
Requires:       abuse-data

%description
This is the SDL version of Abuse, the classic Crack-Dot-Com game. It can run in
a window or fullscreen and it has stereo sound with sound panning.


%prep
%setup -q -n abuse_sdl-%{version}
%patch0 -p1 -z .deb
%patch1 -p1 -z .fix
%patch2 -p1 -z .intro


%build
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
mv $RPM_BUILD_ROOT%{_datadir}/games/%{name}/%{name}.png \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
rm -fr $RPM_BUILD_ROOT%{_datadir}/games


%clean
rm -rf $RPM_BUILD_ROOT


%post
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%postun
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi


%files
%defattr(-,root,root,-)
%doc AUTHORS README TODO COPYING
%{_bindir}/%{name}.sdl
%{_mandir}/man6/%{name}-sdl.6.gz
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png


%changelog
* Thu Aug 24 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 0.7.0-2
- Fix abuse from crashing on exit when you try to close the window while the
  intro is still playing

* Wed Aug 16 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 0.7.0-1
- Initial FE submission