diff --git a/tools/build-system/distributions/globals b/tools/build-system/distributions/globals
new file mode 100644
index 0000000000000000000000000000000000000000..a4b19bf8b1a1045596856baa704b25c61707303b
--- /dev/null
+++ b/tools/build-system/distributions/globals
@@ -0,0 +1,66 @@
+#####################################################
+# File Name: globals
+#
+# Purpose :
+#
+# Author: Julien Bonjean (julien@bonjean.info) 
+#
+# Creation Date: 2009-05-28
+# Last Modified: 2009-05-28 15:55:14 -0400
+#####################################################
+
+ROOT_DIR="/home/sflphone"
+PACKAGING_DIR="${ROOT_DIR}/sflphone-packaging"
+
+UBUNTU_DIR="${PACKAGING_DIR}/ubuntu"
+OPENSUSE="${PACKAGING_DIR}/opensuse"
+
+BUILD_DIR="${PACKAGING_DIR}/build"
+DIST_DIR="${PACKAGING_DIR}/dists"
+REPOSITORY_ARCHIVE="${BUILD_DIR}/sflphone.tar.gz"
+REPOSITORY_DIR="${BUILD_DIR}/sflphone"
+REPOSITORY_SFLPHONE_COMMON_DIR="${REPOSITORY_DIR}/sflphone-common"
+REPOSITORY_SFLPHONE_CLIENT_KDE_DIR="${REPOSITORY_DIR}/sflphone-client-kde"
+REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR="${REPOSITORY_DIR}/sflphone-client-gnome"
+
+ARCH_FLAG=`getconf -a|grep LONG_BIT | sed -e 's/LONG_BIT\s*//'`
+OS_VERSION=`lsb_release -d -s -c | sed -e '1d'`
+VERSION=`cat ${BUILD_DIR}/VERSION` 
+
+if [ ! ${VERSION} ]; then
+        echo "!! Cannot detect current version"
+        exit -1
+fi
+
+EDITOR=echo
+export EDITOR
+RELEASE_MODE=$1
+USER="sflphone"
+
+#PACKAGES=('sflphone-common' 'sflphone-client-gnome' 'sflphone-client-kde')
+PACKAGES=('sflphone-common sflphone-client-gnome')
+
+GLOBAL_LOG=${PACKAGING_DIR}/sflphone-${OS_VERSION}-${ARCH_FLAG}.log
+
+# open log file
+exec 3<>${GLOBAL_LOG}
+
+# redirect outputs (stdout & stderr)
+exec 1>&3
+exec 2>&3
+
+echo "SFLPhone version is ${VERSION}"
+
+WHO=`whoami`
+
+if [ "${WHO}" != "${USER}" ]; then
+        echo "!! Please use user ${USER} to run this script"
+        exit -1;
+fi
+
+if [ ${RELEASE_MODE} ]; then
+        echo "Release mode : ${RELEASE_MODE}"
+else
+        echo "Snapshot mode"
+fi
+
diff --git a/tools/build-system/distributions/opensuse/build-package-opensuse.sh b/tools/build-system/distributions/opensuse/build-package-opensuse.sh
index f9e242f5534b95ba1351bc996e89d134a2c80fc7..636076c90b5e170bdc1756e80d70585ee114b805 100755
--- a/tools/build-system/distributions/opensuse/build-package-opensuse.sh
+++ b/tools/build-system/distributions/opensuse/build-package-opensuse.sh
@@ -7,7 +7,7 @@
 # Author: Julien Bonjean (julien@bonjean.info) 
 #
 # Creation Date: 2009-05-27
-# Last Modified: 2009-05-28 15:35:07 -0400
+# Last Modified: 2009-05-28 16:32:54 -0400
 #####################################################
 
 BUILD_DIR=/tmp/sflphone
@@ -20,9 +20,6 @@ if [ ! ${VERSION} ]; then
 	exit -1
 fi
 
-#PACKAGES=('sflphone-common' 'sflphone-client-gnome' 'sflphone-client-kde')
-PACKAGES=('sflphone-common sflphone-client-gnome')
-
 echo "Create directories"
 mkdir -p ${BUILD_DIR}/BUILD
 mkdir -p ${BUILD_DIR}/RPMS
