I've wrote following and it works for my compiled from svn version of ufoai 2.2.
Frankly, I'm far from linux guru, so my "creation" is FAR from pefect. But still, it works.
It copy all needed files to /usr/local/games/ufoai and create binary file /usr/local/bin/ufo to start game.
I have some questions about files I've copy.
Are all of them needed?
I realize that ALL files in /base/music are needed. But what about /base/maps? Are there only .bsp files needed here? Are ALL of these files using in game process? And all bsp in subfolders (/base/maps/b/a/, /base/maps/icen/, etc)?
What about /base/models, /base/pics, /base/shaders, /base/textures? Just copy all of them and nothing more?
Anyway, my first experience in making of Makefile:
install:
@echo Installing binary files
@rm -fr /usr/local/games/ufoai
@mkdir /usr/local/games/ufoai
@cp -t /usr/local/games/ufoai ufo ufoded ufo2map ref_glx.so ref_sdl.so snd_alsa.so snd_arts.so snd_oss.so snd_sdl.so qdata ufomaster
@echo Installing base files
@mkdir /usr/local/games/ufoai/base
@cp -t /usr/local/games/ufoai/base base/archives.sh base/default.cfg base/keys.cfg base/mapshots.cfg base/autoexec.cfg base/game.so base/mapcycle.txt base/dedicated.cfg
@echo Installing i18n
@for fn in `find base/i18n -name '*.*' | grep -v .svn`; do \
echo $$fn ; \
cp --parents -t /usr/local/games/ufoai $$fn ; \
done
@echo Installing maps
@for fn in `find base/maps -name '*.bsp'`; do \
echo $$fn ; \
cp --parents -t /usr/local/games/ufoai $$fn ; \
done
@echo Installing media files
@for fn in `find base/media -name '*.ttf'`; do \
echo $$fn ; \
cp --parents -t /usr/local/games/ufoai $$fn ; \
done
@echo Installing models
@for fn in `find base/models -name '*.*' | grep -v .svn`; do \
echo $$fn ; \
cp --parents -t /usr/local/games/ufoai $$fn ; \
done
@echo Installing music files
@for fn in `find base/music -name '*.*' | grep -v .svn`; do \
echo $$fn ; \
cp --parents -t /usr/local/games/ufoai $$fn ; \
done
@echo Installing pics
@for fn in `find base/pics -name '*.*' | grep -v .svn`; do \
echo $$fn ; \
cp --parents -t /usr/local/games/ufoai $$fn ; \
done
@echo Installing shaders
@for fn in `find base/shaders -name '*.*' | grep -v .svn`; do \
echo $$fn ; \
cp --parents -t /usr/local/games/ufoai $$fn ; \
done
@echo Installing sound files
@for fn in `find base/sound -name '*.*' | grep -v .svn`; do \
echo $$fn ; \
cp --parents -t /usr/local/games/ufoai $$fn ; \
done
@echo Installing textures
@for fn in `find base/textures -name '*.*' | grep -v .svn`; do \
echo $$fn ; \
cp --parents -t /usr/local/games/ufoai $$fn ; \
done
@echo Installing ufos
@for fn in `find base/ufos -name '*.*' | grep -v .svn`; do \
echo $$fn ; \
cp --parents -t /usr/local/games/ufoai $$fn ; \
done
@echo Installing last binary file
rm -f /usr/local/bin/ufo
echo cd /usr/local/games/ufoai > /usr/local/bin/ufo
echo ufo >> /usr/local/bin/ufo
chmod a+x /usr/local/bin/ufo
@echo Installing complete. Type \'ufo\' to play game.