Update package script

pull/1684/head
winlin 5 years ago
parent f674cab84f
commit d5339acc57

@ -16,6 +16,7 @@ PI=NO
MIPS=NO MIPS=NO
# #
EMBEDED=NO EMBEDED=NO
JOBS=1
################################################################################## ##################################################################################
################################################################################## ##################################################################################
@ -39,6 +40,7 @@ do
--mips) MIPS=YES ;; --mips) MIPS=YES ;;
--arm) ARM=YES ;; --arm) ARM=YES ;;
--pi) PI=YES ;; --pi) PI=YES ;;
--jobs) JOBS=$value ;;
*) *)
echo "$0: error: invalid option \"$option\", @see $0 --help" echo "$0: error: invalid option \"$option\", @see $0 --help"
@ -56,6 +58,7 @@ if [ $help = yes ]; then
--mips for mips cross-build platform, configure/make/package. --mips for mips cross-build platform, configure/make/package.
--pi for pi platform, configure/make/package. --pi for pi platform, configure/make/package.
--x86-64 alias for --x86-x64. --x86-64 alias for --x86-x64.
--jobs Set the configure and make jobs.
END END
exit 0 exit 0
fi fi
@ -113,26 +116,26 @@ ok_msg "real os is ${os_name}-${os_major_version} ${os_release} ${os_machine}"
# build srs # build srs
# @see https://github.com/ossrs/srs/wiki/v1_CN_Build # @see https://github.com/ossrs/srs/wiki/v1_CN_Build
ok_msg "start build srs" ok_msg "start build srs, ARM: $ARM, MIPS: $MIPS, PI: $PI, X86_64: $X86_X64, JOBS: $JOBS"
if [ $ARM = YES ]; then if [ $ARM = YES ]; then
( (
cd $work_dir && cd $work_dir &&
./configure --arm --prefix=$INSTALL && make ./configure --arm --jobs=$JOBS --prefix=$INSTALL && make
) >> $log 2>&1 ) >> $log 2>&1
elif [ $MIPS = YES ]; then elif [ $MIPS = YES ]; then
( (
cd $work_dir && cd $work_dir &&
./configure --mips --prefix=$INSTALL && make ./configure --mips --jobs=$JOBS --prefix=$INSTALL && make
) >> $log 2>&1 ) >> $log 2>&1
elif [ $PI = YES ]; then elif [ $PI = YES ]; then
( (
cd $work_dir && cd $work_dir &&
./configure --pi --prefix=$INSTALL && make ./configure --pi --jobs=$JOBS --prefix=$INSTALL && make
) >> $log 2>&1 ) >> $log 2>&1
elif [ $X86_X64 = YES ]; then elif [ $X86_X64 = YES ]; then
( (
cd $work_dir && cd $work_dir &&
./configure --x86-x64 --prefix=$INSTALL && make ./configure --x86-x64 --jobs=$JOBS --prefix=$INSTALL && make
) >> $log 2>&1 ) >> $log 2>&1
else else
failed_msg "invalid option, must be --x86-x64/--arm/--mips/--pi, see --help"; exit 1; failed_msg "invalid option, must be --x86-x64/--arm/--mips/--pi, see --help"; exit 1;

Loading…
Cancel
Save