diff --git a/tools/build-system/distributions/ubuntu/build-package-ubuntu.sh b/tools/build-system/distributions/ubuntu/build-package-ubuntu.sh
new file mode 100755
index 0000000000000000000000000000000000000000..3e73f349bdb538e3c108cdd8fc225c82e7b5a8d9
--- /dev/null
+++ b/tools/build-system/distributions/ubuntu/build-package-ubuntu.sh
@@ -0,0 +1,123 @@
+#!/bin/bash
+#
+# @author: Yun Liu <yun.liu@savoirfairelinux.com>, Julien Bonjean <julien.bonjean@savoirfairelinux.com>
+#
+# Refer to http://www.sflphone.org for futher information
+#
+
+. ../globals
+
+if [ ! ${PACKAGING_DIR} ];then
+	echo "!! Cannot source globals file"
+	exit -1
+fi
+
+cd ${UBUNTU_DIR}
+
+if [ "$?" -ne "0" ]; then
+        echo " !! Cannot cd to Ubuntu directory"
+        exit -1
+fi
+
+PACKAGE_SYSVER="0ubuntu1"
+FULL_VERSION="${VERSION}-0ubuntu1"
+
+#########################
+# BEGIN
+#########################
+
+DIST="dist"
+if [ ${RELEASE_MODE} ]; then
+	if [ "${RELEASE_MODE}" != "release" ]; then
+		DIST="${DIST}-testing"
+	fi
+else
+	DIST="${DIST}-daily"
+fi
+
+echo "Do updates"
+sudo apt-get update >/dev/null
+sudo apt-get upgrade -y >/dev/null
+
+# decompress repository
+echo "Untar repository"
+cd ${BUILD_DIR} && tar xf ${REPOSITORY_ARCHIVE}
+
+if [ "$?" -ne "0" ]; then
+        echo " !! Cannot untar repository"
+        exit -1
+fi
+
+for PACKAGE in ${PACKAGES[@]}
+do
+        echo "Process ${PACKAGE}"
+
+	echo " -> prepare debian directories"
+	mv ${UBUNTU_DIR}/debian-${PACKAGE} ${REPOSITORY_DIR}/${PACKAGE}/
+
+	# generate the changelog
+	echo " -> generate changelog"
+	sed -i 's/SYSTEM/'${OS_VERSION}'/g' ${REPOSITORY_DIR}/${PACKAGE}/debian/changelog && \
+	sed -i 's/SYSVER/'${PACKAGE_SYSVER}'/g' ${REPOSITORY_DIR}/${PACKAGE}/debian/changelog
+
+	if [ "$?" -ne "0" ]; then
+		echo "!! Cannot generate changelog"
+		exit -1
+	fi
+
+	# copy the appropriate control file based on architecture
+	echo " -> generate control file"
+	cp ${REPOSITORY_DIR}/${PACKAGE}/debian/control.$OS_VERSION ${REPOSITORY_DIR}/${PACKAGE}/debian/control && \
+ 	sed -i "s/VERSION/${FULL_VERSION}/g" ${REPOSITORY_DIR}/${PACKAGE}/debian/control
+
+	if [ "$?" -ne "0" ]; then
+	        echo "!! Cannot generate control file"
+	        exit -1
+	fi
+
+	# provide prerequisite directories used by debuild
+	echo " -> prepare directories"
+	cp -r ${REPOSITORY_DIR}/${PACKAGE} ${REPOSITORY_DIR}/${PACKAGE}-${FULL_VERSION}.orig && \
+	mv ${REPOSITORY_DIR}/${PACKAGE} ${REPOSITORY_DIR}/${PACKAGE}-${FULL_VERSION}
+
+	# build package sflphone-common
+	cd ${REPOSITORY_DIR}/${PACKAGE}-${FULL_VERSION}/debian && \
+	debuild -us -uc
+
+	if [ "$?" -ne "0" ]; then
+	        echo "!! Cannot generate package ${PACKAGE}"
+	        exit -1
+	fi
+done
+
+# move to dist
+echo "Deploy files in dist directories"
+BINARY_DIR=""
+if [ "${ARCH_FLAG}" -eq "32" ]; then
+	BINARY_DIR="binary-i386"
+else
+	BINARY_DIR="binary-amd64"
+fi
+
+mkdir -p ${DIST_DIR}/${DIST}/universe/source
+mkdir -p ${DIST_DIR}/${DIST}/universe/${BINARY_DIR}
+
+mv ${REPOSITORY_DIR}/sflphone*.deb ${DIST_DIR}/${DIST}/universe/${BINARY_DIR} && \
+mv ${REPOSITORY_DIR}/sflphone*.dsc ${DIST_DIR}/${DIST}/universe/source/ && \
+mv ${REPOSITORY_DIR}/sflphone*.build ${DIST_DIR}/${DIST}/universe/source/ && \
+mv ${REPOSITORY_DIR}/sflphone*.changes ${DIST_DIR}/${DIST}/universe/source/ && \
+mv ${REPOSITORY_DIR}/sflphone*.orig.tar.gz ${DIST_DIR}/${DIST}/universe/source/ && \
+mv ${REPOSITORY_DIR}/sflphone*.diff.gz ${DIST_DIR}/${DIST}/universe/source/
+
+if [ "$?" -ne "0" ]; then
+        echo "!! Cannot copy dist files"
+        exit -1
+fi
+
+echo "All done"
+
+# close file descriptor
+exec 3>&-
+
+exit 0
+
diff --git a/sflphone-client-gnome/debian/changelog b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/changelog
similarity index 100%
rename from sflphone-client-gnome/debian/changelog
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/changelog
diff --git a/sflphone-client-gnome/debian/compat b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/compat
similarity index 100%
rename from sflphone-client-gnome/debian/compat
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/compat
diff --git a/sflphone-client-gnome/debian/control.hardy b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/control.hardy
similarity index 100%
rename from sflphone-client-gnome/debian/control.hardy
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/control.hardy
diff --git a/sflphone-client-gnome/debian/control.intrepid b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/control.intrepid
similarity index 100%
rename from sflphone-client-gnome/debian/control.intrepid
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/control.intrepid
diff --git a/sflphone-client-gnome/debian/control.jaunty b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/control.jaunty
similarity index 100%
rename from sflphone-client-gnome/debian/control.jaunty
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/control.jaunty
diff --git a/sflphone-client-gnome/debian/copyright b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/copyright
similarity index 100%
rename from sflphone-client-gnome/debian/copyright
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/copyright
diff --git a/sflphone-client-gnome/debian/cron.d b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/cron.d
similarity index 100%
rename from sflphone-client-gnome/debian/cron.d
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/cron.d
diff --git a/sflphone-client-gnome/debian/dirs b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/dirs
similarity index 100%
rename from sflphone-client-gnome/debian/dirs
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/dirs
diff --git a/sflphone-client-gnome/debian/docs b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/docs
similarity index 100%
rename from sflphone-client-gnome/debian/docs
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/docs
diff --git a/sflphone-client-gnome/debian/manpages b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/manpages
similarity index 100%
rename from sflphone-client-gnome/debian/manpages
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/manpages
diff --git a/sflphone-client-gnome/debian/postinst b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/postinst
similarity index 100%
rename from sflphone-client-gnome/debian/postinst
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/postinst
diff --git a/sflphone-client-gnome/debian/postrm b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/postrm
similarity index 100%
rename from sflphone-client-gnome/debian/postrm
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/postrm
diff --git a/sflphone-client-gnome/debian/preinst b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/preinst
similarity index 100%
rename from sflphone-client-gnome/debian/preinst
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/preinst
diff --git a/sflphone-client-gnome/debian/prerm b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/prerm
similarity index 100%
rename from sflphone-client-gnome/debian/prerm
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/prerm
diff --git a/sflphone-client-gnome/debian/rules b/tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/rules
similarity index 100%
rename from sflphone-client-gnome/debian/rules
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-gnome/rules
diff --git a/sflphone-client-kde/debian/changelog b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/changelog
similarity index 100%
rename from sflphone-client-kde/debian/changelog
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/changelog
diff --git a/sflphone-client-kde/debian/compat b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/compat
similarity index 100%
rename from sflphone-client-kde/debian/compat
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/compat
diff --git a/sflphone-client-kde/debian/control.intrepid b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/control.intrepid
similarity index 100%
rename from sflphone-client-kde/debian/control.intrepid
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/control.intrepid
diff --git a/sflphone-client-kde/debian/control.jaunty b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/control.jaunty
similarity index 100%
rename from sflphone-client-kde/debian/control.jaunty
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/control.jaunty
diff --git a/sflphone-client-kde/debian/copyright b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/copyright
similarity index 100%
rename from sflphone-client-kde/debian/copyright
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/copyright
diff --git a/sflphone-client-kde/debian/cron.d b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/cron.d
similarity index 100%
rename from sflphone-client-kde/debian/cron.d
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/cron.d
diff --git a/sflphone-client-kde/debian/dirs b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/dirs
similarity index 100%
rename from sflphone-client-kde/debian/dirs
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/dirs
diff --git a/sflphone-client-kde/debian/docs b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/docs
similarity index 100%
rename from sflphone-client-kde/debian/docs
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/docs
diff --git a/sflphone-client-kde/debian/manpages b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/manpages
similarity index 100%
rename from sflphone-client-kde/debian/manpages
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/manpages
diff --git a/sflphone-client-kde/debian/postinst b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/postinst
similarity index 100%
rename from sflphone-client-kde/debian/postinst
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/postinst
diff --git a/sflphone-client-kde/debian/preinst b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/preinst
similarity index 100%
rename from sflphone-client-kde/debian/preinst
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/preinst
diff --git a/sflphone-client-kde/debian/prerm b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/prerm
similarity index 100%
rename from sflphone-client-kde/debian/prerm
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/prerm
diff --git a/sflphone-client-kde/debian/rules b/tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/rules
similarity index 100%
rename from sflphone-client-kde/debian/rules
rename to tools/build-system/distributions/ubuntu/debian-sflphone-client-kde/rules
diff --git a/sflphone-common/debian/changelog b/tools/build-system/distributions/ubuntu/debian-sflphone-common/changelog
similarity index 100%
rename from sflphone-common/debian/changelog
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/changelog
diff --git a/sflphone-common/debian/compat b/tools/build-system/distributions/ubuntu/debian-sflphone-common/compat
similarity index 100%
rename from sflphone-common/debian/compat
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/compat
diff --git a/sflphone-common/debian/control.hardy b/tools/build-system/distributions/ubuntu/debian-sflphone-common/control.hardy
similarity index 100%
rename from sflphone-common/debian/control.hardy
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/control.hardy
diff --git a/sflphone-common/debian/control.intrepid b/tools/build-system/distributions/ubuntu/debian-sflphone-common/control.intrepid
similarity index 100%
rename from sflphone-common/debian/control.intrepid
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/control.intrepid
diff --git a/sflphone-common/debian/control.jaunty b/tools/build-system/distributions/ubuntu/debian-sflphone-common/control.jaunty
similarity index 100%
rename from sflphone-common/debian/control.jaunty
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/control.jaunty
diff --git a/sflphone-common/debian/copyright b/tools/build-system/distributions/ubuntu/debian-sflphone-common/copyright
similarity index 100%
rename from sflphone-common/debian/copyright
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/copyright
diff --git a/sflphone-common/debian/cron.d b/tools/build-system/distributions/ubuntu/debian-sflphone-common/cron.d
similarity index 100%
rename from sflphone-common/debian/cron.d
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/cron.d
diff --git a/sflphone-common/debian/dirs b/tools/build-system/distributions/ubuntu/debian-sflphone-common/dirs
similarity index 100%
rename from sflphone-common/debian/dirs
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/dirs
diff --git a/sflphone-common/debian/docs b/tools/build-system/distributions/ubuntu/debian-sflphone-common/docs
similarity index 100%
rename from sflphone-common/debian/docs
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/docs
diff --git a/sflphone-common/debian/manpages b/tools/build-system/distributions/ubuntu/debian-sflphone-common/manpages
similarity index 100%
rename from sflphone-common/debian/manpages
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/manpages
diff --git a/sflphone-common/debian/postrm b/tools/build-system/distributions/ubuntu/debian-sflphone-common/postrm
similarity index 100%
rename from sflphone-common/debian/postrm
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/postrm
diff --git a/sflphone-common/debian/preinst b/tools/build-system/distributions/ubuntu/debian-sflphone-common/preinst
similarity index 100%
rename from sflphone-common/debian/preinst
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/preinst
diff --git a/sflphone-common/debian/rules b/tools/build-system/distributions/ubuntu/debian-sflphone-common/rules
similarity index 100%
rename from sflphone-common/debian/rules
rename to tools/build-system/distributions/ubuntu/debian-sflphone-common/rules
diff --git a/tools/build-system/launch-build-machine.sh b/tools/build-system/launch-build-machine.sh
index 122f8740d4887933f17949989b594f76cf186d3b..ebaa0ac48c673187aaf5274ca339d2ab7d35647a 100755
--- a/tools/build-system/launch-build-machine.sh
+++ b/tools/build-system/launch-build-machine.sh
@@ -7,7 +7,7 @@
 # Author: Julien Bonjean (julien@bonjean.info) 
 #
 # Creation Date: 2009-04-20
