update to use efl svn
authorfolhabranca <folhabranca@gmail.com>
Tue, 23 Sep 2008 12:45:47 +0000 (12:45 +0000)
committerfolhabranca <folhabranca@gmail.com>
Tue, 23 Sep 2008 12:45:47 +0000 (12:45 +0000)
trunk/scripts/build.sh
trunk/scripts/helper-functions.sh [deleted file]
trunk/scripts/log-functions.sh
trunk/scripts/message-functions.sh [new file with mode: 0644]
trunk/scripts/package-functions.sh
trunk/scripts/repository-functions.sh
trunk/scripts/setup-functions.sh
trunk/scripts/var-definitions.sh

index 9fdea74..0eac4bf 100755 (executable)
@@ -34,7 +34,7 @@ for build_variant in n770 n8x0 ; do
                echo "===== $component: building for $build_variant ====="
 
                # FIXME: install build dependencies here
-               DEB_BUILD_OPTIONS=$build_variant dpkg-buildpackage -rfakeroot -us -uc -sa -D || exit
+               DEB_BUILD_OPTIONS=$build_variant dpkg-buildpackage -rfakeroot -us -uc -sa -d || exit
 
                # install results
                srcname=`grep Source: debian/control |cut -f2 -d' '`
diff --git a/trunk/scripts/helper-functions.sh b/trunk/scripts/helper-functions.sh
deleted file mode 100644 (file)
index a1a7ddb..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/sh
-
-###########################################################
-# Maemo-efl building script
-# Helper functions for utility scripts.
-###########################################################
-
-COLOR_GOOD="\033[1;32m"
-COLOR_WARN="\033[1;33m"
-COLOR_ERROR="\033[1;31m"
-COLOR_NORMAL="\033[0m"
-
-# usage <>
-function usage() {
-    cat << EOF
-
-Usage: $__this_script [OPTIONS]
-
-Build script for Maemo EFL debian packages.
-
-Options:
-    -n           Don't sign packages.
-    -c           Don't update source repositories.
-    -h           Show this usage guide.
-    -s PATH      Specify alternate scratchbox path (default: $__sbox_path).
-    -t A:B:Z     Specify scratchbox building targets (default: all targets installed).
-    -p P1:P2:PN  Specify packges to build (default: build all packages available).
-
-EOF
-}
-
-# error <message>
-error() {
-    echo -e " ${COLOR_ERROR}* E:${COLOR_NORMAL} $*"
-    exit 1
-}
-
-# warn <message>
-warn() {
-    echo -e " ${COLOR_WARN}* W:${COLOR_NORMAL} $*"
-}
-
-# msg <message>
-msg() {
-    echo -e " ${COLOR_GOOD}*${COLOR_NORMAL} $*"
-}
-
-# msg_begin <message>
-msg_begin() {
-    echo -en " ${COLOR_GOOD}*${COLOR_NORMAL} $* ..."
-}
-
-# msg_end <error-code>
-msg_end() {
-    echo -en "\033[72G"
-    if [ $1 -eq 0 ]; then
-        echo -e "[ ${COLOR_GOOD}ok${COLOR_NORMAL} ]"
-    else
-        echo -e "[${COLOR_ERROR}fail${COLOR_NORMAL}]"
-        exit 1
-    fi
-}
-
-
index 989bd7b..ca25388 100644 (file)
@@ -7,7 +7,7 @@
 # Note: var-definitions.sh and helper-functions.sh needed.
 ###########################################################
 
