%define name glaxium %define version 0.4a %define release 1mdk Summary: OpenGL-based space-ship "shoot-em-up" Name: %{name} Version: %{version} Release: %{release} Source: %{name}_%{version}.tar.bz2 URL: http://www.multimania.com/hosxe/glaxium.html Patch0: glaxium_0.4a-fix.patch.bz2 License: GPL Group: Games/Arcade BuildRoot: %{_tmppath}/%{name}-buildroot %description Glaxium is an OpenGL-based space-ship "shoot-em-up" styled game. It is designed to provide the same feel as the old 2D games of that type, but with 3D for the special effects. %prep rm -rf $RPM_BUILD_ROOT %setup -q -n %{name}_%{version} %patch0 -p0 perl -pi -e 's|-L/usr/local/lib||; s|-I/usr/local/include||' configure perl -pi -e 's|friend ([A-Z])|friend class $1|' *.hpp %build # (gc) workaround g++ exception bug when -fomit-frame-pointer is set export CFLAGS="$RPM_OPT_FLAGS -fno-omit-frame-pointer" CXXFLAGS="$RPM_OPT_FLAGS -fno-omit-frame-pointer" %configure make %install export GLAXIUM_INSTALLDIR=$RPM_BUILD_ROOT%_bindir export GLAXIUM_HOME=$RPM_BUILD_ROOT%{_datadir}/games/glaxium mkdir -p $RPM_BUILD_ROOT%_bindir mkdir -p $RPM_BUILD_ROOT%{_datadir}/games/glaxium/{textures,samples} install -m 755 glaxium $RPM_BUILD_ROOT%{_bindir}/%{name}.real install -m 644 textures/* $RPM_BUILD_ROOT%{_datadir}/games/glaxium/textures/ install -m 644 samples/* $RPM_BUILD_ROOT%{_datadir}/games/glaxium/samples/ cat > $RPM_BUILD_ROOT/%{_bindir}/%{name} << EOF #!/bin/sh pushd %{_gamesdatadir}/%{name} %{_bindir}/%{name}.real popd EOF chmod a+x $RPM_BUILD_ROOT/%{_bindir}/%{name} (cd $RPM_BUILD_ROOT mkdir -p ./usr/lib/menu cat > ./usr/lib/menu/%{name} <<EOF ?package(%{name}):\ command="%{_bindir}/%{name}"\ title="Glaxium"\ longtitle="OpenGL shoot'em up"\ needs="x11"\ section="Amusement/Arcade" EOF ) %post %{update_menus} %postun %{clean_menus} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc LICENSE %{_bindir}/* %{_menudir}/* %{_datadir}/games/* %changelog * Tue Aug 27 2002 Guillaume Cottenceau <gc@mandrakesoft.com> 0.4a-1mdk - new version * Mon Apr 29 2002 Guillaume Cottenceau <gc@mandrakesoft.com> 0.3d-4mdk - rebuild for new alsa * Wed Feb 27 2002 Guillaume Cottenceau <gc@mandrakesoft.com> 0.3d-3mdk - fix path of files * Fri Oct 12 2001 Lenny Cartier <lenny@mandrakesoft.com> 0.3d-2mdk - rebuild against new libpng * Wed Jul 18 2001 Lenny Cartier <lenny@mandrakesoft.com> 0.3d-1mdk - updated to 0.3d * Fri Mar 30 2001 Guillaume Cottenceau <gc@mandrakesoft.com> 0.3b-2mdk - use no-omit-frame-pointer to workaround g++ exceptions bug * Mon Mar 26 2001 Lenny Cartier <lenny@mandrakesoft.com> 0.3b-1mdk - updated to 0.3b * Tue Mar 06 2001 Lenny Cartier <lenny@mandrakesoft.com> 0.3a-1mdk - upated to 0.3a * Wed Feb 28 2001 Lenny Cartier <lenny@mandrakesoft.com> 0.3-1mdk - new in contribs