-
Notifications
You must be signed in to change notification settings - Fork 3
/
INSTALL
executable file
·57 lines (48 loc) · 1.69 KB
/
INSTALL
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
#!/bin/bash
TESTING=false
# save working directory
WD=$(pwd)
sudo apt --assume-yes install yasm autoconf automake build-essential libass-dev libfreetype6-dev libtool libsdl2-dev libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev
sudo ldconfig -v
sudo apt --assume-yes install git cmake autoconf automake build-essential libass-dev libfreetype6-dev libtool libsdl2-dev libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev yasm libgtk2.0-dev libavcodec-dev libavformat-dev libswscale-dev ubuntu-restricted-extras libcgicc5-dev libboost-dev apache2 libserial-dev arduino beep v4l-utils guvcview
# maybe libcgicc3?????
# skip big installs if testing
if ! $TESTING ;
then
# ffmpeg
cd ~
wget http://ffmpeg.org/releases/ffmpeg-3.4.tar.bz2
tar -xjf ffmpeg-3.4.tar.bz2
rm ffmpeg-3.4.tar.bz2
cd ffmpeg-3.4
./configure --enable-nonfree --enable-pic --enable-libfreetype --enable-shared
make
sudo make install
cd ..
#rm -rf ffmpeg-3.4
# opencv
cd ~
wget https://github.com/opencv/opencv/archive/3.3.0.zip
unzip 3.3.0.zip
rm 3.3.0.zip
cd ~/opencv-3.3.0
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
make -j$(grep -c ^processor /proc/cpuinfo) # parallelize
sudo make install
cd ~
#rm -rf opencv-3.3.0
fi
# enable cgi-bin with apache and update apache2.conf for password security
sudo a2enmod cgi
sudo cp security/apache2.conf /etc/apache2/apache2.conf
sudo service apache2 restart
## libserial
##git clone https://github.com/crayzeewulf/libserial.git
#
sudo ldconfig -v
# configure directories and all that sh*t
cd $WD
make all
sudo ./CONFIG