Index: emdebian/trunk/buildcross/trunk/em_version.sh
===================================================================
--- emdebian/trunk/buildcross/trunk/em_version.sh	(revision 3252)
+++ emdebian/trunk/buildcross/trunk/em_version.sh	(working copy)
@@ -29,10 +29,10 @@
 ls -1 /jails/$HOST-$SUITE/home/toolchain/trunk/$ARCH/*deb > /tmp/$HOST-$ARCH-$SUITE.txt
 EM_VERSION=`cat /tmp/$HOST-$ARCH-$SUITE.txt | grep $PKG | cut -d'/' -f8 | cut -d'_' -f2`
 
-if [ -n $EM_VERSION ]; then
+if [ -n "$EM_VERSION" ]; then
 	echo "FLAG: 1"
 	echo "$ARCH $PKG - out of sync"
-elif [ $DEB_VERSION == $EM_VERSION ]; then
+elif [ "$DEB_VERSION" == "$EM_VERSION" ]; then
 # Compares both versions
 	echo "FLAG: 0"
 	echo "$ARCH $PKG - in sync"
Index: emdebian/trunk/buildcross/trunk/em_cross.sh
===================================================================
--- emdebian/trunk/buildcross/trunk/em_cross.sh	(revision 3252)
+++ emdebian/trunk/buildcross/trunk/em_cross.sh	(working copy)
@@ -52,25 +52,26 @@
 	checkinstalled fakeroot
 	checkinstalled dpatch
 	checkinstalled patchutils
-	checkinstalled tar
+#	checkinstalled tar
 	checkinstalled bzip2
 	checkinstalled lsb-release
 	checkinstalled autoconf
-	checkinstalled autoconf2.13
-	checkinstalled automake1.9
+#	checkinstalled autoconf2.13
+	checkinstalled automake1.10
 	checkinstalled libtool
 	checkinstalled autogen
-	checkinstalled gawk
+#	checkinstalled gawk
+	checkinstalled busybox
 	checkinstalled bison
 	checkinstalled flex
 	checkinstalled realpath
 	checkinstalled texinfo
 	checkinstalled devscripts
 	checkinstalled reprepro
-	checkinstalled less 
-	checkinstalled coreutils
-	checkinstalled automake1.4
-	checkinstalled automake1.7
+#	checkinstalled less 
+#	checkinstalled coreutils
+#	checkinstalled automake1.4
+#	checkinstalled automake1.7
 	checkinstalled dh-make
 	checkinstalled debhelper
 	checkinstalled apt-cross
@@ -80,7 +81,7 @@
 	checkinstalled tetex-bin 
 	checkinstalled libncurses5-dev 
 	checkinstalled libreadline5-dev 
-	#checkinstalled gcj 
+#	checkinstalled gcj 
 	checkinstalled gobjc 
 	checkinstalled cdbs  
  	checkinstalled quilt 
@@ -456,7 +457,7 @@
 	# REPLACE: This quite does not work
 	# echo 0 >> $LOGPATH/$HOST-$ARCH-$PKG.log
 	TEST=`cat $LOGPATH/$HOST-$ARCH-$PKG.log | grep $HOST.deb`
-	if [ -n ${TEST} ]; then
+	if [ -n "${TEST}" ]; then
 	 	echo 1 >> $LOGPATH/$HOST-$ARCH-$PKG.log
 	else
 	 	echo 0 >> $LOGPATH/$HOST-$ARCH-$PKG.log
Index: emdebian/trunk/buildcross/trunk/conf_vars.sh
===================================================================
--- emdebian/trunk/buildcross/trunk/conf_vars.sh	(revision 3252)
+++ emdebian/trunk/buildcross/trunk/conf_vars.sh	(working copy)
@@ -1,8 +1,10 @@
 # Config variables
 # PKGLIST=${PKGLIST:="libs 4.1"}
-PKGLIST=${PKGLIST:="libs 4.1 4.3"}
+#PKGLIST=${PKGLIST:="libs 4.1 4.3"}
+PKGLIST=${PKGLIST:="libs 4.3"}
 # ARCHLIST=${ARCHLIST:="armel"}
-ARCHLIST=${ARCHLIST:="arm armel mips mipsel powerpc sparc s390 m68k hppa alpha ia64 amd64"}
+#ARCHLIST=${ARCHLIST:="i386 arm armel mips mipsel powerpc sparc s390 m68k hppa alpha ia64 amd64"}
+ARCHLIST=${ARCHLIST:="arm"}
 SUITE=unstable
 HOST=$(dpkg-architecture -qDEB_HOST_ARCH)
 LOGHTMLPATH=./
@@ -10,4 +12,4 @@
 LOGPATH=./logs/
 MIRROR=${MIRROR:="http://ftp.uk.debian.org/debian"}
 ROOTCMD=sudo
-FORCE_REBUILD=no
+FORCE_REBUILD=${FORCE_REBUILD:=yes}
Index: emdebian/trunk/buildcross/trunk/em_build.sh
===================================================================
--- emdebian/trunk/buildcross/trunk/em_build.sh	(revision 3252)
+++ emdebian/trunk/buildcross/trunk/em_build.sh	(working copy)
@@ -10,12 +10,12 @@
 echo "Compare debian vs emdebian versions: em_version.sh"
 FLAG=`./em_version.sh $PKG 2> /dev/null | grep ^FLAG: | sed -e 's/FLAG: //g'`
 
-if [ $FLAG == 0 ]; then
-	if [ ${FORCE_REBUILD} eq yes  ]; then
+if [ $FLAG -eq 0 ]; then
+	if [ "x$FORCE_REBUILD" == "xyes" ]; then
 		./em_cross.sh $PKG $ARCH
 	fi
 	./em_log.sh $PKG $ARCH
-elif [ $FLAG == 1 ]; then
+elif [ $FLAG -eq 1 ]; then
 	echo "Needs to trigger buildcross: em_cross.sh"
 	./em_cross.sh $PKG $ARCH
 	./em_log.sh $PKG $ARCH
Index: emdebian/trunk/buildcross/trunk/buildcross
===================================================================
--- emdebian/trunk/buildcross/trunk/buildcross	(revision 3252)
+++ emdebian/trunk/buildcross/trunk/buildcross	(working copy)
@@ -1,11 +1,10 @@
 #!/bin/bash
-# $Header: /var/emdebian/svn/tools/buildcross/branch/buildcross,v 0.3 2007/07/18 01:10:03 zumbi Exp $
 #
-#  Copyright (C) 2000, 2007  Emdebian <debian-embedded@lists.debian.org>
+#  Copyright (C) 2000, 2007, 2008  Emdebian <debian-embedded@lists.debian.org>
 #
 #  This program should call buildcross to build a certain outdated
 #  package. It runs buildcross in a modular way. This program should
-#  check if there is a need of building a certain package.
+#  check if there is a need for building a certain package.
 #
 #  PSEUDO CODE:
 #     For all arches do
@@ -38,26 +37,26 @@
 #
 # Distributed under the terms of the GNU General Public License v2
 
-source conf_vars.sh
+. conf_vars.sh
 
 if [ ! -d $LOGPATH ]; then
         mkdir -p $LOGPATH
 fi
 
-usage(){
+usage () {
 	echo "Usage: ${0##*/} [OPTION]"
