#!/bin/bash ### # this is a convenience script for getting/updating e17 from svn. # (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="no" ### # end config ### # modules CORE_MODULES="eina eet evas ecore e_dbus efreet embryo edje" E_MODULES="e" MODULES=$CORE_MODULES 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 /etc/ld.so.conf.d/*` 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 "gutsy" "/etc/apt/sources.list"` if [ -n "$F" ]; then DISTRO="ubuntu-gutsy" else F=`grep "feisty" "/etc/apt/sources.list"` if [ -n "$F" ]; then DISTRO="ubuntu-feisty" else F=`grep "hardy" "/etc/apt/sources.list"` if [ -n "$F" ]; then DISTRO="ubuntu-hardy" else F=`grep "intrepid" "/etc/apt/sources.list"` if [ -n "$F" ]; then DISTRO="ubuntu-intrepid" else F=`grep "unstable" "/etc/apt/sources.list"` if [ -n "$F" ]; then DISTRO="debian-unstable" else F=`grep " sid" "/etc/apt/sources.list"` if [ -n "$F" ]; then DISTRO="debian-unstable" fi fi fi fi fi fi fi echo "Detected distribution: $DISTRO" if [ "$DISTRO" == "debian-unstable" ]; then ## FIXME: unknown is this works or not sudo apt-get update sudo apt-get install \ xterm make gcc bison flex subversion \ automake1.10 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" == "ubuntu-feisty" ]; then sudo apt-get update sudo apt-get install \ xterm make gcc bison flex subversion automake1.10 autoconf autotools-dev \ autoconf-archive libtool gettext \ libpam0g-dev libfreetype6-dev libpng12-dev zlib1g-dev libjpeg-dev \ libtiff-dev libungif4-dev librsvg2-dev libx11-dev libxcursor-dev \ libxrender-dev libxrandr-dev libxfixes-dev libxdamage-dev \ libxcomposite-dev libxss-dev libxp-dev libxext-dev libxinerama-dev \ libxft-dev libxfont-dev libxi-dev libxv-dev libxkbfile-dev \ libxkbui-dev libxres-dev libxtst-dev libltdl3-dev libglu1-xorg-dev \ libglut3-dev xserver-xephyr libdbus-1-dev elif [ "$DISTRO" == "ubuntu-gutsy" ]; then sudo apt-get update sudo apt-get install \ xterm make gcc bison flex subversion automake1.10 autoconf autotools-dev \ autoconf-archive libtool gettext \ libpam0g-dev libfreetype6-dev libpng12-dev zlib1g-dev libjpeg-dev \ libtiff-dev libungif4-dev librsvg2-dev libx11-dev libxcursor-dev \ libxrender-dev libxrandr-dev libxfixes-dev libxdamage-dev \ libxcomposite-dev libxss-dev libxp-dev libxext-dev libxinerama-dev \ libxft-dev libxfont-dev libxi-dev libxv-dev libxkbfile-dev \ libxkbui-dev libxres-dev libxtst-dev libltdl3-dev libglu1-xorg-dev \ libglut3-dev xserver-xephyr libdbus-1-dev elif [ "$DISTRO" == "ubuntu-hardy" ]; then sudo apt-get update sudo apt-get install \ xterm make gcc bison flex subversion automake1.10 autoconf autotools-dev \ autoconf-archive libtool gettext \ libpam0g-dev libfreetype6-dev libpng12-dev zlib1g-dev libjpeg-dev \ libtiff-dev libungif4-dev librsvg2-dev libx11-dev libxcursor-dev \ libxrender-dev libxrandr-dev libxfixes-dev libxdamage-dev \ libxcomposite-dev libxss-dev libxp-dev libxext-dev libxinerama-dev \ libxft-dev libxfont-dev libxi-dev libxv-dev libxkbfile-dev \ libxkbui-dev libxres-dev libxtst-dev libltdl3-dev libglu1-xorg-dev \ libglut3-dev xserver-xephyr libdbus-1-dev elif [ "$DISTRO" == "ubuntu-intrepid" ]; then #sudo apt-get update sudo apt-get install \ xterm make gcc bison flex subversion automake1.10 autoconf autotools-dev \ autoconf-archive libtool gettext \ libpam0g-dev libfreetype6-dev libpng12-dev zlib1g-dev libjpeg62-dev \ libtiff4-dev libungif4-dev librsvg2-dev libx11-dev libxcursor-dev \ libxrender-dev libxrandr-dev libxfixes-dev libxdamage-dev \ libxcomposite-dev libxss-dev libxp-dev libxext-dev libxinerama-dev \ libxft-dev libxfont-dev libxi-dev libxv-dev libxkbfile-dev \ libxkbui-dev libxres-dev libxtst-dev libltdl7-dev libglu1-xorg-dev \ libglut3-dev xserver-xephyr libdbus-1-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 - svn 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 # make sure we have the prefix in the PATH for now export PATH="$PREFIX/bin:$PATH" export LD_LIBRARY_PATH="$PREFIX/lib:$LD_LIBRARY_PATH" export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" CLEAN="no" # check if we have a svn tree already if [ -d ./e/e/.svn ]; then echo "---------------------------------------------------------------------" echo "" echo "Updating SVN" CLEAN="yes" cd ./e for I in $MODULES; do cd $I svn update cd .. done cd .. else # get svn echo "---------------------------------------------------------------------" echo "" echo "Checking out SVN" mkdir e cd e for I in $MODULES; do svn co http://svn.enlightenment.org/svn/e/trunk/$I done cd .. fi # enable error abort from now on set -e # build and install it all echo "---------------------------------------------------------------------" echo "" echo "Build..." for I in $MODULES; do pushd e/$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