[Crossfire-wiki] [Crossfire DokuWiki] page added: crossfire_compile_guide_script
no-reply_wiki at metalforge.org
no-reply_wiki at metalforge.org
Fri Jun 10 16:43:56 CDT 2011
A page in your DokuWiki was added or changed. Here are the details:
Date : 2011/06/10 16:43
User : meflin
Edit Summary: created
#!/usr/bin/env bash
die() {
echo "Error: $@" >&2
exit 1
}
checkout_or_up() {
if [[ ! -d "${1}.svn" ]]; then
svn co https://crossfire.svn.sourceforge.net/svnroot/crossfire/"$1"/trunk "${1}.svn"
else
( cd "${1}.svn" && svn up )
fi
}
export CFLAGS="-O0 -ggdb3"
export PATH="/usr/local:$PATH"
cd || die "Couldn't go to home"
checkout_or_up arch || die "Checkout arch failed"
checkout_or_up server || die "Checkout server failed"
checkout_or_up maps || die "Checkout maps failed"
cd server.svn/ || die "Couldn't change directory to server.svn"
#patch -R -p0 -i ../automess.patch
[[ -e /usr/games/crossfire ]] || ( echo "/usr/games/crossfire does not exsist create this directory and make sure it is owned by this user as root" &&\
echo " mkdir -p /usr/games/crossfire && chown "`whoami`"."`whoami`" /usr/games/crossfire/" && echo "" &&\
echo "If you want server loging run this command as root" &&\
echo " mkdir -p /var/log/crossfire && chown "`whoami`"."`whoami`" /var/log/crossfire/" && echo "" &&\
echo "when this is done re-run his script" )
[[ -e /usr/games/crossfire ]] || exit 1
[[ -e lib/arch ]] || (cd lib && ln -s ../../arch.svn arch )
[[ -e maps ]] || ( ln -s ../maps.svn maps )
[[ -e /usr/games/crossfire/share/crossfire ]] || ( mkdir -p /usr/games/crossfire/share/crossfire )
[[ -e /usr/games/crossfire/share/crossfire/maps ]] || ( ln -s ~//maps.svn /usr/games/crossfire/share/crossfire/maps )
[[ -e macros/libtool.m4 ]] || ( bash autogen.sh )
##uncoment if you are using a special build of automes like required on centos5
#[[ -f macros/libtool.m4 ]] || cp /usr/share/aclocal/libtool.m4 macros/
#/usr/local/bin/autoreconf --install || die "Autoreconf failed"
autoreconf --install || die "Autoreconf failed"
[[ -f Makefile ]] && make distclean
#export CFLAGS=-DEXP_DEBUG
./configure || die "Configure failed"
cd lib || die "Couldn't change directory to lib"
make collect || die "Make collect failed"
cd .. || die "Couldn't change directory to back up from lib"
nice -n 19 make -j 4 || die "Server compile failed"
#Uncomment if you want to save old servers for debuging core files
cp /usr/games/crossfire/bin/crossfire-server /usr/games/crossfire/bin/`date +%F`-crossfire-server
make install || die "Make install failed"
make check
#remove varios things here
rm -f /usr/games/crossfire/lib/crossfire/plugins/citylife*
rm -f /usr/games/crossfire/lib/crossfire/plugins/*darcap*
rm -f /usr/games/crossfire/share/crossfire/maps/python/*pyc
echo ""
echo "If the compile did not end in errors"
echo "Your crossfire server has been installed in /usr/games/crossfire/bin/"
echo "Running crossfire processes"
echo ""
ps -ef | grep crossfire
echo $'\a \a'
IP-Address : 107.2.148.83
Old Revision: none
New Revision: http://wiki.metalforge.net/doku.php/crossfire_compile_guide_script
--
This mail was generated by DokuWiki at
http://wiki.metalforge.net/
More information about the crossfire-wiki
mailing list