1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-13 11:51:57 +00:00

add package arm

This commit is contained in:
winlin 2014-03-24 13:13:52 +08:00
parent 41a21af0e1
commit 4992a9979a
2 changed files with 17 additions and 3 deletions

3
trunk/scripts/package-arm.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
bash package.sh arm

View file

@ -74,14 +74,25 @@ ok_msg "copy extra files success"
# detect for arm. # detect for arm.
if [ $ARM = YES ]; then if [ $ARM = YES ]; then
arm_cpu=`arm-linux-gnueabi-readelf --arch-specific ${build_objs}/srs|grep Tag_CPU_arch:|awk '{print $2}'` arm_cpu=`arm-linux-gnueabi-readelf --arch-specific ${build_objs}/srs|grep Tag_CPU_arch:|awk '{print $2}'`
os_machine='arm${arm_cpu}cpu'; os_machine=arm${arm_cpu}cpu
fi fi
ok_msg "machine: $os_machine"
# generate zip dir and zip filename # generate zip dir and zip filename
srs_version=`${build_objs}/srs -v 2>/dev/stdout 1>/dev/null` && if [ $ARM = YES ]; then
srs_version_major=`cat $work_dir/src/core/srs_core.hpp| grep '#define VERSION_MAJOR'| awk '{print $3}'|xargs echo` &&
srs_version_minor=`cat $work_dir/src/core/srs_core.hpp| grep '#define VERSION_MINOR'| awk '{print $3}'|xargs echo` &&
srs_version_revision=`cat $work_dir/src/core/srs_core.hpp| grep '#define VERSION_REVISION'| awk '{print $3}'|xargs echo` &&
srs_version=$srs_version_major.$srs_version_minor.$srs_version_revision
else
srs_version=`${build_objs}/srs -v 2>/dev/stdout 1>/dev/null`
fi
ret=$?; if [[ 0 -ne ${ret} ]]; then failed_msg "get srs version failed"; exit $ret; fi
ok_msg "get srs version $srs_version"
zip_dir="SRS-${os_name}${os_major_version}-${os_machine}-${srs_version}" zip_dir="SRS-${os_name}${os_major_version}-${os_machine}-${srs_version}"
ret=$?; if [[ 0 -ne ${ret} ]]; then failed_msg "generate zip filename failed"; exit $ret; fi ret=$?; if [[ 0 -ne ${ret} ]]; then failed_msg "generate zip filename failed"; exit $ret; fi
ok_msg "generate zip filename success" ok_msg "target zip filename $zip_dir"
# zip package. # zip package.
ok_msg "start zip package" ok_msg "start zip package"