-# Last Modified: 2009-05-28 10:13:41 -0400
+# Last Modified: 2009-05-28 18:30:17 -0400
 #####################################################
 
 #
@@ -39,6 +39,7 @@ REMOTE_ROOT_DIR="/home/sflphone"
 # scripts
 SCRIPTS_DIR="${ROOT_DIR}/build-system"
 PACKAGING_SCRIPTS_DIR="${SCRIPTS_DIR}/remote"
+DISTRIBUTION_SCRIPTS_DIR="${SCRIPTS_DIR}/distributions"
 BIN_DIR="${SCRIPTS_DIR}/bin"
 
 # directory that will be deployed to remote machine
@@ -61,7 +62,8 @@ PACKAGING_RESULT_DIR=${ROOT_DIR}/packages-${TAG}
 USER="sflphone"
 
 RELEASE_MODE=
-VERSION_APPEND=
+
+SNAPSHOT_TAG=`date +%s`
 
 DO_PREPARE=1
 DO_PUSH=1
@@ -74,7 +76,7 @@ DO_SEND_EMAIL=1
 EDITOR=echo
 export EDITOR
 
-NON_FATAL_ERRORS=
+NON_FATAL_ERRORS=""
 
 MACHINES=( "ubuntu-8.04" "ubuntu-8.04-64" "ubuntu-8.10" "ubuntu-8.10-64" "ubuntu-9.04" "ubuntu-9.04-64" )
 