-function create_log_file() {
+create_log_file() {
     if [ ! -r $__output_file ]; then
         msg_begin "Creating log file"
         touch $__output_file
@@ -17,7 +17,7 @@ function create_log_file() {
     fi
 }
 
-function log_to_file() {
+log_to_file() {
     local now
     local msg
     msg=$1
@@ -30,7 +30,7 @@ function log_to_file() {
     echo "$now: $msg" >> $__output_file
 }
 
-function start_log() {
+start_log() {
     local now
     now=`$__date -R`
 
@@ -48,7 +48,7 @@ function start_log() {
 EOF
 }
 
-function finish_log() {
+finish_log() {
     local now
     now=`$__date -R`
 
@@ -61,4 +61,3 @@ function finish_log() {
 * Finished $__this_script: $now
 EOF
 }
-
diff --git a/trunk/scripts/message-functions.sh b/trunk/scripts/message-functions.sh
new file mode 100644 (file)
index 0000000..4195d0b
--- /dev/null
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+###########################################################
+# Maemo-efl building script
+# Helper functions for utility scripts.
+###########################################################
+
+COLOR_GOOD="\033[1;32m"
+COLOR_WARN="\033[1;33m"
+COLOR_ERROR="\033[1;31m"
+COLOR_NORMAL="\033[0m"
+
+# error <message>
+error() {
+    echo -e " ${COLOR_ERROR}* E:${COLOR_NORMAL} $*"
+    exit 1
+}
+
+# warn <message>
+warn() {
+    echo -e " ${COLOR_WARN}* W:${COLOR_NORMAL} $*"
+}
+
+# msg <message>
+msg() {
+    echo -e " ${COLOR_GOOD}*${COLOR_NORMAL} $*"
+}
+
+# msg_begin <message>
+msg_begin() {
+    echo -en " ${COLOR_GOOD}*${COLOR_NORMAL} $* ..."
+}
+
+# msg_end <error-code>
+msg_end() {
+#echo -en "\033[72G"
+echo -en "  "
+    if [ $1 -eq 0 ]; then
+        echo -e "${COLOR_GOOD}ok${COLOR_NORMAL}"
+    else
+        echo -e "${COLOR_ERROR}failed${COLOR_NORMAL}"
+        exit 1
+    fi
+}
index 446d962..9623cbb 100644 (file)
@@ -7,7 +7,7 @@
 # Note: var-definitions.sh needed.
 ###########################################################
 
-function configure_pkg() {
+configure_pkg() {
     local dir
     dir=$1
 
@@ -22,7 +22,120 @@ function configure_pkg() {
     return 0
 }
 
-function build_pkg() {
+update_changelog() {
+    local rev
+    local rev_tmp
+    local fst
+    rev=$1
+
+    if [ x$rev == xHEAD ]; then
+       msg_begin "Getting latest repository revision number"
+       svn_latest_rev
+       msg_end $?
+       rev=$__svn_latest_rev
+    fi
+    rev_tmp=`echo $rev | $__sed -nr 's/^([0-9]+)$/\1/p'`
+    if [ -z "$rev_tmp" ]; then
+        error "Invalid revision number '$rev'"
+    fi
+    rev=$rev_tmp
+    msg_begin "Updating changelog files to svn$rev"
+    for module in `echo $__all_modules|$__sed -e 's/:/ /g'`; do
+        if [ -e $module/debian/changelog ]; then
+            fst=`$__head -1 $module/debian/changelog | grep svn`
+            if [ -n "$fst" ]; then
+                cp -f $module/debian/changelog $module/debian/changelog.orig
+                fst=`echo $fst | $__sed -nr "s/(.*)svn([0-9]+)(.*)/\1svn$rev\3/p"`
+                echo "$fst" > $module/debian/changelog
+                $__tail -n +2 $module/debian/changelog.orig >> $module/debian/changelog
+            fi
+        fi
+    done
+    msg_end $?
+}
+
+update_debian_dir() {
+
+    local module
+    local TO_REPLACE
+    local replacement_lowercase
+    local version_file
+    local version_number
+    local replacement
+    module=$1
+
+    if [ -d ./$module/$module/debian ]; then
+         msg_begin "  Removing existing debian directory"
+         rm -rf ./$module/$module/debian
+         msg_end $?
+    fi
+
+    mkdir -p $module/$module/debian
+
+    msg_begin "  Copying specific debian directory"
+    if [ -d ./$module/debian ]; then
+        $__tar c --exclude=.svn --exclude=.git --exclude=changelog.orig $module/debian | $__tar x --directory $module/
+        if [ -d ./$module/debian_$__distro ]; then
+            cp -r ./$module/debian_$__distro/* ./$module/$module/debian/
+        fi
+    else
+        if [ -d ./$module/debian_$__distro ]; then
+        $__tar c --exclude=.svn --exclude=.git --exclude=changelog.orig $module/debian_$__distro | $__tar x --directory $module/
+        else
+            echo ""
+            warn "Missing debian directory for $module. Ignoring"
+            return
+        fi
+    fi
+    msg_end $?
+
+    if [ -e ./$module/$module/debian/control.in ]; then
+        msg_begin "  Replacing versions in control file"
+#TO_REPLACE=`grep -o -E '@([A-Z]|[0-9])+(-|_)*([A-Z]|[0-9])+_VERSION@' ./$module/$module/debian/control.in | cut -d @ -f 2 | sort -u`
+        TO_REPLACE=`grep -o -E '@([A-Z]|[0-9])+((-|_)*([A-Z]|[0-9]))*_VERSION@' ./$module/$module/debian/control.in | cut -d @ -f 2 | sort -u`
+        cp ./$module/$module/debian/control.in ./$module/$module/debian/control.temp
+
+        for replacement in $TO_REPLACE
+        do
+            replacement_lowercase=`echo $replacement | tr "[:upper:]" "[:lower:]"`
+            version_file=$__versions_dir/$replacement_lowercase
+            if [ ! -e $version_file ]; then
+                echo ""
+                warn "Could not find a replacement for $replacement"
+                continue
+            fi
+            version_number=`cat $version_file`
+            sed -i s/@$replacement@/$version_number/g ./$module/$module/debian/control.temp
+        done
+
+        mv ./$module/$module/debian/control.temp ./$module/$module/debian/control
+        msg_end $?
+    fi
+}
+
+generate_versions() {
+    if [ ! -d $__versions_dir ]; then
+        msg_begin "Creating versions dir $__versions_dir"
+        $__mkdir -p $__versions_dir
+        msg_end $?
+    fi
+
+    msg_begin "Generating version files"
+    for module in `echo $__all_modules |$__sed -e 's/:/ /g'`; do
+        if [ -e $module/debian/changelog ]; then
+            VERSION=`$__dpkg_parsechangelog -l$module/debian/changelog | grep Version: | cut -d" " -f2 | cut -d- -f1`
+            REVISION=`$__dpkg_parsechangelog -l$module/debian/changelog | grep Version: | cut -d- -f2`
+            if [ -z \$REVISION ]; then
+                echo "$VERSION" > $__versions_dir/"$module"_version
+            else
+                echo "$VERSION-$REVISION" >  $__versions_dir/"$module"_version
+            fi
+        fi
+    done
+    msg_end $?
+}
+
+build_pkg() {
     local dir
     dir=$1
 
@@ -48,61 +161,38 @@ cd $dir/`basename $dir`
 VERSION=\`$__sbox_dpkg_parsechangelog | grep Version: | cut -d" " -f2 | cut -d- -f1\`
 REVISION=\`$__sbox_dpkg_parsechangelog | grep Version: | cut -d- -f2\`
 
-TO_REPLACE=\`grep -o -E '@([A-Z]|[0-9])+(-|_)*([A-Z]|[0-9])+_VERSION@' ./debian/control.in | cut -d @ -f 2 | sort -u\`
-
-# Test if we should process control.in file or not.
-if [ -z $__not_all_pkgs ]; then
-    cp ./debian/control.in ./debian/control.temp
-
-    for replacement in \$TO_REPLACE
-    do
-        replacement_lowercase=\`echo \$replacement | tr "[:upper:]" "[:lower:]"\`
-        version_file=$__versions_dir/\$replacement_lowercase
-        version_number=\`cat \$version_file\`
-        sed -i s/@\$replacement@/\$version_number/g ./debian/control.temp
-    done
-
-    mv ./debian/control.temp ./debian/control
-else
-    builddeps=\`$__sbox_dpkg_checkbuilddeps ./debian/control 2>&1 | grep Unmet | cut -d: -f3\`
-    target_lowercase=\`echo $target | cut -d_ -f1 | tr "[:upper:]" "[:lower:]"\`
 
-    if [ -z $__pkgslist_updated ];then
+builddeps=\`$__sbox_dpkg_checkbuilddeps ./debian/control 2>&1 | grep Unmet | cut -d: -f3\`
+target_lowercase=\`echo $target | cut -d_ -f1 | tr "[:upper:]" "[:lower:]"\`
 
-       has_extras_rep=\`grep 'deb http://repository.maemo.org/extras' $__srclist_file\`
-       if [ -z "\$has_extras_rep" ];then
-           echo "deb http://repository.maemo.org/extras \$target_lowercase free non-free" >> $__srclist_file
-       fi
+if [ -z $__pkgslist_updated ];then
 
-        has_extras_rep=\`grep 'deb-src http://repository.maemo.org/extras' $__srclist_file\`
-        if [ -z "\$has_extras_rep" ];then
-           echo "deb-src http://repository.maemo.org/extras \$target_lowercase free non-free" >> $__srclist_file
-       fi
-
-       apt-get update >> $dir/sbox_apt_update.log 2>&1
-       __pkgslist_updated=1
+    has_extras_rep=\`grep 'deb http://repository.maemo.org/extras' $__srclist_file\`
+    if [ -z "\$has_extras_rep" ];then
+        echo "deb http://repository.maemo.org/extras \$target_lowercase free non-free" >> $__srclist_file
     fi
 
-    if [ -n "\$builddeps" ];then
-        echo \$builddeps | while read line
-        do
-            pkg_name=\`echo \$line | cut -d'(' -f1 | tr -d "[:blank:]"\`
-           pkg_version=\`echo \$line | cut -d= -f2 | cut -d')' -f1 | tr -d "[:blank:]"\`
-           apt-get -y install \$pkg_name=\$pkg_version >> $dir/sbox_builddeps.log 2>&1
-        done
+    has_extras_rep=\`grep 'deb-src http://repository.maemo.org/extras' $__srclist_file\`
+    if [ -z "\$has_extras_rep" ];then
+        echo "deb-src http://repository.maemo.org/extras \$target_lowercase free non-free" >> $__srclist_file
     fi
+
+    apt-get update >> $dir/sbox_apt_update.log 2>&1
+    __pkgslist_updated=1
+fi
+
+if [ -n "\$builddeps" ];then
+    echo \$builddeps | while read line
+    do
+        pkg_name=\`echo \$line | cut -d'(' -f1 | tr -d "[:blank:]"\`
+        pkg_version=\`echo \$line | cut -d= -f2 | cut -d')' -f1 | tr -d "[:blank:]"\`
+        apt-get -y install \$pkg_name=\$pkg_version >> $dir/sbox_builddeps.log 2>&1
+    done
 fi
 
 # $__sbox_dch -v \$VERSION+cvs$__today-\$REVISION -D $__distro "Snapshot CVS release of $__today" >> $dir/sbox_build_pkgs.log 2>&1 || exit 1
 $__sbox_dpkg_buildpackage $__build_pkg_options >> $dir/sbox_build_pkgs.log 2>&1
 
-if [ -z \$REVISION ]
-then
-    echo "\$VERSION" > $__versions_dir/`basename $dir`_version
-else
-    echo "\$VERSION-\$REVISION" >  $__versions_dir/`basename $dir`_version
-fi
-
 exit \$?
 EOF
 
@@ -111,7 +201,7 @@ EOF
     return $?
 }
 
-function install_pkgs() {
+install_pkgs() {
     local dir
     dir=$1
 
@@ -138,7 +228,7 @@ EOF
     return 0
 }
 
-function uninstall_pkgs() {
+uninstall_pkgs() {
 
     cat << EOF > $__tmp_dir/sbox_uninstall_pkgs
 #!/bin/sh
@@ -154,15 +244,15 @@ EOF
     return $?
 }
 
-function sign_pkgs() {
+sign_pkgs() {
     local dir
     dir=$1
 
     cd $dir
+    print $__debsign
     $__debsign *.changes >> $dir/sign_pkgs.log 2>&1 || return 1
 
     cd - > /dev/null 2>&1
 
     return 0
 }
-
index 358fe6e..cbb0f1d 100644 (file)
@@ -7,14 +7,14 @@
 # Note: helper-functions.sh and var-definitions.sh needed.
 ###########################################################
 
-function clone_repository() {
+git_clone_repository() {
     local repo
     repo=$1
     $__git_clone $repo.git >> $__output_file 2>&1
     return $?
 }
 
-function update_repository() {
+git_update_repository() {
     local repo
     repo=$1
 
@@ -29,7 +29,7 @@ function update_repository() {
     return 0
 }
 
-function clean_repository() {
+git_clean_repository() {
     local repo
     repo=$1
 
@@ -45,9 +45,53 @@ function clean_repository() {
     return 0
 }
 
-function get_sources() {
+svn_checkout_repository() {
+    local repo
+    local rev
+    repo=$1
+    rev=$2
+
+    if [ -n "$rev" ]; then
+        rev="-r $rev"
+    fi
+    $__svn_checkout $repo $rev >> $__output_file 2>&1
+    return $?
+}
+
+svn_update_repository() {
+    local repo
+    local rev
+    repo=$1
+    rev=$2
+
+    if [ -n "$rev" ]; then
+        rev="-r $rev"
+    fi
+
+    if [ ! -d $repo ]; then
+        error "  Trying to update invalid repository"
+    fi
+
+    cd $repo
+    $__svn_update $repo $rev>> $__output_file 2>&1 || return 1
+    cd - > /dev/null 2>&1
+
+    return 0
+}
+
+svn_latest_rev() {
+    __svn_latest_rev=`$__svn info $__svn_repo | $__grep "Last Changed Rev:" | cut -d" " -f4`
+}
+
+get_sources() {
     local modules
     local repo
+    local git
+    local pkg_version
+    local svn_rev
+    local rep_rev
+    local svn_rev_str
+
     modules=`echo $1|$__sed -e 's/:/ /g'`
     repo=$2
 
@@ -59,28 +103,107 @@ function get_sources() {
 
         cd $module
 
-        if [ -d $module/.git ]; then
-            if [ ! $__update_repositories -eq 0 ]; then
-                log_to_file "Updating existing repository at $PWD/$module"
+        pkg_version=`$__dpkg_parsechangelog | $__grep Version: | cut -d" " -f2`
+        svn_rev=`echo $pkg_version | $__sed -nr 's/.*svn([0-9]+).*/\1/p'`
+        git=`echo $repo|$__grep "git://"`
+
+        if [ -n "$svn_rev" ]; then
+                svn_rev_str="(rev: $svn_rev)"
+        else
+                svn_rev_str=
+        fi
+
+        if [ $__force_remove -eq 1 ]; then
+                if [ -d $module ]; then
+                    rm -rf $module
+                fi
+        fi
+
+        if [ -n "$git" ]; then
+            if [ -d $module/.git ]; then
+                if [ ! $__update_repositories -eq 0 ]; then
+                    log_to_file "Updating existing repository at $PWD/$module"
+
+                    msg_begin "  Updating $module repository"
+                    git_update_repository $module
+                    msg_end $?
+                else
+                    log_to_file "Skipping update of $module repository"
+                fi
+            elif [ -d $module ]; then
+                log_to_file "Removing invalid repository at $PWD/$module"
+                rm -rf $module
+            fi
 
-                msg_begin "  Updating $module repository"
-                update_repository $module
+            if [ ! -d $module ]; then
+                msg_begin "  Cloning $repo/$module.git"
+                git_clone_repository $repo/$module
                 msg_end $?
-            else
-                log_to_file "Skipping update of $module repository"
             fi
-        elif [ -d $module ]; then
-            log_to_file "Removing invalid repository at $PWD/$module"
-            rm -rf $module
-        fi
+        else
+            if [ -d $module/.svn ]; then
+                rep_rev=`$__svn info $module | $__sed -nr 's/Revision: ([0-9]*)/\1/p'`
+                if [ ! $__update_repositories -eq 0 -a "x$rep_rev" != "x$svn_rev" ]; then
+                    log_to_file "Updating existing repository at $PWD/$module"
+                    msg_begin "  Updating $module repository $svn_rev_str"
+                    svn_update_repository $module $svn_rev
+                    msg_end 0
+                    rep_rev=`$__svn info $module | $__sed -nr 's/Revision: ([0-9]*)/\1/p'`
+                    if [ "x$rep_rev" != "x$svn_rev" ]; then
+                        warn "Unable to update the repository to rev. $svn_rev"
+                    fi
+                else
+                    log_to_file "Skipping update of $module repository"
+                fi
+            elif [ -d $module ]; then
+                 log_to_file "Removing invalid repository at $PWD/$module"
+                 rm -rf $module
+            fi
+
+            if [ ! -d $module ]; then
+                 msg_begin "  Checking out $repo$module $svn_rev_str"
+                 svn_checkout_repository $repo$module $svn_rev
+                 if [ $? -ne 0 ]; then
+                      warn "Unable to checkput the repository to rev. $svn_rev"
+                 else
+                     msg_end 0
+                 fi
+            fi
 
-        if [ ! -d $module ]; then
-            msg_begin "  Cloning $repo/$module.git"
-            clone_repository $repo/$module
-            msg_end $?
         fi
 
         cd ..
     done
 }
 
+download_modules() {
+    # Download e17 modules
+    if [ ! -z $__lib_modules ];then
+        msg "Downloading e17 modules"
+        get_sources $__lib_modules $__svn_repo
+    fi
+
+    # Download python modules under proto/python/efl
+    if [ ! -z $__python_modules ];then
+        msg "Downloading python modules"
+        get_sources $__python_modules $__svn_repo$__e17_python_efl
+    fi
+
+    # Download python-efl-utils module$
+    if [ ! -z $__python_efl_utils_module ];then
+        get_sources $__python_efl_utils_module $__git_repo$__e17_python_efl_utils
+    fi
+
+    # Download python-dispatcher module
+    #get_sources $__python_dispatcher_module $__git_repo$__e17_python_dispatcher
+}
+
+clean_modules() {
+    msg_begin "Cleaning up modules directories"
+    for module in `echo $__all_modules|$__sed -e 's/:/ /g'`; do
+        if [ -d $module/$module ]; then
+            rm -rf $module/$module
+        fi
+    done
+    msg_end $?
+}
index 66984fd..90e694f 100644 (file)
@@ -8,7 +8,7 @@
 #       and helper-functions.sh needed.
 ###########################################################
 
-function setup_distro() {
+setup_distro() {
     local target
     local sources_list_file
     local target_conf_file
@@ -24,10 +24,15 @@ function setup_distro() {
 
     if [ "x$target" != "x" ] && [ -r $sources_list_file ] && [ -r $target_conf_file ]; then
         # XXX: FIXME Figure out a better way to get the distro string
-        __distro=`$__head -1 $sources_list_file | cut -d" " -f3`
+        __distro=`$__head -1 $sources_list_file | cut -d" " -f3 | cut -d"/" -f1`
         __arch=`$__grep SBOX_CPU= $target_conf_file | cut -d= -f2`
+        if [ "x$__arch" == "xi686" ]; then
+            __arch="i386"
+        elif [ "x$__arch" == "xarm" ]; then
+            __arch="armel"
+        fi
         __pkg_dir="$__base_pkg_dir/$__distro/$__arch"
-        if [ "x$__arch" = "xarm" ] ; then
+        if [ "x$__arch" = "xarmel" ] ; then
             __build_pkg_options="$__common_build_pkg_options -B"
         else
             __build_pkg_options="$__common_build_pkg_options -I.svn -I.git -I.gitignore -I.cvsignore -sa"
@@ -46,7 +51,7 @@ function setup_distro() {
     return $ret
 }
 
-function setup_sbox() {
+setup_sbox() {
     if [ ! -d $__sbox_path ]; then
         error "Invalid scratchbox path: $__sbox_path"
     fi
@@ -67,7 +72,7 @@ function setup_sbox() {
     __sbox_targets=`$__sbox_sb_conf list --targets`
 }
 
-function change_sbox_target() {
+change_sbox_target () {
     local target
     target=$1
 
@@ -75,3 +80,29 @@ function change_sbox_target() {
     return $?
 }
 
+init_checks () {
+
+    if [ x$USER == xroot ]; then
+        error "You should not run this script as root"
+    fi
+
+    if [ -r /targets/links/scratchbox.config ]; then
+        error "You should run this script outside the scratchbox environment."$
+    fi
+}
+
+setup_dirs () {
+    if [ ! -d $__base_pkg_dir ]; then
+        msg_begin "Creating base packages dir $__base_pkg_dir"
+        $__mkdir -p $__base_pkg_dir
+        msg_end $?
+    fi
+
+    # Create tmp dir
+    if [ ! -d $__tmp_dir ]; then
+        msg_begin "Creating tmp dir $__tmp_dir"
+        $__mkdir -p $__tmp_dir
+        msg_end $?
+    fi
+
+}
index 72d7120..167e948 100644 (file)
@@ -5,7 +5,8 @@
 # Variable definitions
 ###########################################################
 
-__tmp_hash=`mktemp XXXXXXXX`
+__tmp_hash=`mktemp XXXXXXXX` || exit 1
+rm -f $__tmp_hash
 
 # Paths
 __tmp_dir="/tmp/`whoami`_build_maemo-efl/$__tmp_hash"
@@ -18,6 +19,7 @@ __srclist_file="/etc/apt/sources.list"
 # Binaries
 __date=`which date`
 __git=`which git`
+__svn=`which svn`
 __head=`which head`
 __mkdir=`which mkdir`
 __sed=`which sed`
@@ -26,6 +28,15 @@ __chmod=`which chmod`
 __grep=`which grep`
 __egrep=`which egrep`
 __debsign=`which debsign`
+__tar=`which tar`
+__tail=`which tail`
+__head=`which head`
+__dpkg_parsechangelog=`which dpkg-parsechangelog`
+
+# svn definitions
+__svn_checkout="$__svn co"
+__svn_update="$__svn up"
+__svn_repo="http://svn.enlightenment.org/svn/e/trunk/"
 
 # git definitions
 __git_clone="$__git clone -q"
@@ -37,20 +48,24 @@ __git_repo="git://staff.get-e.org/"
 # e17 git repositories paths
 __e17_libs="e17/libs"
 __e17_proto="e17/proto"
-__e17_python_efl="$__e17_proto/python-efl"
+__e17_python_efl="BINDINGS/python/"
 __e17_python_etk="users/cmarcelo"
 __e17_python_efl_utils="users/barbieri"
 #__e17_python_dispatcher="users/ulisses"
 
 # modules to build
 #__lib_modules="edb eet evas ecore embryo edje efreet epeg epsilon emotion etk ewl e_dbus exml enhance"
-__lib_modules="eet:evas:ecore:embryo:edje:imlib2:epeg:epsilon:etk:e_dbus"
-__other_modules="himf-ecore:himf-ecore-chinook:lightmediascanner:python-lightmediascanner"
-__python_modules="python-evas:python-ecore:python-edje:python-epsilon:python-e_dbus"
-__python_etk_module="python-etk"
+__lib_modules="eet:evas:ecore:embryo:edje:epsilon:etk:e_dbus"
+#__other_modules="himf-ecore:himf-ecore-chinook:lightmediascanner:python-lightmediascanner"
+__other_modules=""
+__python_modules="python-evas:python-ecore:python-edje:python-epsilon:python-e_dbus:python-etk"
 __python_efl_utils_module="python-efl_utils"
 __python_dispatcher_module="python-dispatcher"
-__virtual_packages="efl-core python-efl-core"
+__virtual_packages="efl-core:python-efl-core"
+
+update_all_modules () {
+    __all_modules=$__lib_modules:$__other_modules:$__python_modules:$__python_efl_utils_module:$__python_dispatcher_module:$__virtual_packages
+}
 
 # dpkg definitions
 __common_build_pkg_options="-rfakeroot -us -uc -D"
@@ -65,5 +80,7 @@ __sbox_path="/scratchbox"
 
 # Other
 __update_repositories=1
+__force_remove=0
 __installed_packages=""
-
+__export_dir=""
+__not_all_pkgs=0