#!/bin/sh ### # 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/evas e17/libs/ecore e17/libs/embryo e17/libs/edje e17/libs/emotion e17/libs/epeg e17/libs/imlib2 e17/libs/epsilon e17/libs/ewl e17/libs/exml e17/libs/esmart" 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 if [ $NOSUDO == "no" ]; then # detect distribution here if [ -f "/etc/apt/sources.list" ]; then F=`grep "unstable" "/etc/apt/sources.list" | grep "debian.org"` if [ -n "$F" ]; then DISTRO="debian-unstable" else F=`grep " sid" "/etc/apt/sources.list" | grep "debian.org"` if [ -n "$F" ]; then DISTRO="debian-unstable" fi fi fi if [ $DISTRO == "debian-unstable" ]; then sudo apt-get update sudo apt-get install \ gcc make \ automake1.9 autoconf autoconf-archive libtool gettext \ libc6-dev \ zlib1g-dev libjpeg62-dev \ libpng12-dev libfreetype6-dev \ libxrender-dev libx11-dev libxinerama-dev \ libxss-dev libxext-dev libxrandr-dev libxp-dev \ libxfixes-dev libxdamage-dev libxcursor-dev \ libpam0g-dev elif [ $DISTRO == "sample-distribution" ]; then echo "sample distro" # FIXME: put in whatever commands are needed to get a good list of # dependencies for e and install themb - cvs build tools etc. too. only # put what is needed - there are optional libs like libtiiff/gif etc. # but they hve no direct required to really suggested usefulness. else echo "Your distribution is not supported. Please adit this script and" echo "add a section to detect your distribution and then to install" echo "required packages for it." 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