#!/bin/bash # # Automatic TRIBLER installer. Downloads and installs the # following packages in a "usr" subtree in the current directory: # - Python 2.4.2 # - OpenSSL 0.9.8a # - SWIG 1.3.27 # - M2Crypto from measure's SVN repository # and: # - Downloads the Tribler source codes from sf.net # - Creates a `startabc' script in the abc subtree which sets # the correct environment variables and starts btlaunchmany.py # # WARNING: By default, all data existing in any "usr" "build" # and "mainbranch" subtree will be removed before the install is started. # Even if the RESET_INSTALL variable below is set to 'no', no guarantee # will be made for your existing data in those directories! # RESET_INSTALL=yes INSTALL_OPENSSL=yes INSTALL_M2CRYPTO=yes INSTALL_SUPERPEER=noyes INSTALL_TRIBLER=yes #Assume your system have installed Python2.4 with bsddb binding, swig 1.3 or above, svn which supports https #zlib is needed for compiling openssl. If zlib is not installed, first login as root, and run: apt-get install zlib1g zlib1g-dev swig1.3 cd export DIR=`pwd` mkdir -p build usr if [ "$RESET_INSTALL" == "yes" ] then echo ------------------------------------- echo Resetting... echo ------------------------------------- rm -rf build/* usr/* echo done! fi cd build if [ "$INSTALL_OPENSSL" == "yes" ] then echo ------------------------------------- echo Installing OpenSSL 0.9.8e... echo ------------------------------------- wget -q http://www.openssl.org/source/openssl-0.9.8e.tar.gz tar xfz openssl-0.9.8e.tar.gz cd openssl-0.9.8e ./config shared zlib --prefix=$DIR/usr/local --openssldir=$DIR/usr/local/openssl make make install echo done! cd .. fi if [ "$INSTALL_M2CRYPTO" == "yes" ] then echo ------------------------------------- echo Installing M2Crypto 0.15... echo ------------------------------------- echo pulling from web... rm -rf m2crypto svn co http://svn.tribler.org/m2crypto/branches/main m2crypto cd m2crypto export C_INCLUDE_PATH=$DIR/usr/local/include export LIBRARY_PATH=$DIR/usr/local/lib echo " Index: setup.py =================================================================== --- setup.py (revision 4079) +++ setup.py (working copy) @@ -28,7 +28,7 @@ elif os.name == 'posix': include_dirs = [my_inc, '/usr/include'] - swig_opts_str = '-I/usr/include' + swig_opts_str = '-I../../usr/local/include' library_dirs = ['/usr/lib'] if sys.platform == 'cygwin': # Cygwin SHOULD work (there's code in distutils), but " | patch -p0 python2.4 setup.py install --prefix=$DIR/usr/local echo done! cd .. fi cd if [ "$INSTALL_SUPERPEER" == "yes" ] then echo ------------------------------------- echo Installing TRIBLER SUPERPEER... echo ------------------------------------- echo pulling from web... mkdir -p superpeers cd superpeers rm -rf superpeer svn co https://svn.tribler.org/abc/branches/superpeer superpeer cd superpeer echo "#!/bin/bash DIR=$DIR export PYTHONPATH=\$DIR/usr/local/lib/python2.4/site-packages/ export LD_LIBRARY_PATH=\$DIR/usr/local/lib export LD_PRELOAD=\$DIR/usr/local/lib/libcrypto.so python2.4 btlaunchmany.py \"\$@\" " > starttribler.sh chmod u+x starttribler.sh . ./starttribler.sh cd ../.. fi cd if [ "$INSTALL_TRIBLER" == "yes" ] then echo ------------------------------------- echo Installing TRIBLER MAINBRANCH... echo ------------------------------------- echo pulling from web... rm -rf tribler svn co https://svn.tribler.org/abc/branches/mainbranch tribler echo done! cd tribler echo "#!/bin/bash DIR=$DIR export PYTHONPATH=\$DIR/usr/local/lib/python2.4/site-packages/ export LD_LIBRARY_PATH=\$DIR/usr/local/lib export LD_PRELOAD=\$DIR/usr/local/lib/libcrypto.so python2.4 btlaunchmany.py \"\$@\" " > starttribler.sh chmod u+x starttribler.sh . ./starttribler.sh cd .. fi