core_install.sh
2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/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"