1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

update build script for ubuntu

This commit is contained in:
winlin 2013-12-10 10:34:33 +08:00
parent bb90881489
commit 86e30ec2c9

View file

@ -15,70 +15,63 @@ function Ubuntu_prepare()
echo "Ubuntu detected, install tools if needed" echo "Ubuntu detected, install tools if needed"
apt-cache show libpcre3; ret=$?; if [[ 0 -ne $ret ]]; then gcc --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
echo "install libpcre3"
require_sudoer "sudo apt-get install -y libpcre3"
sudo apt-get install -y libpcre3
echo "install libpcre3 success"
fi
apt-cache show libpcre3-dev; ret=$?; if [[ 0 -ne $ret ]]; then
echo "install libpcre3-dev"
require_sudoer "sudo apt-get install -y libpcre3-dev"
sudo apt-get install -y libpcre3-dev
echo "install libpcre3-dev success"
fi
apt-cache show zlib1g-dev; ret=$?; if [[ 0 -ne $ret ]]; then
echo "install zlib1g-dev"
require_sudoer "sudo apt-get install -y zlib1g-dev"
sudo apt-get install -y zlib1g-dev
echo "install zlib1g-dev success"
fi
apt-cache show libfreetype6-dev; ret=$?; if [[ 0 -ne $ret ]]; then
echo "install libfreetype6-dev"
require_sudoer "sudo apt-get install -y libfreetype6-dev"
sudo apt-get install -y libfreetype6-dev
echo "install libfreetype6-dev success"
fi
apt-cache show gcc; ret=$?; if [[ 0 -ne $ret ]]; then
echo "install gcc" echo "install gcc"
require_sudoer "sudo apt-get install -y gcc" require_sudoer "sudo apt-get install -y gcc"
sudo apt-get install -y gcc sudo apt-get install -y gcc
echo "install gcc success" echo "install gcc success"
fi fi
apt-cache show g++; ret=$?; if [[ 0 -ne $ret ]]; then g++ --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
echo "install g++" echo "install g++"
require_sudoer "sudo apt-get install -y g++" require_sudoer "sudo apt-get install -y g++"
sudo apt-get install -y g++ sudo apt-get install -y g++
echo "install g++ success" echo "install g++ success"
fi fi
apt-cache show make; ret=$?; if [[ 0 -ne $ret ]]; then make --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
echo "install make" echo "install make"
require_sudoer "sudo apt-get install -y make" require_sudoer "sudo apt-get install -y make"
sudo apt-get install -y make sudo apt-get install -y make
echo "install make success" echo "install make success"
fi fi
apt-cache show autoconf; ret=$?; if [[ 0 -ne $ret ]]; then autoconf --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
echo "install autoconf" echo "install autoconf"
require_sudoer "sudo apt-get install -y autoconf" require_sudoer "sudo apt-get install -y autoconf"
sudo apt-get install -y autoconf sudo apt-get install -y autoconf
echo "install autoconf success" echo "install autoconf success"
fi fi
apt-cache show libtool; ret=$?; if [[ 0 -ne $ret ]]; then libtool --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
echo "install libtool" echo "install libtool"
require_sudoer "sudo apt-get install -y libtool" require_sudoer "sudo apt-get install -y libtool"
sudo apt-get install -y libtool sudo apt-get install -y libtool
echo "install libtool success" echo "install libtool success"
fi fi
apt-cache show libssl-dev; ret=$?; if [[ 0 -ne $ret ]]; then if [[ ! -f /usr/include/pcre.h ]]; then
echo "install libpcre3-dev"
require_sudoer "sudo apt-get install -y libpcre3-dev"
sudo apt-get install -y libpcre3-dev
echo "install libpcre3-dev success"
fi
if [[ ! -f /usr/include/zlib.h ]]; then
echo "install zlib1g-dev"
require_sudoer "sudo apt-get install -y zlib1g-dev"
sudo apt-get install -y zlib1g-dev
echo "install zlib1g-dev success"
fi
if [[ ! -d /usr/include/freetype2 ]]; then
echo "install libfreetype6-dev"
require_sudoer "sudo apt-get install -y libfreetype6-dev"
sudo apt-get install -y libfreetype6-dev
echo "install libfreetype6-dev success"
fi
if [[ ! -d /usr/include/openssl ]]; then
echo "install libssl-dev" echo "install libssl-dev"
require_sudoer "sudo apt-get install -y libssl-dev" require_sudoer "sudo apt-get install -y libssl-dev"
sudo apt-get install -y libssl-dev sudo apt-get install -y libssl-dev