-	echo "Build Debian cross toolchain system."
-	echo 
 	cat << EOF
-	-h	displays this help
-	-v	displays version number
-	-b	no output, runs completely on background
+Build Debian cross toolchain.
+
+	-h	display this help
+	-v	display version number
+	-b	no output, runs completely in the background
 		WARNING: You can not stop it, just using kill.
-			 If you are in a chroot beware proc is mounted.
+			 If you are in a chroot then make sure proc is mounted.
 	-c	no output mode
 	-d	Show output. Recommended for first time.
 
-	Check log.html file (bug: libs always is marked as failed)
+	Check log.html file (bug: libs is always marked as failed)
 	All log info is under logs/
 	build.log	buildcross log
 	1-2-3.log	package log
@@ -68,16 +67,13 @@
 }
 
 case $1 in
- -h)
- 	usage
-	exit 0
-	;;
  -v)
  	echo "Version: 0.2"
+	exit 0
 	;;
  -b)
-	echo "Buildcross has no output with -b option, so it runs on background."
-	echo "Check log.html when time is displayed"
+	echo "Running in the background."
+	echo "Check $LOGPATH/build.log"
 	time ./em_wrap.sh &> $LOGPATH/build.log &
 	;;
  -c)
@@ -86,5 +82,9 @@
  -d)
 	time ./em_wrap.sh | tee $LOGPATH/build.log 
  	;;