@@ -195,11 +197,8 @@ echo
 
 if [ ${RELEASE_MODE} ]; then
 	echo "Release mode : ${RELEASE_MODE}"
-	if [ "${RELEASE_MODE}" != "release" ];then
-		VERSION_APPEND="~${RELEASE_MODE}"
-	fi
 else
-	echo "Snapshot mode"
+	echo "Snapshot mode : ${SNAPSHOT_TAG}"
 fi
 
 #########################
@@ -223,27 +222,33 @@ if [ ${DO_PREPARE} ]; then
 	fi
 
 	VERSION=`cd ${REPOSITORY_DIR} && git describe --tag HEAD  | cut -d "/" -f2 | cut -d "-" -f1`
-	
+
+	if [ ${RELEASE_MODE} ]; then
+		if [ "${RELEASE_MODE}" != "release" ];then
+			VERSION="${VERSION}~${RELEASE_MODE}"
+		fi
+	else
+		VERSION="${VERSION}-snapshot-${SNAPSHOT_TAG}"
+	fi
+	echo "Version is : ${VERSION}"
+
 	# if push is activated
 	if [ ${DO_PUSH} ];then
 
 		# first changelog generation for commit
 		echo "Update debian changelogs (1/2)"
 
-		${SCRIPTS_DIR}/sfl-git-dch.sh ${RELEASE_MODE}
-	
+		${SCRIPTS_DIR}/sfl-git-dch.sh ${VERSION} ${RELEASE_MODE}
+
 		if [ "$?" -ne "0" ]; then
 			echo "!! Cannot update debian changelogs"
 			exit -1
 		fi
 
 		echo " Doing commit"
