Blob Blame Raw
Name:           blobwars
Version:        1.19
Release:        1%{?dist}
Summary:        Mission and Objective based 2D Platform Game
Group:          Amusements/Games
# Code and gfx is all GPLv2+. Music is all CC-BY-SA. SFX are a mix, see readme
License:        GPLv2+ and CC-BY-SA and CC-BY and BSD and Public Domain
URL:            http://www.parallelrealities.co.uk/projects/blobWars.php
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Patch0:         blobwars-1.05-debian.patch
Patch1:         blobwars-1.19-check-chdir-ret.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  SDL_mixer-devel SDL_image-devel SDL_ttf-devel SDL_net-devel
BuildRequires:  zlib-devel gettext desktop-file-utils
Requires:       hicolor-icon-theme bitstream-vera-sans-fonts

%description
Blob Wars : Metal Blob Solid. This is Episode I of the Blob Wars Saga.
You must undertake the role of fearless Blob solider, Bob, as he infiltrates
various enemy installations and hideouts in an attempt to rescue as many
MIAs as possible.


%prep
%setup -q
%patch0 -p1
%patch1 -p1


%build
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" RELEASE=1 \
  DOCDIR=%{_docdir}/%{name}-%{version}/


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
%find_lang %{name}
desktop-file-install --vendor fedora --delete-original    \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications           \
  $RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
rm -r $RPM_BUILD_ROOT%{_docdir}/%{name}

rm $RPM_BUILD_ROOT%{_datadir}/%{name}/data/vera.ttf
ln -s %{_datadir}/fonts/bitstream-vera/Vera.ttf \
  $RPM_BUILD_ROOT%{_datadir}/%{name}/data/vera.ttf


%clean
rm -rf $RPM_BUILD_ROOT


%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc doc/*
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png


%changelog
* Fri Apr 22 2011 Hans de Goede <hdegoede@redhat.com> - 1.19-1
- New upstream version 1.19

* Sun Feb 13 2011 Hans de Goede <hdegoede@redhat.com> - 1.18-1
- New upstream version 1.18
  - From new sf.net upstream by the Debian and Fedora blobwars packagers
  - With new Free music
  - Sound effects are back! (and Free this time)

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Sat Mar 07 2009 Rafał Psota <rafalzaq@gmail.com> 1.11-1
- update to 1.11 (bz 488584)

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.09b2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Aug 30 2008 Rafał Psota <rafalzaq@gmail.com> 1.09b2-2
- FONT_ERROR patch (thanks to Michał Bentkowski)

* Fri Aug 29 2008 Rafał Psota <rafalzaq@gmail.com> 1.09b2-1
- remove nonfree sounds and music

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.07-2
- Autorebuild for GCC 4.3

* Sun Sep 16 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.07-1
- New upstream version 1.07 (bz 292391)

* Sun Aug  5 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.06-2
- Update License tag for new Licensing Guidelines compliance

* Tue Apr 10 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.06-1
- New upstream release 1.06-2

* Mon Aug 28 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.05-3
- FE6 Rebuild

* Thu Jun  1 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.05-2
- remove extreanous BR SDL-devel and ImageMagick
- remove extreanous "export" in %%build section
- remove extreanous "-n %%{name}-%%{version}" under %%setup
- cleanup .desktop file

* Sun May 14 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 1.05-1
- initial Fedora Extras package