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-29 13:39:57 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
917f1ea9e194969da94f3ba595d59780c73359c4
917f1ea9
1 parent
41f52173
fix bug of typo of readme. update package to support --help and options
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
60 行增加
和
17 行删除
README.md
trunk/scripts/package.sh
README.md
查看文件 @
917f1ea
...
...
@@ -81,7 +81,7 @@ cd simple-rtmp-server/trunk
## System Requirements
Supported operating systems and hardware:
*
All Linux , both 32 and 64 bits
*
All ha
n
dware.
*
All ha
r
dware.
## Summary
01.
Simple: also stable enough.
<br/>
...
...
trunk/scripts/package.sh
查看文件 @
917f1ea
...
...
@@ -7,13 +7,46 @@
# user can config the following configs, then package.
INSTALL
=
/usr/local/srs
# whether build for arm, only for ubuntu12.
help
=
NO
ARM
=
NO
DO_BUILD
=
YES
##################################################################################
##################################################################################
##################################################################################
# parse options.
if
[[
$1
==
"arm"
]]
;
then
ARM
=
YES;
fi
for
option
do
case
"
$option
"
in
-
*
=
*
)
value
=
`
echo
"
$option
"
| sed -e
's|[-_a-zA-Z0-9/]*=||'
`
option
=
`
echo
"
$option
"
| sed -e
's|=[-_a-zA-Z0-9/]*||'
`
;;
*
)
value
=
""
;;
esac
case
"
$option
"
in
--help
)
help
=
yes
;;
--arm
)
ARM
=
YES
;;
--no-build
)
DO_BUILD
=
NO
;;
*
)
echo
"
$0
: error: invalid option
\"
$option
\"
"
exit
1
;;
esac
done
if
[
$help
=
yes
]
;
then
cat
<< END
--help print this message
--arm configure with arm and make srs. use arm tools to get info.
--no-build donot build srs, user has builded. only make install.
END
exit
0
fi
# discover the current work dir, the log and access.
echo
"argv[0]=
$0
"
...
...
@@ -36,28 +69,38 @@ 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
`
os_machine
=
`
uname -i
`
;
if
[[
"unknown"
==
$os_machine
]]
;
then
os_machine
=
`
uname -m
`
;
fi
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
}
"
# 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
if
[
$DO_BUILD
=
YES
]
;
then
ok_msg
"start build srs"
if
[
$ARM
=
YES
]
;
then
(
cd
$work_dir
&&
./configure --with-ssl --with-arm-ubuntu12 --prefix
=
$INSTALL
&&
make
)
>>
$log
2>&1
else
(
cd
$work_dir
&&
./configure --with-ssl --with-hls --with-nginx --with-ffmpeg --with-http-callback --prefix
=
$INSTALL
&&
make
)
>>
$log
2>&1
fi
ret
=
$?
;
if
[[
0 -ne
${
ret
}
]]
;
then
failed_msg
"build srs failed"
;
exit
$ret
;
fi
ok_msg
"build srs success"
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
ok_msg
"user skip build, directly install"
fi
ret
=
$?
;
if
[[
0 -ne
${
ret
}
]]
;
then
failed_msg
"build srs failed"
;
exit
$ret
;
fi
ok_msg
"build srs success"
# install srs
ok_msg
"start install srs"
(
cd
$work_dir
&&
rm -rf
$package_dir
&&
make
DESTDIR
=
$package_dir
install
)
>>
$log
2>&1
ret
=
$?
;
if
[[
0 -ne
${
ret
}
]]
;
then
failed_msg
"install srs failed"
;
exit
$ret
;
fi
ok_msg
"install srs success"
# copy extra files to package.
ok_msg
"start copy extra files to package"
...
...
请
注册
或
登录
后发表评论