-		VERSION_COMMIT=${VERSION}${VERSION_APPEND}
-		if [ ! ${RELEASE_MODE} ]; then
-			VERSION_COMMIT="snapshot"
-		fi
+		
         	cd ${REPOSITORY_DIR}
-		git commit -m "[#1262] Updated debian changelogs (${VERSION_COMMIT})" . >/dev/null
+		git commit -m "[#1262] Updated debian changelogs (${VERSION})" . >/dev/null
 
 		echo " Pushing commit"
 		git push origin master >/dev/null
@@ -268,8 +273,10 @@ if [ ${DO_PREPARE} ]; then
 	fi
 
 	echo "Write version numbers for following processes"
-	echo "${VERSION}${VERSION_APPEND}" > ${REPOSITORY_DIR}/VERSION.opensuse
-	echo "${VERSION}-0ubuntu1${VERSION_APPEND}" > ${REPOSITORY_DIR}/VERSION.ubuntu
+	echo "${VERSION}" > ${REPOSITORY_DIR}/sflphone-common/VERSION
+	echo "${VERSION}" > ${REPOSITORY_DIR}/sflphone-client-gnome/VERSION
+	echo "${VERSION}" > ${REPOSITORY_DIR}/sflphone-client-kde/VERSION
+	echo "${VERSION}" > ${TODEPLOY_BUILD_DIR}/VERSION
 
 	echo "Archiving repository"
 	tar czf ${REPOSITORY_ARCHIVE} --exclude .git -C `dirname ${REPOSITORY_DIR}` sflphone 
@@ -283,7 +290,7 @@ if [ ${DO_PREPARE} ]; then
 	rm -rf ${REPOSITORY_DIR}
 
 	echo "Finish preparing deploy directory"
