here is the wanna be version, there are some problem, some difficult some less.
lua problem is now solved,
but arose the change from openthread4 to 6 that lead to some required changes...(solved)
no more talk, here the script for yours checking:
#!/bin/bash
# ### ATTENTION ###################################################################### #
# I'll don't take any liability for this scripts, use at your own risk ! #
# #################################################################################### #
# Original Author: cdkeito #
# Edited by: R3N3G4D3 #
# (fixed several minor bugs in the script to make it compatible with English Vanilla #
# version of 32-bit Ubuntu 7.10) #
# Edited by: cdkeito #
# (added some more) #
# Updated by: cdkeito (05/06/2008) #
# #################################################################################### #
echo "Hi, I'm going to make a ./yake directory and i'll work inside of that. I'm going to gather all the necessary libs to build YAKE, so you'll need to be root to run me. I like clean things so everythings will be inside the /usr/include and /usr/lib. In the end i'll make a deb package. cdkeito'll don't take any liability for me, use me at your own risk."
echo
echo "Before this, you have to enable all (not sources) repositories. Check your internet connection and that apt-get is working."
echo
# check root or exit
if [ "$UID" -ne "0" ]; then
echo "You must be root for this."
exit 65
fi
echo -n "Do you wish to continue [Y/n] ? "
read -e risposta
! [ "$risposta" ] && risposta=y
if [ $risposta = 'n' ] || [ $risposta = 'N' ]; then
exit 1
fi
echo //usr/local/lib >> /etc/ld.so.conf
mkdir ./yake &> /dev/null
cd ./yake
INSTALL_DIR=$PWD/yake
ARCH=`uname -m`
# YAKE_VER + later auto check in the source
YAKE_VER=0.7
YAKE_INST=no
echo
echo "Do you wish to install Yake"
echo -n "(This will install the dev packet also, if made)[y/N] ? "
read -e risposta
! [ "$risposta" ] && risposta=n
if [ $risposta = 'y' ] || [ $risposta = 'Y' ]; then
YAKE_INST=yes
fi
YAKE_STRIP=yes
YAKE_DBG=
echo
echo "Do you wish to make \"debug\" YAKE"
echo -n "(only \"non debug\" will generate the dev packet)[y/N] ? "
read -e risposta
! [ "$risposta" ] && risposta=n
if [ $risposta = 'y' ] || [ $risposta = 'Y' ]; then
YAKE_STRIP=no
YAKE_DBG=-dbg
fi
# make sure reps and system are up to date
apt-get update
echo
echo -n "Can I upgrade your system (apt-get upgrade) [y/N] ? "
read -e risposta
if [ $risposta = 'y' ] || [ $risposta = 'Y' ]; then
apt-get upgrade
fi
RQ_EXIT=no
echo
echo -n "Do you wish to install Deps [y/N] ? "
read -e risposta
if [ $risposta = 'y' ] || [ $risposta = 'Y' ]; then
# base tools
apt-get install devscripts dh-make make build-essential dpkg apt checkinstall pkg-config
# svn cvs unzip bjam
apt-get install subversion cvs unzip bjam boost-build libsdl1.2debian-all
if [ `cat /usr/share/boost-build/user-config.jam | grep -xc 'using gcc ;'` -eq 0 ]; then
echo "using gcc ;" >> /usr/share/boost-build/user-config.jam
fi
# premake v3.5
# http://sourceforge.net/project/showfiles.php?group_id=71616
wget http://heanet.dl.sourceforge.net/sourceforge/premake/premake-linux-3.5.tar.gz
tar -xvzf premake-linux-3.5.tar.gz
mv premake /usr/bin/
rm premake-linux-3.5.tar.gz
# boost v1.34.1-2ubuntu
apt-get install libboost-dbg libboost-dev libboost-signals1.34.1 libboost-signals-dev libboost-thread1.34.1 libboost-thread-dev
# property tree
cd ~/yake
wget 'http://www.boost-consulting.com/vault/index.php?action=downloadfile&filename=property_tree_rev5.zip'
mv index.php* property_tree.zip
unzip property_tree.zip -d pt
cp -r pt/boost/* /usr/include/boost/
rm property_tree.zip
rm -r pt
# lua v5.1.3
# problem: many systems come with lua preinstalled, some time 5.0 and 5.1 versions at the same time, to do a clean setup you need to remove *lua*, BUT it'll uninstall half system
wget 'http://www.lua.org/ftp/lua-5.1.3.tar.gz'
tar -xvzf lua-5.1.3.tar.gz
rm lua-5.1.3.tar.gz
wget 'https://dev.openwrt.org/browser/packages/lang/lua/patches/lua-5.1.1-so.patch?rev=5911&format=raw' --no-check-certificate
sed -e 's/5.1.1/5.1.3/' -e 's/5.1.1/5.1.3/' -e '/PLATS= aix ansi bsd generic linux macosx mingw posix solaris/s/bsd/bsd freebsd/' -e '/\$(MAKE) all MYCFLAGS=\-DLUA_USE_MACOSX/s/USE_MACOSX/USE_LINUX MYLIBS=\"\-lreadline\"/' 'lua-5.1.1-so.patch?rev=5911&format=raw' > llualib.patch
rm 'lua-5.1.1-so.patch?rev=5911&format=raw'
patch -p0 < llualib.patch
mv lua-5.1.3/src/Makefile lua-5.1.3/src/Makefile.origpatch
sed -e '/CFLAGS= \-O2 \-Wall \$(MYCFLAGS)/s/Wall/Wall \-fPIC/' -e '/PLAT= none/s/none/none\nPKG_VERSION=5.1.3/' lua-5.1.3/src/Makefile.origpatch > lua-5.1.3/src/Makefile
cd lua-5.1.3
atp-get install libreadline5-dev
make linux
make install
checkinstall -D --pkgname="liblua5.1-0" --pkgversion="5.1.3" --pkgarch=$ARCH --pkgrelease='ubuntu0' --pkglicense='MIT' --pkggroup='extras' --pkgsource=./ --pakdir=../ --maintainer='root' --addso --type='debian' --install=yes --strip=yes --stripso=yes -y &> /dev/null
cd ..
rm -r lua-5.1.3
# thanks to https://dev.openwrt.org/browser/packages/lang/lua/patches/lua-5.1.1-so.patch?rev=5911
# enet v1.1-1
apt-get install libenet1 libenet1-dev
# ogg v1.1.3-2ubuntu2
apt-get install libogg0 libogg-dev
# vorbis v1.2.0.dfsg-1
apt-get install libvorbis0a libvorbis-dev
# luabind v cvs_trunk
# errors with make, using bjam
cd $INSTALL_DIR
## svn co -r 501 https://luabind.svn.sourceforge.net/svnroot/luabind/trunk luabind
svn co https://luabind.svn.sourceforge.net/svnroot/luabind/trunk luabind
cd luabind
export BOOST_ROOT=/usr/include/boost
export LUA_PATH=/usr/local/include/
export BOOST_BUILD_PATH=/usr/share/boost-build
# ########################################################### #
# add object.hpp patching, if correct (see forum) #
# ########################################################### #
sed -i -e "s/object result = const_cast<adl::call_proxy<W,A>\&>(proxy);//" -e "s/result.push(result.interpreter());/const_cast<adl::call_proxy<W,A>\&>(proxy).push(interpreter);/" luabind/object.hpp &> /dev/null
bjam
apt-get install libluabind-dev
cp -r luabind /usr/include/
cp lib/* /usr/lib/
cd ..
rm -r luabind
# openthreads 6
apt-get install libopenthreads*
# ode v1:0.8.dfsg-3
apt-get install libode0debian1 libode-dev
# openal v1:0.0.8-4ubuntu2
apt-get install libopenal0a libopenal-dev
# openallpp v20060714-3build2
apt-get install libportaudio-dev libogg-dev libvorbis-dev
wget 'https://launchpad.net/ubuntu/feisty/+source/openalpp-cvs/20060714-3build2/+files/openalpp-cvs_20060714.orig.tar.gz' --no-check-certificate
tar -xvzf openalpp-cvs_20060714.orig.tar.gz
cd openalpp-cvs_20060714
./autogen.sh
./configure
make
make install
checkinstall -D --type='debian' --pkgname='libopenalpp-cvs1' --pkgversion='20060714' --nodoc --pkgrelease="1Ubuntu" -y
cd ..
rm openalpp-cvs_20060714.orig.tar.gz
rm -r openalpp-cvs_20060714
# ofusion last
cd $INSTALL_DIR
wget http://www.ofusiontechnologies.com/oFusionCE/oSceneLoaderLib_ce.zip
unzip oSceneLoaderLib_ce.zip
mv oSceneLoaderLib_ce /usr/include/oSceneLoaderLib
rm oSceneLoaderLib_ce.zip
# tinyxml v2.5.3
# http://sourceforge.net/project/showfiles.php?group_id=13559
cd $INSTALL_DIR
wget http://kent.dl.sourceforge.net/sourceforge/tinyxml/tinyxml_2_5_3.tar.gz
tar -xvzf tinyxml_2_5_3.tar.gz
mv tinyxml /usr/include/
rm tinyxml_2_5_3.tar.gz
# freealut v1.1.0-1
apt-get install libalut0 libalut-dev
# cg v1.5.0.0019-1
apt-get install nvidia-cg-toolkit
echo
echo -n "Do you wish to install the repository's Ogre (not suggested if you want the last version, not alway available in repos)[y/N] ? "
read -e risposta
if [ $risposta = 'y' ] || [ $risposta = 'Y' ]; then
# ogre v1.4.3
apt-get install libois1 libogre14 libogre14-dbg libogre-dev ogre-doc ogre-tools
# copying debug libs syslink
mkdir /usr/lib/debug/usr/work_bhy
ln -s /usr/lib/debug/usr/lib/lib* /usr/lib/debug/usr/work_bhy/
rename 's/\.so.*/_d.so/' /usr/lib/debug/usr/work_bhy/*
cp -P /usr/lib/debug/usr/work_bhy/* /usr/lib/
rm /usr/lib/debug/usr/work_bhy/*
ln -s /usr/lib/debug/usr/lib/OGRE/* /usr/lib/debug/usr/work_bhy/
rename 's/\.so.*/_d.so/' /usr/lib/debug/usr/work_bhy/*
cp -P /usr/lib/debug/usr/work_bhy/* /usr/lib/OGRE/
rm -r /usr/lib/debug/usr/work_bhy
ln -s /usr/lib/libCEGUIOgreRenderer.so /usr/lib/libOgreGUIRenderer.so
ln -s /usr/lib/libCEGUIOgreRenderer_d.so /usr/lib/libOgreGUIRenderer_d.so
cp -P /usr/lib/libOIS.so /usr/lib/libOIS_d.so
else
RQ_EXIT=yes
echo
echo "Look here, for a script to autoinstall Ogre: http://talesbook.ilbello.com/imgs/makeOgre.sh"
echo "or here: http://www.ogre3d.org/phpBB2/viewtopic.php?t=40832"
echo "or"
echo "You have to donwload, compile and install libois"
echo "do after libois installation : cp -P /usr/lib/libOIS.so /usr/lib/libOIS_d.so"
echo "and"
echo "You have to download, compile and install Ogre"
echo
echo "Remember to make syslink to Ogre's libs (*.so and *_d.so) in /usr/lib"
echo "and ln -s /usr/lib/libCEGUIOgreRenderer.so /usr/lib/libOgreGUIRenderer.so (_d also)"
echo
echo "Do not compile Yake before you have done this."
fi
echo "Deps installed!"
fi
if [ $RQ_EXIT = 'yes' ]; then
exit 0
fi
# ############################################# DEPS ################################################# #
# ###################################################################################################### #
# ############################################# YAKE ################################################# #
echo
echo -n "Do you wish to compile Yake? Have you already installed Ogre? [y/N] ? "
read -e risposta
if [ $risposta = 'y' ] || [ $risposta = 'Y' ]; then
# yake-0.7 download/update
svn co https://yake.svn.sourceforge.net/svnroot/yake/branches/v0-7-0 ./
# setup, for samples to be builded in a second time, at the botton i'll make build_samples.sh
mv yake/scripts/premake/config.lua yake/scripts/premake/config.lua.bak
sed -e '/PLUGIN_SCRIPTING_LUA/s/\-\-//' -e '/SAMPLES_INCLUDED_IN_THE_CORE_SOLUTION/s/true/false/' -e '/GRAPHICOGRE_USES_OSM/s/\-\-//' yake/scripts/premake/config.lua.bak > yake/scripts/premake/config.lua
# patching, because of the above setup...little things
cp -r /usr/include/tinyxml yake/dependencies/
mv yake/yake/bindings.lua/common/yake.lua.common.h yake/yake/bindings.lua/common/yake.lua.common.h.bak
# sed -e '/INCLUDE\|include/s/\"lua.h\"/<lua5.1\/lua.h>/' -e '/INCLUDE\|include/s/\"lualib.h\"/<lua5.1\/lualib.h>/' -e '/INCLUDE\|include/s/\"lauxlib.h\"/<lua5.1\/lauxlib.h>/' yake/yake/bindings.lua/common/yake.lua.common.h.bak > yake/yake/bindings.lua/common/yake.lua.common.h
mv yake/src/plugins/ceguiOgreRendererAdapter/plugin.cpp yake/src/plugins/ceguiOgreRendererAdapter/plugin.cpp.bak
sed -e '/INCLUDE\|include/s/<CEGUI.h>/<CEGUI\/CEGUI.h>/' -e '/INCLUDE\|include/s/<Ogre.h>/<OGRE\/Ogre.h>/' -e '/INCLUDE\|include/s/\"OgreNoMemoryMacros.h\"/<OGRE\/OgreNoMemoryMacros.h>/' -e '/INCLUDE\|include/s/\"OgreCEGUIRenderer.h\"/<OGRE\/OgreCEGUIRenderer.h>/' yake/src/plugins/ceguiOgreRendererAdapter/plugin.cpp.bak > yake/src/plugins/ceguiOgreRendererAdapter/plugin.cpp
mv yake/yake/plugins/ceguiOgreRendererAdapter/pch.h yake/yake/plugins/ceguiOgreRendererAdapter/pch.h.bak
sed -e '/INCLUDE\|include/s/\"Ogre.h\"/<OGRE\/Ogre.h>/' yake/yake/plugins/ceguiOgreRendererAdapter/pch.h.bak > yake/yake/plugins/ceguiOgreRendererAdapter/pch.h
mv yake/src/plugins/inputOgreOIS/InputSystemOgreOIS.cpp yake/src/plugins/inputOgreOIS/InputSystemOgreOIS.cpp.bak
sed -e '/INCLUDE\|include/s/<Ogre.h>/<OGRE\/Ogre.h>/' -e '/INCLUDE\|include/s/<OIS.h>/<OIS\/OIS.h>/' yake/src/plugins/inputOgreOIS/InputSystemOgreOIS.cpp.bak > yake/src/plugins/inputOgreOIS/InputSystemOgreOIS.cpp
mv yake/yake/plugins/graphicsOgre/yakePCH.h yake/yake/plugins/graphicsOgre/yakePCH.h.bak
sed -e '/INCLUDE\|include/s/<Ogre/<OGRE\/Ogre/' yake/yake/plugins/graphicsOgre/yakePCH.h.bak > yake/yake/plugins/graphicsOgre/yakePCH.h
mv yake/src/plugins/graphicsOgre/yakeGraphicsWorld.cpp yake/src/plugins/graphicsOgre/yakeGraphicsWorld.cpp.bak
sed -e '/INCLUDE\|include/s/<Ogre/<OGRE\/Ogre/' yake/src/plugins/graphicsOgre/yakeGraphicsWorld.cpp.bak > yake/src/plugins/graphicsOgre/yakeGraphicsWorld.cpp
mv yake/src/plugins/graphicsOgre/graphicsOgreCore.cpp yake/src/plugins/graphicsOgre/graphicsOgreCore.cpp.bak
sed -e '/INCLUDE\|include/s/<Ogre/<OGRE\/Ogre/' yake/src/plugins/graphicsOgre/graphicsOgreCore.cpp.bak > yake/src/plugins/graphicsOgre/graphicsOgreCore.cpp
# build makefile and missing build_sample.sh
cd yake/scripts/linux
sed -e 's/yake.lua/..\/premake\/samples.lua/' build.sh > build_samples.sh
sed -i 's/yake.lua/..\/premake\/yake.lua/' build.sh
chmod +x build_samples.sh
./build.sh
# patching makefile for OgreCEGUIRenderAdapter (if problem not solved, i hope it'll be!)
# mv yake/scripts/linux/Makefile yake/scripts/linux/Makefile.bak
# sed -e 's/@$(MAKE) \-\-no-print\-directory \-C . \-f ceguiOgreRendererAdapter.make/\# @$(MAKE) \-\-no-print\-directory \-C . \-f ceguiOgreRendererAdapter.make/' yake/scripts/linux/Makefile.bak > yake/scripts/linux/Makefile
mv Makefile Makefile.bak
sed -e 's/@$(MAKE) \-\-no-print\-directory \-C . \-f ceguiOgreRendererAdapter.make/\# @$(MAKE) \-\-no-print\-directory \-C . \-f ceguiOgreRendererAdapter.make/' Makefile.bak > Makefile
# echo "#!/bin/bash" > yake/scripts/linux/install.sh
# echo " " >> yake/scripts/linux/install.sh
# echo "cd ../../../" >> yake/scripts/linux/install.sh
# echo "chmod -R a+r yake" >> yake/scripts/linux/install.sh
# echo "cp -rH yake/yake /usr/include/" >> yake/scripts/linux/install.sh
# echo "mkdir /usr/share/doc/yake" >> yake/scripts/linux/install.sh
# echo "chmod a+rx /usr/include/yake" >> yake/scripts/linux/install.sh
# echo "chmod a+rx /usr/share/doc/yake" >> yake/scripts/linux/install.sh
# echo "cp -rH yake/common/bin/lib* /usr/lib/" >> yake/scripts/linux/install.sh
# echo "cp -rH yake/documentation/* /usr/share/doc/yake/" >> yake/scripts/linux/install.sh
# echo "find /usr/share/doc/yake/ -name .svn -type d -print0 | xargs -0 /bin/rm -rf" >> yake/scripts/linux/install.sh
# echo "find /usr/include/yake/ -name .svn -type d -print0 | xargs -0 /bin/rm -rf" >> yake/scripts/linux/install.sh
# echo "cp -rH yake/AUTHORS /usr/share/doc/yake/" >> yake/scripts/linux/install.sh
# echo "cp -rH yake/COPYING /usr/share/doc/yake/" >> yake/scripts/linux/install.sh
# echo "cp -rH yake/COPYING.LIB /usr/share/doc/yake/" >> yake/scripts/linux/install.sh
# echo "cp -rH yake/LICENSE /usr/share/doc/yake/" >> yake/scripts/linux/install.sh
# echo "cp -rH yake/NOTES /usr/share/doc/yake/" >> yake/scripts/linux/install.sh
# echo "cp -rH yake/README /usr/share/doc/yake/" >> yake/scripts/linux/install.sh
# echo "echo 'Installed!'" >> yake/scripts/linux/install.sh
# echo " " >> yake/scripts/linux/install.sh
# echo "YAKE. Copyright ? 2004 The YAKE Team, Stephan Kaiser. For the latest information visit http://www.yake.org. libyake 0.7.0 - only for testing purprose, use at your own risk." > yake/scripts/linux/description-pak
# echo " " >> yake/scripts/linux/description-pak
echo "#!/bin/bash" > install.sh
echo " " >> install.sh
echo "cd ../../../" >> install.sh
echo "chmod -R a+r yake" >> install.sh
echo "cp -rH yake/yake /usr/include/" >> install.sh
echo "mkdir /usr/share/doc/yake" >> install.sh
echo "chmod a+rx /usr/include/yake" >> install.sh
echo "chmod a+rx /usr/share/doc/yake" >> install.sh
echo "cp -rH yake/common/bin/lib* /usr/lib/" >> install.sh
echo "cp -rH yake/documentation/* /usr/share/doc/yake/" >> install.sh
echo "find /usr/share/doc/yake/ -name .svn -type d -print0 | xargs -0 /bin/rm -rf" >> install.sh
echo "find /usr/include/yake/ -name .svn -type d -print0 | xargs -0 /bin/rm -rf" >> install.sh
echo "cp -rH yake/AUTHORS /usr/share/doc/yake/" >> install.sh
echo "cp -rH yake/COPYING /usr/share/doc/yake/" >> install.sh
echo "cp -rH yake/COPYING.LIB /usr/share/doc/yake/" >> install.sh
echo "cp -rH yake/LICENSE /usr/share/doc/yake/" >> install.sh
echo "cp -rH yake/NOTES /usr/share/doc/yake/" >> install.sh
echo "cp -rH yake/README /usr/share/doc/yake/" >> install.sh
echo "echo 'Installed!'" >> install.sh
echo " " >> install.sh
echo "YAKE. Copyright ? 2004 The YAKE Team, Stephan Kaiser. For the latest information visit http://www.yake.org. libyake 0.7.0 - only for testing purprose, use at your own risk." > description-pak
echo " " >> description-pak
# debug
export CONFIG=Debug
make LIBS+=-lluabind
# release
export CONFIG=Release
make LIBS+=-lluabind
chmod -R a+r yake
chmod a+x install.sh
fi
echo " "
echo -n "Do you wish to install it [y/n] ? "
read -e risposta
if [ $risposta = 'n' ] || [ $risposta = 'N' ]; then
# checkinstall and it's setups
checkinstall -D --install=no --type='debian' --pkgname='libyake' --pkgversion='0.7.0' --pakdir=$INSTALL_DIR --nodoc --maintainer='root' --pkglicense='LGPL'--pkgrelease="1UbuntuODE" ./install.sh
else
# checkinstall and it's setups
checkinstall -D --type='debian' --pkgname='libyake' --pkgversion='0.7.0' --pakdir=$INSTALL_DIR --nodoc --maintainer='root' --pkglicense='LGPL'--pkgrelease="1UbuntuODE" ./install.sh
fi
echo "Done, enjoy!"