f77c7b2
Name:           methane
f77c7b2
Version:        1.4.7
f77c7b2
Release:        1%{?dist}
f77c7b2
Summary:        Super Methane Brothers
f77c7b2
Group:          Amusements/Games
f77c7b2
License:        GPL
f77c7b2
URL:            http://methane.sourceforge.net/
f77c7b2
Source0:        http://dl.sf.net/sourceforge/%{name}/%{name}-%{version}.tgz
f77c7b2
Source1:        %{name}.desktop
f77c7b2
Source2:        %{name}-help.desktop
f77c7b2
Source3:        %{name}.png
f77c7b2
Source4:        %{name}-help.png
f77c7b2
Patch0:         methane-clanlib08.patch
f77c7b2
Patch1:         methane-highscore.patch
f77c7b2
Patch2:         methane-fullscreen.patch
f77c7b2
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
f77c7b2
BuildRequires:  ClanLib-devel mikmod-devel desktop-file-utils
f77c7b2
Requires:       hicolor-icon-theme
f77c7b2
f77c7b2
%description
f77c7b2
Super Methane Brothers is a platform game converted from the Amiga by
f77c7b2
its original author. It is very similar to the Taito game "Bubble
f77c7b2
Bobble".
f77c7b2
f77c7b2
f77c7b2
%prep
f77c7b2
%setup -q
f77c7b2
%patch0 -p1 -z .cl08
f77c7b2
%patch1 -p1 -z .highscore
f77c7b2
%patch2 -p1 -z .fullscreen
f77c7b2
# we don't want every beeping file to be executable!
f77c7b2
chmod -x `find -type f`
f77c7b2
# put the correct version in methane-help.desktop
f77c7b2
cat %{SOURCE2} | sed s/version/%{version}/ > %{name}-help.desktop
f77c7b2
f77c7b2
f77c7b2
%build
f77c7b2
pushd source/linux
f77c7b2
make CXXFLAGS="$RPM_OPT_FLAGS"
f77c7b2
popd
f77c7b2
f77c7b2
f77c7b2
%install
f77c7b2
rm -rf $RPM_BUILD_ROOT
f77c7b2
mkdir -p $RPM_BUILD_ROOT%{_bindir}
f77c7b2
mkdir -p $RPM_BUILD_ROOT%{_var}/games
f77c7b2
install -m 755 source/linux/%{name} $RPM_BUILD_ROOT%{_bindir}
f77c7b2
touch $RPM_BUILD_ROOT%{_var}/games/%{name}scores
f77c7b2
f77c7b2
f77c7b2
# below is the desktop file and icon stuff.
f77c7b2
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
f77c7b2
desktop-file-install --vendor fedora            \
f77c7b2
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
f77c7b2
  --add-category X-Fedora                       \
f77c7b2
  %{SOURCE1}
f77c7b2
desktop-file-install --vendor fedora            \
f77c7b2
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
f77c7b2
  --add-category X-Fedora                       \
f77c7b2
  %{name}-help.desktop
f77c7b2
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
f77c7b2
install -p -m 644 %{SOURCE3} %{SOURCE4} \
f77c7b2
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/32x32/apps
f77c7b2
f77c7b2
f77c7b2
%clean
f77c7b2
rm -rf $RPM_BUILD_ROOT
f77c7b2
f77c7b2
f77c7b2
%post
f77c7b2
touch --no-create %{_datadir}/icons/hicolor || :
f77c7b2
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
f77c7b2
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
f77c7b2
fi
f77c7b2
f77c7b2
%postun
f77c7b2
touch --no-create %{_datadir}/icons/hicolor || :
f77c7b2
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
f77c7b2
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
f77c7b2
fi
f77c7b2
f77c7b2
f77c7b2
%files
f77c7b2
%defattr(-,root,root,-)
f77c7b2
%doc authors copying docs history i_linux readme todo
f77c7b2
%attr(2755,root,games) %{_bindir}/%{name}
f77c7b2
%verify(not md5 size mtime) %config(noreplace) %attr(664,root,games) %{_var}/games/%{name}scores
f77c7b2
%{_datadir}/applications/fedora-%{name}.desktop
f77c7b2
%{_datadir}/applications/fedora-%{name}-help.desktop
f77c7b2
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
f77c7b2
%{_datadir}/icons/hicolor/32x32/apps/%{name}-help.png
f77c7b2
f77c7b2
f77c7b2
%changelog
f77c7b2
* Thu Jan 25 2007 Hans de Goede <j.w.r.degoede@hhs.nl> 1.4.7-1
f77c7b2
- Initial Fedora Extras package, based on the SUSE srpm