-	cp -r ${PACKAGING_SCRIPTS_DIR}/* ${TODEPLOY_DIR}
+	cp -r ${DISTRIBUTION_SCRIPTS_DIR}/* ${TODEPLOY_DIR}
 
 	if [ "$?" -ne "0" ]; then
 		echo " !! Cannot prepare scripts for deployment"
@@ -326,7 +333,7 @@ if [ ${DO_MAIN_LOOP} ]; then
 	        fi
 
 		echo "Launch remote build"
-		${SSH_BASE} "${REMOTE_DEPLOY_DIR}/build-package-ubuntu.sh ${RELEASE_MODE}"
+		${SSH_BASE} "cd ${REMOTE_DEPLOY_DIR}/ubuntu/ && ./build-package-ubuntu.sh ${RELEASE_MODE}"
 
 		if [ "$?" -ne "0" ]; then
 	                echo " !! Error during remote packaging process"
@@ -419,7 +426,7 @@ if [ ${DO_UPLOAD} ]; then
 	fi
 fi
 
-if [ ${NON_FATAL_ERRORS} ]; then
+if [ "${NON_FATAL_ERRORS}" != "" ]; then
 	echo "Non fatal errors :"
 	echo ${NON_FATAL_ERRORS}
 	exit -1
diff --git a/tools/build-system/remote/build-package-ubuntu.sh b/tools/build-system/remote/build-package-ubuntu.sh
deleted file mode 100755
index 978ac486001dfae8007f1a7dd8802e8151cd09e1..0000000000000000000000000000000000000000
--- a/tools/build-system/remote/build-package-ubuntu.sh
+++ /dev/null
@@ -1,184 +0,0 @@
-#!/bin/bash
-#
-# @author: Yun Liu <yun.liu@savoirfairelinux.com>, Julien Bonjean <julien.bonjean@savoirfairelinux.com>
-#
-# Refer to http://www.sflphone.org for futher information
-#
-
-PLATFORM="ubuntu"
-
-ROOT_DIR="/home/sflphone/sflphone-packaging"
-BUILD_DIR="${ROOT_DIR}/build"
-DIST_DIR="${ROOT_DIR}/dists"
-REPOSITORY_ARCHIVE="${BUILD_DIR}/sflphone.tar.gz"
-REPOSITORY_DIR="${BUILD_DIR}/sflphone"
-REPOSITORY_SFLPHONE_COMMON_DIR="${REPOSITORY_DIR}/sflphone-common"
-REPOSITORY_SFLPHONE_CLIENT_KDE_DIR="${REPOSITORY_DIR}/sflphone-client-kde"
-REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR="${REPOSITORY_DIR}/sflphone-client-gnome"
-USER="sflphone"
-DIST_APPEND="-daily"
-RELEASE_MODE=$1
-VERSION_APPEND=
-EDITOR=echo
-export EDITOR
-
-#########################
-# BEGIN
-#########################
-
-WHO=`whoami`
-
-if [ "${WHO}" != "${USER}" ]; then
-        echo "!! Please use user ${USER} to run this script"
-        exit -1;
-fi
-
-if [ ${RELEASE_MODE} ]; then
-        echo "Release mode : ${RELEASE_MODE}"
-	if [ "${RELEASE_MODE}" = "release" ]; then
-		DIST_APPEND=""
-	else
-		DIST_APPEND="-testing"
-		VERSION_APPEND="~${RELEASE_MODE}"
-	fi
-else
-        echo "Snapshot mode"
-fi
-
-cd ${ROOT_DIR}
-
-if [ "$?" -ne "0" ]; then
-        echo " !! Cannot cd to working directory"
-        exit -1
-fi
-
-# decompress repository
-echo "Untar repository"
-cd ${BUILD_DIR} && tar xf ${REPOSITORY_ARCHIVE}
-
-if [ "$?" -ne "0" ]; then
-        echo " !! Cannot untar repository"
-        exit -1
-fi
-
-echo "Switch to internal logging"
-
-# get system parameters
-ARCH_FLAG=`getconf -a|grep LONG_BIT | sed -e 's/LONG_BIT\s*//'`
-OS_VERSION=`lsb_release -d -s -c | sed -e '1d'`
-PACKAGE_SYSVER="0ubuntu1"
-VERSION=`cd ${REPOSITORY_DIR} && head -n 1 ./sflphone-client-gnome/debian/changelog | awk '{print $2}' | sed -e 's/(//g' -e 's/)//g' | cut -d "-" -f1` 
-FULL_VERSION=`cd ${REPOSITORY_DIR} && head -n 1 ./sflphone-client-gnome/debian/changelog | awk '{print $2}' | sed -e 's/(//g' -e 's/)//g' -e 's/SYSVER/'${PACKAGE_SYSVER}'/g'`
-
-# define log files
-GLOBAL_LOG=${ROOT_DIR}/sflphone-${OS_VERSION}-${ARCH_FLAG}.log
-PACKAGING_LOG=${ROOT_DIR}/sflphone-debuild-${OS_VERSION}-${ARCH_FLAG}.log
-
-# open log file
-exec 3<>${GLOBAL_LOG}
-
-# redirect outputs (stdout & stderr)
-exec 1>&3
-exec 2>&3
-
-echo "SFLPhone version is ${VERSION}"
-
-echo "Do updates"
-sudo apt-get update >/dev/null
-sudo apt-get upgrade -y >/dev/null
-
-# generate the changelog, according to the distribution
-echo "Generate changelogs"
-sed -i 's/SYSTEM/'${OS_VERSION}'/g' ${REPOSITORY_SFLPHONE_COMMON_DIR}/debian/changelog && \
-sed -i 's/SYSVER/'${PACKAGE_SYSVER}'/g' ${REPOSITORY_SFLPHONE_COMMON_DIR}/debian/changelog && \
- # sed -i 's/SYSTEM/'${OS_VERSION}'/g' ${REPOSITORY_SFLPHONE_CLIENT_KDE_DIR}/debian/changelog && \
- # sed -i 's/SYSVER/'${PACKAGE_SYSVER}'/g' ${REPOSITORY_SFLPHONE_CLIENT_KDE_DIR}/debian/changelog && \
- sed -i 's/SYSTEM/'${OS_VERSION}'/g' ${REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR}/debian/changelog && \
- sed -i 's/SYSVER/'${PACKAGE_SYSVER}'/g' ${REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR}/debian/changelog
-
-if [ "$?" -ne "0" ]; then
-	echo "!! Cannot generate changelogs"
-	exit -1
-fi
-
-# copy the appropriate control file based on different archtecture
-echo "Generate control files"
-cp ${REPOSITORY_SFLPHONE_COMMON_DIR}/debian/control.$OS_VERSION ${REPOSITORY_SFLPHONE_COMMON_DIR}/debian/control && \
- # cp ${REPOSITORY_SFLPHONE_CLIENT_KDE_DIR}/debian/control.$OS_VERSION ${REPOSITORY_SFLPHONE_CLIENT_KDE_DIR}/debian/control && \
- cp ${REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR}/debian/control.$OS_VERSION ${REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR}/debian/control && \
- find ${REPOSITORY_DIR} -name "control" -exec sed -i "s/VERSION/${FULL_VERSION}/g" {} \;
-
-if [ "$?" -ne "0" ]; then
-        echo "!! Cannot generate control files"
-        exit -1
-fi
-
-# provide prerequisite directories used by debuild
-echo "Build sflphone packages on Ubuntu $OS_VERSION $ARCH_FLAG bit architecture...."
-cp -r ${REPOSITORY_SFLPHONE_COMMON_DIR} ${BUILD_DIR}/sflphone-common && \
-cp -r ${REPOSITORY_SFLPHONE_COMMON_DIR} ${BUILD_DIR}/sflphone-common-${FULL_VERSION}.orig && \
- # cp -r ${REPOSITORY_SFLPHONE_CLIENT_KDE_DIR} ${BUILD_DIR}/sflphone-client-kde-${FULL_VERSION}.orig && \
- cp -r ${REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR} ${BUILD_DIR}/sflphone-client-gnome-${FULL_VERSION}.orig && \
-# do a cp to because path must remain for client compilation
-mv ${REPOSITORY_SFLPHONE_COMMON_DIR} ${BUILD_DIR}/sflphone-common-${FULL_VERSION} && \
- # mv ${REPOSITORY_SFLPHONE_CLIENT_KDE_DIR} ${BUILD_DIR}/sflphone-client-kde-${FULL_VERSION} && \
- mv ${REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR} ${BUILD_DIR}/sflphone-client-gnome-${FULL_VERSION}
-
-# build package sflphone-common
-cd ${BUILD_DIR}/sflphone-common-${FULL_VERSION}/debian && \
-debuild -us -uc >${PACKAGING_LOG} 2>&1
-
-if [ "$?" -ne "0" ]; then
-        echo "!! Cannot generate package sflphone-common"
-        exit -1
-fi
-
-# build package sflphone-client-gnome
-cd ${BUILD_DIR}/sflphone-client-gnome-${FULL_VERSION}/debian && \
-debuild -us -uc >>${PACKAGING_LOG} 2>&1
-
-if [ "$?" -ne "0" ]; then
-        echo "!! Cannot generate package sflphone-client-gnome"
-        exit -1
-fi
-
-# build package sflphone-client-kde
-# cd ${BUILD_DIR}/sflphone-client-kde-${FULL_VERSION}/debian && \
-# debuild -us -uc >>${PACKAGING_LOG} 2>&1
-
-# if [ "$?" -ne "0" ]; then
-#         echo "!! Cannot generate package sflphone-client-kde"
-#         exit -1
-# fi
-
-# move to dist
-echo "Deploy files in dist directories"
-BINARY_DIR=""
-if [ "${ARCH_FLAG}" -eq "32" ]; then
-	BINARY_DIR="binary-i386"
-else
-	BINARY_DIR="binary-amd64"
-fi
-
-mkdir -p ${DIST_DIR}/${OS_VERSION}${DIST_APPEND}/universe/source
-mkdir -p ${DIST_DIR}/${OS_VERSION}${DIST_APPEND}/universe/${BINARY_DIR}
-
-mv ${BUILD_DIR}/sflphone*.deb ${DIST_DIR}/${OS_VERSION}${DIST_APPEND}/universe/${BINARY_DIR} && \
-mv ${BUILD_DIR}/sflphone*.dsc ${DIST_DIR}/${OS_VERSION}${DIST_APPEND}/universe/source/ && \
-mv ${BUILD_DIR}/sflphone*.build ${DIST_DIR}/${OS_VERSION}${DIST_APPEND}/universe/source/ && \
-mv ${BUILD_DIR}/sflphone*.changes ${DIST_DIR}/${OS_VERSION}${DIST_APPEND}/universe/source/ && \
-mv ${BUILD_DIR}/sflphone*.orig.tar.gz ${DIST_DIR}/${OS_VERSION}${DIST_APPEND}/universe/source/ && \
-mv ${BUILD_DIR}/sflphone*.diff.gz ${DIST_DIR}/${OS_VERSION}${DIST_APPEND}/universe/source/
-
-if [ "$?" -ne "0" ]; then
-        echo "!! Cannot copy dist files"
-        exit -1
-fi
-
-echo "All done"
-
-# close file descriptor
-exec 3>&-
-
-exit 0
-
diff --git a/tools/build-system/sfl-git-dch.sh b/tools/build-system/sfl-git-dch.sh
index 7e4b968e2a7d6555a3718b21abaf2b90d7b37f40..c6ea370334839e6de6dd566e98fe5ce066a1721d 100755
--- a/tools/build-system/sfl-git-dch.sh
+++ b/tools/build-system/sfl-git-dch.sh
@@ -7,22 +7,21 @@
 # Author: Julien Bonjean (julien@bonjean.info) 
 #
 # Creation Date: 2009-05-13
