core_install.sh 2.33 KB
#!/bin/bash

echo -e "\n## Iniciando a instalação do vlibras-core ##\n"

DIR=$HOME/vlibras-libs

if [ ! -d "$DIR" ] ; then
	mkdir $DIR
fi

#garanto que não tem nenhuma versão prévia instalada
sudo apt-get remove -y ffmpeg x264 libx264-dev yasm

echo -e "\n## Fazendo download das dependências...\n"

sudo apt-get update
sudo apt-get install -y aptitude
sudo aptitude install -y build-essential libvpx-dev sox libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev  automake autoconf  libmad0-dev libgpm-dev libavcodec-dev libavformat-dev  libdirectfb-extra libtool libavcodec-extra-52 libavformat-extra-52 libdirectfb-bin libdirectfb-dev libgtk+2.0-directfb0 libgtk+2.0-directfb-dev

cd ~/vlibras-libs

wget http://150.165.204.30:8080/core/linux/yasm-1.2.0.tar.gz
wget http://150.165.204.30:8080/core/linux/jlibcpp-1.5.0.tar.gz
wget http://150.165.204.30:8080/core/linux/julius-4.3.1.tar.gz
wget http://150.165.204.30:8080/core/linux/lavid-lib.tar.gz
wget http://150.165.204.30:8080/core/linux/ffmpeg-vlibras.tar.gz

echo -e "\n## Extraindo...\n"

tar -xf ffmpeg-vlibras.tar.gz
tar -xf yasm-1.2.0.tar.gz
tar -xf jlibcpp-1.5.0.tar.gz
tar -xf julius-4.3.1.tar.gz
tar -xf lavid-lib.tar.gz

echo -e "\n## Instalando dependências...\n"

echo -e "\n## Instalando Yasm...\n"
cd yasm-1.2.0
chmod +x configure
./configure
make
sudo make install

echo -e "\n## Instalando x264...\n"
cd ..
git clone --depth 1 git://git.videolan.org/x264
cd x264
chmod +x configure
./configure --enable-shared --enable-pic
make
sudo make install
sudo ldconfig

echo -e "\n## Instalando FFmpeg...\n"
cd ..
cd ffmpeg
chmod +x configure
./configure --enable-libvpx --enable-gpl --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-pthreads --enable-hwaccels --enable-sram
make
sudo make install
hash x264 ffmpeg ffprobe

echo -e "\n## Instalando jlibcpp...\n"
cd ..
cd jlibcpp
make ENABLE_DIRECTFB=no
sudo make install
sudo ldconfig

echo -e "\n## Instalando Julius...\n"
cd ..
cd julius-4.3.1
./configure
make
sudo make install

echo -e "\n## Instalando Lavidlib...\n"
cd ..
cd lavid-lib
make
sudo make install

cd ..
rm ffmpeg-vlibras.tar.gz yasm-1.2.0.tar.gz jlibcpp-1.5.0.tar.gz julius-4.3.1.tar.gz lavid-lib.tar.gz
echo -e "\n## Instalação finalizada! ##\n"