anchor.diff:  DESCRIPTION = "Meta package for SDK including GPE"
   LICENSE = "MIT"
   DEPENDS = "ipkg-native ipkg-utils-native fakeroot-native sed-native"
  -PR = "r0"
  +PR = "r1"
   
  -inherit sdk meta
  +inherit rootfs_ipk sdk meta
   
   SDK_DIR = "${WORKDIR}/sdk"
   SDK_OUTPUT = "${SDK_DIR}/image"
  
positive.code: 
  RDEPENDS = "${TARGET_INSTALL} ${HOST_INSTALL}"
  
  do_populate_sdk() {
  	touch ${DEPLOY_DIR_IPK}/Packages
  	ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK}
  
  	rm -rf ${SDK_OUTPUT}
  	mkdir -p ${SDK_OUTPUT}
  
  	cat <<EOF >${SDK_DIR}/ipkg-host.conf
  src oe file:${DEPLOY_DIR_IPK}
  arch ${BUILD_ARCH} 1
  EOF
          cat <<EOF >${SDK_DIR}/ipkg-target.conf
  src oe file:${DEPLOY_DIR_IPK}
  EOF
  	ipkgarchs="${PACKAGE_ARCHS}"
          priority=1
          for arch in $ipkgarchs; do
                  echo "arch $arch $priority" >> ${SDK_DIR}/ipkg-target.conf
  	        priority=$(expr $priority + 5)
          done
  
  	rm -r ${SDK_OUTPUT}
  	mkdir -p ${SDK_OUTPUT}
  
  	${IPKG_HOST} update
  	${IPKG_HOST} -nodeps install ${HOST_INSTALL}
  
negative.code: 
  do_populate_sdk[nostamp] = "1"
  do_populate_sdk[recrdeptask] = "do_package_write"
  addtask populate_sdk before do_package_write after do_install
  