# packlet de upack
#TMP_DIR viene  de upack
# hacer tmp_dir com mktemp

#que pasa con BuildArch???? en .spec

. $packlet/rpm-base.sh


# comprobar si hay spec ahi?
#--target ${host}


	SALIDA=`rpmbuild -bb --buildroot  $(cd ${UPACKDROOT} ; pwd)    ${UPACKDINFO}/$PACKAGE.spec | awk -F' ' '/\/RPMS\// {print $2}'`  
        echo "SALIDA: ${SALIDA}" 

if test x"$SALIDA" = x ; then
   msg 4 "Error rpmbuild.";
   exit
fi
#	MINVERSION=`echo $(VERSION) |cut -d_ -f1`
  mv $SALIDA .

#$ARGUME.rpm
#	mv  $SALIDA ${PACKAGE}-$MINVERSION-${RELEASE}.${host}.rpm ;
#	mv  $SALIDAS . ;
#	rm ${PACKAGE}.spec; exit 0
