#!/bin/bash

NAME=${file[0]}
PROGRAM=${file[3]}
FILE=${file[2]}
EXT=${file[4]}
DLINK=${file[1]}
MD5=${file[5]}

download ${DLINK}

waitUser

check ${FILE} ${MD5}

waitUser

unpack ${EXT}

waitUser

startBuild


cd $BUILD_DIR/$PROGRAM
{
	echo -e "$G $PROGRAM/configure $DEF" 
	./configure --prefix=/usr || exit 1
	StartMake
	waitUser
	make || exit 1
	
	c_MakeTest check || exit 1
	StartMakeInstall
	waitUser
	make install || exit 1
} 2>&1 | tee $BUILD_DIR/LOG_$PROGRAM.log
	if [ $PIPESTATUS -ne 0 ]
		then
			echo -e "$L_FAIL_BUIL"
			exit 1
	fi  	  
waitUser
RMbuild
cd $ROOT
