--- /dev/null
+--- Maelstrom-3.0.5/Makefile.am.orig Mon Jul 23 05:45:05 2001
++++ Maelstrom-3.0.5/Makefile.am Thu Jun 27 23:10:56 2002
+@@ -68,18 +68,18 @@
+ make install_gamedata target=@GAME_INSTALLDIR@
+
+ install_gamedata:
+- sh mkinstalldirs $(target)/
++ sh mkinstalldirs $(DESTDIR)$(target)/
+ cp -rv Images \
+ Maelstrom_Fonts \
+ Maelstrom_Sounds \
+ Maelstrom_Sprites \
+ Maelstrom-Scores \
+- icon.bmp icon.xpm $(target)/
+- chmod 666 $(target)/Maelstrom-Scores
++ icon.bmp icon.xpm $(DESTDIR)$(target)/
++ chmod 666 $(DESTDIR)$(target)/Maelstrom-Scores
+
+ install_gamedocs:
+- sh mkinstalldirs $(target)/
+- cp -rv README* COPYING* Docs* $(target)/
++ sh mkinstalldirs $(DESTDIR)$(target)/
++ cp -rv README* COPYING* Docs* $(DESTDIR)$(target)/
+
+ # Rule to build tar-gzipped distribution package
+ $(PACKAGE)-$(VERSION).tar.gz: dist
+--- Maelstrom-3.0.5/configure.in.orig Fri Jul 20 17:12:49 2001
++++ Maelstrom-3.0.5/configure.in Thu Jun 27 23:13:20 2002
+@@ -105,7 +105,7 @@
+ GAME_INSTALLDIR="\$(prefix)/games/$PACKAGE"
+ ;;
+ *)
+- GAME_INSTALLDIR="\$(prefix)/games/$PACKAGE"
++ GAME_INSTALLDIR="\$(datadir)/$PACKAGE"
+ ;;
+ esac
+ AC_SUBST(GAME_INSTALLDIR)
+#
+# Conditional build:
+# _with_cheaters
+#
Summary: Rockin' asteroids game
Summary(pl): Gra, w której strzelasz do asteroidów
Name: Maelstrom
Version: 3.0.5
-Release: 1
+Release: 2
License: GPL for code, artwork and sounds can be redistributed only with Maelstrom
Group: X11/Application/Games
Source0: http://www.devolution.com/~slouken/Maelstrom/src/%{name}-%{version}.tar.gz
Source1: http://mops.uci.agh.edu.pl/~gotar/%{name}.desktop
Patch0: http://mops.uci.agh.edu.pl/~gotar/%{name}-cheaters.patch
+Patch1: %{name}-dirs.patch
+Patch2: %{name}-amfix.patch
URL: http://www.devolution.com/~slouken/Maelstrom/
BuildRequires: SDL-devel
BuildRequires: SDL_net-devel
-#BuildRequires: autoconf
-#BuildRequires: automake
+BuildRequires: autoconf
+BuildRequires: automake
BuildRequires: libstdc++-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define _prefix /usr/X11R6
+%define _gamedir %{_datadir}/Maelstrom
+
%description
Maelstrom is a rockin' asteroids game ported from the Macintosh
Originally written by Andrew Welch of Ambrosia Software, and ported
%setup -q
# everlasting shield, more shots available, all-in-one equipment and
# reversed bonus in time function ;)
-#%patch0 -p1
+%{?_with_cheaters:%patch0 -p1}
+%patch1 -p1
+%patch2 -p1
%build
# make install forgets to install binaries
-#aclocal
-#%{__autoconf}
-#%{__automake}
-%configure2_13
+aclocal
+%{__autoconf}
+%{__automake}
+%configure
+
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_prefix}/X11R6,%{_applnkdir}/Games/Arcade}
+install -d $RPM_BUILD_ROOT{/var/games,%{_applnkdir}/Games/Arcade}
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
-%{__make} install prefix=$RPM_BUILD_ROOT%{_prefix} DESTDIR=$RPM_BUILD_ROOT
-mv $RPM_BUILD_ROOT%{_prefix}/bin $RPM_BUILD_ROOT%{_prefix}/X11R6
-rm -f $RPM_BUILD_ROOT%{_prefix}/games/Maelstrom/Images/Makefile*
+# GAME_INSTALLDIR=$RPM_BUILD_ROOT%{_gamedir} \
+# target=$RPM_BUILD_ROOT%{_gamedir}
+# prefix=$RPM_BUILD_ROOT%{_prefix}
+
+#mv $RPM_BUILD_ROOT%{_prefix}/bin $RPM_BUILD_ROOT%{_prefix}/X11R6
+rm -f $RPM_BUILD_ROOT%{_gamedir}/Images/Makefile*
rm -f Docs/Makefile*
+# /usr is read-only
+mv -f $RPM_BUILD_ROOT%{_gamedir}/Maelstrom-Scores $RPM_BUILD_ROOT/var/games
+ln -sf /var/games/Maelstrom-Scores $RPM_BUILD_ROOT%{_gamedir}
+
+# not needed (examples for internal Mac library)
+# and playwave conflicts with SDL_mixer
+rm -f $RPM_BUILD_ROOT%{_bindir}/{macres,playwave,snd2wav}
+
install %{SOURCE1} $RPM_BUILD_ROOT%{_applnkdir}/Games/Arcade
%clean
%files
%defattr(644,root,root,755)
%doc README* Changelog COPYING CREDITS Docs
-%attr(755,root,root) %{_prefix}/X11R6/bin/*
-%{_prefix}/games/Maelstrom/Images
-%{_prefix}/games/Maelstrom/Maelstrom_*
-%{_prefix}/games/Maelstrom/icon.*
-%attr(666,root,root) %config(noreplace) %verify(not md5 size mtime) %{_prefix}/games/Maelstrom/Maelstrom-Scores
+%attr(755,root,root) %{_bindir}/*
+%{_gamedir}
+%attr(666,root,root) %config(noreplace) %verify(not md5 size mtime) /var/games/Maelstrom-Scores
%{_applnkdir}/Games/Arcade/*