All pastes #139300 Raw Edit

Something

public text v1 · immutable
#139300 ·published 2006-08-19 21:03 UTC
rendered paste body
#!/bin/sh
CFLAGS=" -march=i686"
CXXFLAGS="$CFLAGS"

###
# this is a convenience script for getting/updating e17 from cvs.
# (this is what you need to build e17 and entrance).
###

###
# settings - feel free to change these...
###
# the directory to install into (a full path to where on the system to install)
PREFIX="/usr/local"
# install as root ("yes" or "no") - note. you CAN install as a user too, but
# only into directories you have permission to install into. also you will
# need to modify your LD_LIBRARY_PATH shell variable to access things
ROOT_INSTALL="yes"
# build enlightenment - the window manager ("yes" or "no")
BUILD_E="yes"
# build entrance - the login manager ("yes" or "no")
BUILD_ENTRANCE="no"
###
# end config
###









# modules
CORE_MODULES="e17/libs/eet e17/libs/edb e17/libs/evas e17/libs/ecore e17/libs/embryo e17/libs/imlib2 e17/libs/edje e17/libs/epeg e17/libs/epsilon e17/libs/esmart e17/libs/emotion e17/libs/engrave e17/libs/ewl e17/proto/etk"
E_MODULES="e17/apps/e"
ENTRANCE_MODULES="e17/libs/imlib2 e17/libs/epeg e17/libs/epsilon e17/libs/esmart e17/apps/entrance"

MODULES=$CORE_MODULES
if [ $BUILD_ENTRANCE == "yes" ]; then
  MODULES=$MODULES" "$ENTRANCE_MODULES
fi
if [ $BUILD_E == "yes" ]; then
  MODULES=$MODULES" "$E_MODULES
fi

# actual working parts of the script (no need to really touch this)
if [ $ROOT_INSTALL == "yes" ]; then
  echo "---------------------------------------------------------------------"
  echo ""
  # test sudo
  echo "Check sudo access"
  NOSUDO="no"
  sudo ls /root || NOSUDO="yes"

  if [ $NOSUDO == "yes" ]; then
    echo "You have no sudo access. You need this to install on the system."
    echo "Try add this line to your /etc/sudoers file:"
    echo ""
    echo $USER" ALL=(ALL) NOPASSWD: ALL"
    exit -1
  fi

  # check ldo.so.conf
  echo "Check /etc/ld.so.conf sanity"
  LDCONF=`grep $PREFIX/lib /etc/ld.so.conf`
  if [ -z "$LDCONF" ]; then
    echo "Add "$PREFIX"/lib to /etc/ld.so.conf please."
    exit -1
  fi
fi

# enable error abort from now on
set -e

# make sure we have the prefix in the PATH for now
export PATH=$PATH:$PREFIX"/bin"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PREFIX"/lib"

CLEAN="no"

# check if we have a cvs tre already
if [ -f ./e17/CVS/Root ]; then
  echo "---------------------------------------------------------------------"
  echo ""
  echo "Updating CVS"
  CLEAN="yes"
  cd ./e17
  cvs -z3 update -dP
  cd ..
else
  # get cvs
  echo "---------------------------------------------------------------------"
  echo ""
  echo "Just hit enter for the cvs password!"
  cvs -d :pserver:anonymous@anoncvs.enlightenment.org:/var/cvs/e login
  cvs -z3 -d :pserver:anonymous@anoncvs.enlightenment.org:/var/cvs/e co e17
fi

# build and install it all
echo "---------------------------------------------------------------------"
echo ""
echo "Build..."
for I in $MODULES; do
  pushd $I
  echo "---------------------------------------------------------------------"
  echo ""
  echo "Building: "$I
  echo ""
  if [ $CLEAN == "yes" ]; then
    make clean distclean || true
  fi
  echo ""
  echo "Autofoo: "$I
  echo ""
  ./autogen.sh --prefix=$PREFIX
  echo ""
  echo "Compiling: "$I
  echo ""
  make
  echo ""
  echo "Installing: "$I
  echo ""
  if [  $ROOT_INSTALL == "yes" ]; then
    sudo make install
    sudo ldconfig
  else
    make install
  fi
  popd
done

echo "---------------------------------------------------------------------"
echo ""
echo "NOTE: you will want to add "$PREFIX"/bin to your user's (and maybe"
echo "      root's) PATH variable. (see your documentation on the PATH shell"
echo "      variable for more information on how to do this)."
if [ $ROOT_INSTALL == "no" ]; then
echo "NOTE: you will want to add "$PREFIX"/lib to your user's (and maybe"
echo "      root's) LD_LIBRARY_PATH variable. (see your documentation on the"
echo "      LD_LIBRARY_PATH shell variable for more information on how to do"
echo "      this)."
fi