Blob Blame History Raw
Name:           worminator
Version:        3.0R2.1
Release:        5%{?dist}
Summary:        Sidescrolling platform and shoot'em up action-game
Group:          Amusements/Games
License:        GPL
URL:            http://sourceforge.net/projects/worminator/
Source0:        http://download.sourceforge.net/worminator/worminator-%{version}.tar.gz
Source1:        worminator.png
Source2:        worminator.desktop
Patch0:         worminator-3.0R2.1-speed.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  allegro-devel, desktop-file-utils
Requires:       worminator-data >= 3.0R2.1-2

%description
You play as The Worminator and fight your way through many levels of madness
and mayhem. Worminator features nine unique weapons, visible character damage,
full screen scrolling, sound and music, and much more!


%prep
%setup -q
%patch -p1 -z .speed
%{__sed} -i 's/\r//' ReadMe.txt


%build
gcc $RPM_OPT_FLAGS -fsigned-char -Wno-deprecated-declarations \
  -Wno-char-subscripts -DDATADIR=\"%{_datadir}/%{name}/\" -o %{name} \
  Worminator.c `allegro-config --libs`


%install
rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT%{_bindir}
install -m 0755 %{name} $RPM_BUILD_ROOT%{_bindir}

mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
install -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps

desktop-file-install --vendor fedora                            \
        --dir ${RPM_BUILD_ROOT}%{_datadir}/applications         \
        --add-category X-Fedora                                 \
        %{SOURCE2}


%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 ReadMe.txt changes.unix license.txt license-change.txt
%{_bindir}/%{name}
%{_datadir}/applications/*-worminator.desktop
%{_datadir}/icons/hicolor/32x32/apps/worminator.png


%changelog
* Tue Aug 29 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 3.0R2.1-5
- FE6 Rebuild

* Thu Jul  6 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 3.0R2.1-4
- Rebuild against new allegro to remove executable stack requirement caused
  by previous versions of allegro.

* Mon Apr 24 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 3.0R2.1-3
- Limit the framerate to 80 instead of trying to reach 160 fps,
  hopefully this fixes bug 188337.

* Tue Mar 14 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 3.0R2.1-2
- move worminator data dir from /usr/share/games to just /usr/share to match
  the games-SIG guidelines. Sorry about the somewhat large download for
  effectivly no changes, but I wanted to make this change before FC5 release.

* Sat Mar  4 2006 Hans de Goede <j.w.r.degoede@hhs.nl> 3.0R2.1-1
- initial Fedora Extras package
- loosely based on the SRPM from Cru:
  http://naturidentisch.de/packages/fc4/worminator/