-# Last Modified: 2009-05-19 10:09:33 -0400
+# Last Modified: 2009-05-28 18:24:53 -0400
 #####################################################
 
 # set -x
 
-RELEASE_MODE=$1
+VERSION=$1
+RELEASE_MODE=$2
 
 ROOT_DIR="/home/projects/sflphone"
 TODEPLOY_DIR="${ROOT_DIR}/sflphone-packaging"
 TODEPLOY_BUILD_DIR="${TODEPLOY_DIR}/build"
 REPOSITORY_DIR="${TODEPLOY_BUILD_DIR}/sflphone"
 SCRIPTS_DIR="${ROOT_DIR}/build-system"
-
-CHANGELOG_FILES=( "sflphone-common/debian/changelog" "sflphone-client-gnome/debian/changelog" )
-
-SNAPSHOT_TAG=`date +%s`
+DEBIAN_DIR="${SCRIPTS_DIR}/distributions/ubuntu"
+CHANGELOG_FILES=( "${DEBIAN_DIR}/debian-sflphone-common/changelog" "${DEBIAN_DIR}/debian-sflphone-client-gnome/changelog" "${DEBIAN_DIR}/debian-sflphone-client-kde/changelog")
 
 export DEBFULLNAME="SFLphone Automatic Build System"
 export DEBEMAIL="team@sflphone.org"
