Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-03-24 10:51:37 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7431c110feaccb04a84212a6b85d07c3a783f939
7431c110
1 parent
0e54967f
package support arm package
显示空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
27 行增加
和
4 行删除
trunk/auto/depends.sh
trunk/scripts/package.sh
trunk/auto/depends.sh
查看文件 @
7431c11
...
...
@@ -109,7 +109,7 @@ function Ubuntu_prepare()
echo
"Ubuntu install tools success"
return
0
}
Ubuntu_prepare;
ret
=
$?
;
if
[[
0 -ne
$ret
]]
;
then
echo
"Ubuntu p
erfap
re failed, ret=
$ret
"
;
exit
$ret
;
fi
Ubuntu_prepare;
ret
=
$?
;
if
[[
0 -ne
$ret
]]
;
then
echo
"Ubuntu p
repa
re failed, ret=
$ret
"
;
exit
$ret
;
fi
#####################################################################################
# for Centos, auto install tools by yum
#####################################################################################
...
...
@@ -193,7 +193,7 @@ function Centos_prepare()
echo
"Centos install tools success"
return
0
}
Centos_prepare;
ret
=
$?
;
if
[[
0 -ne
$ret
]]
;
then
"CentOS perfap
re failed, ret=
$ret
"
;
exit
$ret
;
fi
Centos_prepare;
ret
=
$?
;
if
[[
0 -ne
$ret
]]
;
then
echo
"CentOS prepa
re failed, ret=
$ret
"
;
exit
$ret
;
fi
#####################################################################################
# st-1.9
...
...
trunk/scripts/package.sh
查看文件 @
7431c11
#!/bin/bash
# Usage:
# bash package.sh [arm]
# option arm, whether build for arm, requires ubuntu12.
# user can config the following configs, then package.
INSTALL
=
/usr/local/srs
# whether build for arm, only for ubuntu12.
ARM
=
NO
##################################################################################
##################################################################################
##################################################################################
# parse options.
if
[[
$1
==
"arm"
]]
;
then
ARM
=
YES;
fi
# discover the current work dir, the log and access.
echo
"argv[0]=
$0
"
if
[[
! -f
$0
]]
;
then
...
...
@@ -34,11 +43,19 @@ ok_msg "target os is ${os_name}-${os_major_version} ${os_release} ${os_machine}"
# build srs
# @see https://github.com/winlinvip/simple-rtmp-server/wiki/Build
ok_msg
"start build srs"
(
if
[
$ARM
=
YES
]
;
then
(
cd
$work_dir
&&
./configure --with-ssl --with-arm-ubuntu12 --prefix
=
$INSTALL
&&
make
&&
rm -rf
$package_dir
&&
make
DESTDIR
=
$package_dir
install
)
>>
$log
2>&1
else
(
cd
$work_dir
&&
./configure --with-ssl --with-hls --with-nginx --with-ffmpeg --with-http-callback --prefix
=
$INSTALL
&&
make
&&
rm -rf
$package_dir
&&
make
DESTDIR
=
$package_dir
install
)
>>
$log
2>&1
)
>>
$log
2>&1
fi
ret
=
$?
;
if
[[
0 -ne
${
ret
}
]]
;
then
failed_msg
"build srs failed"
;
exit
$ret
;
fi
ok_msg
"build srs success"
...
...
@@ -54,6 +71,12 @@ ok_msg "start copy extra files to package"
ret
=
$?
;
if
[[
0 -ne
${
ret
}
]]
;
then
failed_msg
"copy extra files failed"
;
exit
$ret
;
fi
ok_msg
"copy extra files success"
# detect for arm.
if
[
$ARM
=
YES
]
;
then
arm_cpu
=
`
arm-linux-gnueabi-readelf --arch-specific
${
build_objs
}
/srs|grep Tag_CPU_arch:|awk
'{print $2}'
`
os_machine
=
'arm${arm_cpu}cpu'
;
fi
# generate zip dir and zip filename
srs_version
=
`
${
build_objs
}
/srs -v 2>/dev/stdout 1>/dev/null
`
&&
zip_dir
=
"SRS-
${
os_name
}${
os_major_version
}
-
${
os_machine
}
-
${
srs_version
}
"
...
...
请
注册
或
登录
后发表评论