File openmortal.spec of Package openmortal

 # spec file for package openmortal (Version 0.7)
 # Copyright 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
 # upon. The license for this file, and modifications and additions to the
 # file, is the same license as for the pristine package itself (unless the
 # license for the pristine package is not an Open Source License, in which
 # case the license is the MIT License). An "Open Source License" is a
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.

Name: openmortal
Summary: Parody of the original fighting game "Mortal Kombat"
Group:  Amusements/Games/Action/Arcade
License: GPL
Version: 0.7
Release: 1
Source: %{name}-%{version}.tar.bz2
Patch0: openmortal-0.7-extra-qualification.patch
Patch1: openmortal-0.7-fix-build-with-freetype2.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build  
BuildRequires: gcc-c++, freetype2-devel
BuildRequires: libSDL-devel, libSDL_image-devel, libSDL_mixer-devel, libSDL_net-devel
OpenMortal is a spoof of the original Mortal Kombat fighting game. The
funny thing about OpenMortal is that you can play the game AS YOURSELF.
It takes some work, but if you follow the Character Creation-HOWTO at

Press Esc key to bring up the main menu.
You can skip most scenes (such as instant replays) with the F1 key.
The default keys are:
         Player 1        Player 2
Up       Cursor up       W
Down     Cursor down     S
Left     Cursor left     A
Right    Cursor right    D
HPunch   Insert          R
LPunch   Delete          F
HKick    Home            T
LKick    End             G
Block    PgDown          H

Up + Left: Jump to the left. Hit Kick or Punch for a jumpkick/punch.
Up + Right: Jump to the right. Hit Kick or Punch for a jumpkick/punch.
Back + HKick/HPunch: Spinning attack (depends on character)
Back + LKick: Leg sweep
Forward + LKick: Knee attack
Down, HPunch: Uppercut
Forward, Back + LKick: Groin kick (ouch!)

%setup -q  
%patch0 -p0
%patch1 -p1 -b .freetype-fix
export CPPFLAGS="-I/usr/include/freetype2"
# Assume that the package is built by plain 'make' if there's no ./configure.  
# This test is there only because the wizard doesn't know much about the  
# package, feel free to clean it up  
if test -x ./configure; then  
    %configure --prefix=/usr


make DESTDIR=test install 
mkdir build1
export BUILDROOT=%{buildroot}
echo '#!/bin/sh' >  cprun_
find ./ -name usr -printf "cp -a %%P $BUILDROOT\n" >>cprun_  
#find ./ -name usr -printf "cp -a %%P %%{buildroot} build1/\n" >>cprun_ 

cat cprun_

sh ./cprun_
ls -R build1
ls -R %{buildroot}
#echo %{buildroot}
#echo %(%{buildroot})
#ls -R /var/tmp/openmortal-0.7-root

echo '%%defattr(-,root,root)' >filelist  
find %{buildroot} -type f -printf '/%%P\n' >>filelist 
echo -e "/usr/share/openmortal\n" >>filelist
echo -e "/usr/share/openmortal/characters\n" >>filelist
echo -e "/usr/share/openmortal/fonts\n" >>filelist
echo -e "/usr/share/openmortal/gfx\n" >>filelist
echo -e "/usr/share/openmortal/script\n" >>filelist
echo -e "/usr/share/openmortal/sound\n" >>filelist
cat filelist

rm -rf %{buildroot}  
%files -f filelist  
# This is a place for a proper filelist:   
# You can also use shell wildcards:   
# This installs documentation files from the top build directory  
# into /usr/share/doc/...  
# The advantage of using a real filelist instead of the '-f filelist' trick is  
# that rpmbuild will detect if the install section forgets to install  
# something that is listed here