Blob Blame History Raw
Name:           methane
Version:        1.4.7
Release:        4%{?dist}
Summary:        Super Methane Brothers
Group:          Amusements/Games
License:        GPLv2+
URL:            http://methane.sourceforge.net/
Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz
Source1:        %{name}.desktop
Source2:        %{name}-help.desktop
Source3:        %{name}.png
Source4:        %{name}-help.png
Patch0:         methane-clanlib08.patch
Patch1:         methane-highscore.patch
Patch2:         methane-fullscreen.patch
Patch3:         methane-1.4.7-pulseaudio.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  ClanLib-devel mikmod-devel desktop-file-utils
Requires:       hicolor-icon-theme opengl-games-utils

%description
Super Methane Brothers is a platform game converted from the Amiga by
its original author. It is very similar to the Taito game "Bubble
Bobble".


%prep
%setup -q
%patch0 -p1 -z .cl08
%patch1 -p1 -z .highscore
%patch2 -p1 -z .fullscreen
%patch3 -p1 -z .pa
# we don't want every beeping file to be executable!
chmod -x `find -type f`
# put the correct version in methane-help.desktop
cat %{SOURCE2} | sed s/version/%{version}/ > %{name}-help.desktop


%build
pushd source/linux
make CXXFLAGS="$RPM_OPT_FLAGS"
popd


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_var}/games
install -m 755 source/linux/%{name} $RPM_BUILD_ROOT%{_bindir}
ln -s opengl-game-wrapper.sh $RPM_BUILD_ROOT%{_bindir}/%{name}-wrapper
touch $RPM_BUILD_ROOT%{_var}/games/%{name}scores

# below is the desktop file and icon stuff.
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --vendor fedora            \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  %{SOURCE1}
desktop-file-install --vendor fedora            \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  %{name}-help.desktop
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
install -p -m 644 %{SOURCE3} %{SOURCE4} \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps


%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 copying docs history i_linux readme todo
%attr(2755,root,games) %{_bindir}/%{name}
%{_bindir}/%{name}-wrapper
%verify(not md5 size mtime) %config(noreplace) %attr(664,root,games) %{_var}/games/%{name}scores
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/applications/fedora-%{name}-help.desktop
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%{_datadir}/icons/hicolor/32x32/apps/%{name}-help.png


%changelog
* Sun Feb 17 2008 Hans de Goede <j.w.r.degoede@hhs.nl> 1.4.7-4
- Rebuild for new libmikmod
- Rebuild with gcc 4.3
- Try pulseaudio (esd) before oss (mikmod doesn't support alsa)

* Tue Sep 25 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.4.7-3
- Use opengl-games-utils wrapper to show error dialog when DRI is missing

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

* Thu Jan 25 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.4.7-1
- Initial Fedora Extras package, based on the SUSE srpm