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-30 12:31:50 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
be8aa92ab0fb6e29fa0ef0d2618d2c79a6e7deab
be8aa92a
1 parent
3a616208
refine package for raspberry.
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
57 行增加
和
3 行删除
trunk/auto/options.sh
trunk/scripts/package-arm.sh
trunk/scripts/package-raspberrypi.sh
trunk/scripts/package.sh
trunk/auto/options.sh
查看文件 @
be8aa92
...
...
@@ -35,6 +35,8 @@ SRS_STATIC=RESERVED
# private internal
# dev, open all features for dev, no gperf/prof/arm.
SRS_DEV
=
NO
# raspberry-pi, open hls/ssl/static
SRS_PI
=
NO
#####################################################################################
# parse options
...
...
@@ -92,6 +94,7 @@ do
--prefix
)
SRS_PREFIX
=
${
value
}
;;
--static
)
SRS_STATIC
=
YES
;;
--dev
)
SRS_DEV
=
YES
;;
--pi
)
SRS_PI
=
YES
;;
*
)
echo
"
$0
: error: invalid option
\"
$option
\"
"
...
...
@@ -121,6 +124,7 @@ if [ $SRS_ARM_UBUNTU12 = YES ]; then
if
[
$SRS_GPROF
=
RESERVED
]
;
then
SRS_GPROF
=
NO;
fi
if
[
$SRS_ARM_UBUNTU12
=
RESERVED
]
;
then
SRS_ARM_UBUNTU12
=
NO;
fi
if
[
$SRS_DEV
=
RESERVED
]
;
then
SRS_DEV
=
NO;
fi
if
[
$SRS_PI
=
RESERVED
]
;
then
SRS_PI
=
NO;
fi
# for arm, always set to static link.
SRS_STATIC
=
YES
else
...
...
@@ -141,6 +145,7 @@ else
if
[
$SRS_ARM_UBUNTU12
=
RESERVED
]
;
then
SRS_ARM_UBUNTU12
=
NO;
fi
if
[
$SRS_STATIC
=
RESERVED
]
;
then
SRS_STATIC
=
NO;
fi
if
[
$SRS_DEV
=
RESERVED
]
;
then
SRS_DEV
=
NO;
fi
if
[
$SRS_PI
=
RESERVED
]
;
then
SRS_PI
=
NO;
fi
fi
# if dev specified, open features if possible.
...
...
@@ -164,6 +169,27 @@ if [ $SRS_DEV = YES ]; then
SRS_STATIC
=
NO
fi
# if raspberry-pi specified, open ssl/hls/static features
if
[
$SRS_PI
=
YES
]
;
then
SRS_HLS
=
YES
SRS_NGINX
=
NO
SRS_SSL
=
YES
SRS_FFMPEG
=
NO
SRS_HTTP_CALLBACK
=
NO
SRS_LIBRTMP
=
NO
SRS_BWTC
=
NO
SRS_RESEARCH
=
NO
SRS_UTEST
=
NO
SRS_GPERF
=
NO
SRS_GPERF_MC
=
NO
SRS_GPERF_MP
=
NO
SRS_GPERF_CP
=
NO
SRS_GPROF
=
NO
SRS_ARM_UBUNTU12
=
NO
# for arm, always set to static link.
SRS_STATIC
=
YES
fi
# parse the jobs for make
if
[[
""
-eq SRS_JOBS
]]
;
then
export
SRS_JOBS
=
"--jobs"
...
...
@@ -219,6 +245,7 @@ if [ $help = yes ]; then
used for make in the configure, for example, to make ffmpeg.
--prefix=<path> the absolute install path for srs.
--dev for dev, open all features, no gperf/gprof/arm.
--pi for raspberry-pi, open features hls/ssl/static.
END
exit
0
...
...
@@ -288,6 +315,8 @@ fi
# regenerate the options for default values.
SRS_CONFIGURE
=
""
if
[
$SRS_DEV
=
YES
]
;
then
SRS_CONFIGURE
=
"
${
SRS_CONFIGURE
}
--dev"
;
fi
if
[
$SRS_PI
=
YES
]
;
then
SRS_CONFIGURE
=
"
${
SRS_CONFIGURE
}
--pi"
;
fi
if
[
$SRS_HLS
=
YES
]
;
then
SRS_CONFIGURE
=
"
${
SRS_CONFIGURE
}
--with-hls"
;
else
SRS_CONFIGURE
=
"
${
SRS_CONFIGURE
}
--without-hls"
;
fi
if
[
$SRS_NGINX
=
YES
]
;
then
SRS_CONFIGURE
=
"
${
SRS_CONFIGURE
}
--with-nginx"
;
else
SRS_CONFIGURE
=
"
${
SRS_CONFIGURE
}
--without-nginx"
;
fi
if
[
$SRS_SSL
=
YES
]
;
then
SRS_CONFIGURE
=
"
${
SRS_CONFIGURE
}
--with-ssl"
;
else
SRS_CONFIGURE
=
"
${
SRS_CONFIGURE
}
--without-ssl"
;
fi
...
...
trunk/scripts/package-arm.sh
查看文件 @
be8aa92
#!/bin/bash
echo
"在Ubuntu12下面交叉编译arm用的脚本"
echo
"argv[0]=
$0
"
if
[[
! -f
$0
]]
;
then
echo
"directly execute the scripts on shell."
;
...
...
@@ -9,4 +11,4 @@ else
work_dir
=
`
dirname
$0
`
;
work_dir
=
`
(
cd
${
work_dir
}
&&
pwd
)
`
fi
bash
${
work_dir
}
/package.sh arm
bash
${
work_dir
}
/package.sh
--
arm
...
...
trunk/scripts/package-raspberrypi.sh
0 → 100755
查看文件 @
be8aa92
#!/bin/bash
echo
"在RaspberryPi下直接打包,不编译直接打包(编译慢,手工编译)"
echo
"argv[0]=
$0
"
if
[[
! -f
$0
]]
;
then
echo
"directly execute the scripts on shell."
;
work_dir
=
`
pwd
`
else
echo
"execute scripts in file:
$0
"
;
work_dir
=
`
dirname
$0
`
;
work_dir
=
`
(
cd
${
work_dir
}
&&
pwd
)
`
fi
bash
${
work_dir
}
/package.sh --no-build
...
...
trunk/scripts/package.sh
查看文件 @
be8aa92
#!/bin/bash
echo
"通用打包脚本,--help查看参数"
# Usage:
# bash package.sh [
arm
]
# bash package.sh [
--help
]
# option arm, whether build for arm, requires ubuntu12.
# user can config the following configs, then package.
...
...
@@ -69,10 +71,17 @@ ret=$?; if [[ $ret -ne 0 ]]; then exit $ret; fi
os_name
=
`
lsb_release --id|awk
'{print $3}'
`
&&
os_release
=
`
lsb_release --release|awk
'{print $2}'
`
&&
os_major_version
=
`
echo
$os_release
|awk -F
'.'
'{print $1}'
`
&&
os_machine
=
`
uname -i
`
;
if
[[
"unknown"
==
$os_machine
]]
;
then
os_machine
=
`
uname -m
`
;
fi
os_machine
=
`
uname -i
`
ret
=
$?
;
if
[[
$ret
-ne 0
]]
;
then
failed_msg
"lsb_release get os info failed."
;
exit
$ret
;
fi
ok_msg
"target os is
${
os_name
}
-
${
os_major_version
}
${
os_release
}
${
os_machine
}
"
# for raspberry-pi
# use rasberry-pi instead all release
uname -a|grep
"raspberrypi"
;
if
[[
0 -eq
$?
]]
;
then
os_name
=
"RaspberryPi"
;
fi
if
[[
"Raspbian"
==
$os_name
]]
;
then
os_name
=
"RaspberryPi"
;
fi
# check the cpu machine
if
[[
"unknown"
==
$os_machine
]]
;
then
os_machine
=
`
uname -m
`
;
fi
# build srs
# @see https://github.com/winlinvip/simple-rtmp-server/wiki/Build
if
[
$DO_BUILD
=
YES
]
;
then
...
...
请
注册
或
登录
后发表评论