# Before run the script, give it permission to execute.
# sudo chmod +x build_harbour.sh


sudo apt-get update -y
sudo apt-get install bash git gcc binutils fakeroot debhelper valgrind upx uncrustify -y
sudo apt-get install autoconf automake intltool gdebi gdebi-core git-svn build-essential -y
sudo apt-get install libncurses5-dev libslang2-dev libx11-dev libgpm-dev -y
sudo apt-get install liballegro4.2-dev libcairo2-dev libcups2-dev libcurl4-openssl-dev -y
sudo apt-get install libfreeimage-dev libgs-dev libpcre++-dev -y
sudo apt-get install libmagic-dev unixodbc-dev libpq-dev -y
sudo apt-get install libexpat1-dev libmagic-dev libbz2-dev libsqlite3-dev -y
sudo apt-get install libcurl4-gnutls-dev -y
sudo apt install net-tools -y

#cd ~
git clone http://github.com/harbour/core.git harbour
cd ~/harbour
export HB_WITH_PCRE=local
export HB_WITH_CURL=/usr/include
cd /usr/include
sudo ln -s x86_64-linux-gnu/curl

cd ~/harbour
sudo -E make
sudo -E make install 