+*)
+ 	usage
+	exit 0
+	;;
 esac
 
Index: emdebian/trunk/buildcross/trunk/em_log.sh
===================================================================
--- emdebian/trunk/buildcross/trunk/em_log.sh	(revision 3252)
+++ emdebian/trunk/buildcross/trunk/em_log.sh	(working copy)
@@ -10,12 +10,18 @@
 
 # Check logs - Need to be improved, it does not work fine.
 VAR=`tail -n 1 $LOGPATH/$HOST-$ARCH-$PKG.log`
-
+# Failed?
+if [ "x$VAR" = "x" ]
+then
+  VAR=1
+else
+  VAR=0
+fi
 # Maybe show logfile on the html
 
-if [ $VAR == 0 ]; then
-	echo "Build succesful"
-	echo " &nbsp; $HOST : $ARCH : $SUITE : $PKG : <a href="$LOGPATH/$HOST-$ARCH-$PKG.log">LOGFILE</a> : <b> Build succesful </b> <br>" >> $LOGHTMLPATH/$LOGHTML
+if [ $VAR -eq 0 ]; then
+	echo "Build successful"
+	echo " &nbsp; $HOST : $ARCH : $SUITE : $PKG : <a href="$LOGPATH/$HOST-$ARCH-$PKG.log">LOGFILE</a> : <b> Build successful </b> <br>" >> $LOGHTMLPATH/$LOGHTML
 else
 	echo "Build maybe failed"
 	echo " &nbsp; $HOST : $ARCH : $SUITE : $PKG : <a href="$LOGPATH/$HOST-$ARCH-$PKG.log">LOGFILE</a> :<b><i> Build maybe failed </i><b> <br>" >> $LOGHTMLPATH/$LOGHTML
Index: host/trunk/empath/trunk/configure.ac
===================================================================
--- host/trunk/empath/trunk/configure.ac	(revision 3252)
+++ host/trunk/empath/trunk/configure.ac	(working copy)
@@ -54,7 +54,9 @@
 dnl *****************
 dnl apt
 dnl *****************
-AC_CHECK_HEADERS(apt-pkg/pkgcache.h )
+AC_LANG_PUSH(C++)
+AC_CHECK_HEADERS([apt-pkg/init.h],[],[AC_MSG_ERROR([apt-pkg/init.h not found, install libapt-pkg-dev])])
+AC_LANG_POP
 
 dnl ******************************
 dnl Defaults for GCC
Index: README
===================================================================
--- README	(revision 3252)
+++ README	(working copy)
@@ -14,8 +14,12 @@
 cd host/trunk/emdebian-tools/trunk
 svn-buildpackage -us -uc -rfakeroot
 
+To build dpkg-cross:
+cd host/branches/lenny/dpkg-cross
+svn-buildpackage -us -uc -rfakeroot
+
 To build empath:
-cd host/trunk/emdebian-tools/trunk
+cd host/trunk/empath/trunk
 ./autogen.sh
 ./configure --enable-error-on-warning
 make
