Blob Blame History Raw
Name:           methane
Version:        1.5.1
Release:        8%{?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
Patch1:         methane-highscore.patch
Patch2:         methane-fullscreen.patch
Patch3:         methane-1.5.1-clanlib-23.patch
BuildRequires:  ClanLib-devel >= 2.3 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.


%prep
%setup -q
%patch1 -p1 -z .highscore
%patch2 -p1 -z .fullscreen
%patch3 -p1
# put the correct version in methane-help.desktop
cat %{SOURCE2} | sed s/version/%{version}/ > %{name}-help.desktop


%build
make CXXFLAGS="$RPM_OPT_FLAGS"


%install
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
mkdir -p $RPM_BUILD_ROOT%{_var}/games
install -m 755 %{name} $RPM_BUILD_ROOT%{_bindir}
cp -a resources $RPM_BUILD_ROOT%{_datadir}/%{name}
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                            \
%if %{?fedora} && 0%{?fedora} < 19
  --vendor fedora \
%endif
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  %{SOURCE1}
desktop-file-install                            \
%if 0%{?fedora} && 0%{?fedora} < 19
  --vendor fedora \
%endif
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  %{name}-help.desktop
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps
install -p -m 644 %{SOURCE3} \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/128x128/apps


%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
%doc authors.txt copying.txt docs history.txt readme.txt
%attr(2755,root,games) %{_bindir}/%{name}
%{_bindir}/%{name}-wrapper
%{_datadir}/%{name}
%if 0%{?fedora} && 0%{?fedora} < 19
%{_datadir}/applications/fedora-%{name}.desktop
%{_datadir}/applications/fedora-%{name}-help.desktop
%else
%{_datadir}/applications/%{name}.desktop
%{_datadir}/applications/%{name}-help.desktop
%endif
%{_datadir}/icons/hicolor/128x128/apps/%{name}.png
%verify(not md5 size mtime) %config(noreplace) %attr(664,root,games) %{_var}/games/%{name}.scores


%changelog
* Thu Aug  1 2013 Hans de Goede <hdegoede@redhat.com> - 1.5.1-8
- Don't request no-decorations in fullscreen mode, as this breaks fullscreen

* Thu Feb 14 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 1.5.1-7
- Remove the --vendor flag for desktop-file-install

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Mon Jan 21 2013 Adam Tkac <atkac redhat com> - 1.5.1-5
- rebuild due to "jpeg8-ABI" feature drop

* Fri Dec 21 2012 Adam Tkac <atkac redhat com> - 1.5.1-4
- rebuild against new libjpeg

* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Sun Dec 11 2011 Hans de Goede <hdegoede@redhat.com> - 1.5.1-1
- New upstream release 1.5.1
- Improve (make high res) icons

* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 1.5.0-4
- Rebuild for new libpng

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

* Mon Nov 16 2009 Hans de Goede <hdegoede@redhat.com> 1.5.0-2
- Hide cursor in fullscreen mode
- Add support for OpenGL 1 (versus 2)
- Disable opengl support by default, even the OpenGL 1 code is having issues
  with foss drivers

* Wed Nov 11 2009 Hans de Goede <hdegoede@redhat.com> 1.5.0-1
- New upstream release 1.5.0
- Hiscore save file format has changed, this means all
  highscores will be reset to 0 when updating from 1.4.7

* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.7-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon May 18 2009 Hans de Goede <hdegoede@redhat.com> 1.4.7-7
- Rebuild for new ClanLib

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.7-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Fri Jan 30 2009 Hans de Goede <hdegoede@redhat.com> 1.4.7-5
- Update description for new trademark guidelines

* 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