1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-13 03:41:55 +00:00

update package script

This commit is contained in:
winlin 2014-04-28 18:48:31 +08:00
parent dfa32f9b72
commit cdcbca6423

View file

@ -10,8 +10,9 @@ echo "通用打包脚本,--help查看参数"
INSTALL=/usr/local/srs INSTALL=/usr/local/srs
# whether build for arm, only for ubuntu12. # whether build for arm, only for ubuntu12.
help=NO help=NO
X86_64=YES
ARM=NO ARM=NO
DO_BUILD=YES PI=NO
################################################################################## ##################################################################################
################################################################################## ##################################################################################
@ -30,8 +31,9 @@ do
case "$option" in case "$option" in
--help) help=yes ;; --help) help=yes ;;
--x86-64) X86_64=YES ;;
--arm) ARM=YES ;; --arm) ARM=YES ;;
--no-build) DO_BUILD=NO ;; --pi) PI=NO ;;
*) *)
echo "$0: error: invalid option \"$option\"" echo "$0: error: invalid option \"$option\""
@ -44,8 +46,12 @@ if [ $help = yes ]; then
--help print this message --help print this message
--arm configure with arm and make srs. use arm tools to get info. --x86-64 for x86-64 platform, configure/make/package.
--no-build donot build srs, user has builded(./configure --pi && make). only make install. --arm for arm cross-build platform, configure/make/package.
--pi for pi platform, configure/make/package.
default:
--x86-64
END END
exit 0 exit 0
fi fi
@ -84,24 +90,27 @@ if [[ "unknown" == $os_machine ]]; then os_machine=`uname -m`; fi
# build srs # build srs
# @see https://github.com/winlinvip/simple-rtmp-server/wiki/Build # @see https://github.com/winlinvip/simple-rtmp-server/wiki/Build
if [ $DO_BUILD = YES ]; then ok_msg "start build srs"
ok_msg "start build srs" if [ $X86_64 = YES ]; then
if [ $ARM = YES ]; then (
( cd $work_dir &&
cd $work_dir && ./configure --x86-x64 --prefix=$INSTALL && make
./configure --arm --prefix=$INSTALL && make ) >> $log 2>&1
) >> $log 2>&1 elif [ $ARM = YES ]; then
else (
( cd $work_dir &&
cd $work_dir && ./configure --arm --prefix=$INSTALL && make
./configure --x86-x64 --prefix=$INSTALL && make ) >> $log 2>&1
) >> $log 2>&1 elif [ $PI = YES ]; then
fi (
ret=$?; if [[ 0 -ne ${ret} ]]; then failed_msg "build srs failed"; exit $ret; fi cd $work_dir &&
ok_msg "build srs success" ./configure --pi --prefix=$INSTALL && make
) >> $log 2>&1
else else
ok_msg "user skip build, directly install" failed_msg "invalid option, must be x86-x64/arm/pi, see --help"; exit 1;
fi fi
ret=$?; if [[ 0 -ne ${ret} ]]; then failed_msg "build srs failed"; exit $ret; fi
ok_msg "build srs success"
# install srs # install srs
ok_msg "start install srs" ok_msg "start install srs"