@@ -84,28 +83,6 @@ if [ "$?" -ne "0" ]; then
         exit -1
 fi
 
-# get version
-SOFTWARE_VERSION=`echo ${LAST_RELEASE_TAG_NAME} | cut -d "/" -f2- | cut -d "-" -f1`
-
-if [ "$?" -ne "0" ]; then
-        echo " !! Error when retrieving software version"
-        exit -1
-fi
-
-# add version info
-SOFTWARE_VERSION_APPEND=
-if [ ${RELEASE_MODE} ]
-then
-	if [ "${RELEASE_MODE}" != "release" ]; then
-		SOFTWARE_VERSION_APPEND="~${RELEASE_MODE}"
-	fi
-else
-	SOFTWARE_VERSION_APPEND="~snapshot${SNAPSHOT_TAG}"
-fi
-	
-	
-
-
 # iterate throw changelog files
 for CHANGELOG_FILE in ${CHANGELOG_FILES[@]}
 do
@@ -142,7 +119,7 @@ do
 
 		if [ ${IS_FIRST} ]
 		then
-			yes | dch --changelog ${CHANGELOG_FILE}  -b --allow-lower-version --no-auto-nmu --distribution SYSTEM --newversion ${SOFTWARE_VERSION}-SYSVER${SOFTWARE_VERSION_APPEND} "$line" >/dev/null 2>&1
+			yes | dch --changelog ${CHANGELOG_FILE}  -b --allow-lower-version --no-auto-nmu --distribution SYSTEM --newversion ${VERSION}-SYSVER "$line" >/dev/null 2>&1
 		
 			if [ "$?" -ne "0" ]; then
 				echo
@@ -165,13 +142,13 @@ do
 	# add snapshot or release flag if needed
 	echo
 	if [ ${RELEASE_MODE} ]; then
-		sed -i "3i\    ** ${SOFTWARE_VERSION} ${RELEASE_MODE} **\n" ${CHANGELOG_FILE}
+		sed -i "3i\    ** ${VERSION} **\n" ${CHANGELOG_FILE}
                 if [ "$?" -ne "0" ]; then
                         echo " !! Error when adding snapshot flag"
                         exit -1
                 fi
 	else
-		sed -i "3i\    ** SNAPSHOT ${SNAPSHOT_TAG} **\n" ${CHANGELOG_FILE}
+		sed -i "3i\    ** SNAPSHOT ${VERSION} **\n" ${CHANGELOG_FILE}
 		if [ "$?" -ne "0" ]; then
 	                echo " !! Error when adding snapshot flag"
 			exit -1