1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Remove FFMPEG and NGINX, please use srs-docker instead . 3.0.82

This commit is contained in:
winlin 2019-12-25 18:29:07 +08:00
parent bf807778e5
commit a11461905b
16 changed files with 12 additions and 205 deletions

View file

@ -64,12 +64,6 @@ echo "" >> $SRS_AUTO_HEADERS_H
# generate auto headers file, depends on the finished of options.sh
#####################################################################################
# auto headers in depends.
if [ $SRS_NGINX = YES ]; then
srs_define_macro "SRS_AUTO_NGINX" $SRS_AUTO_HEADERS_H
else
srs_undefine_macro "SRS_AUTO_NGINX" $SRS_AUTO_HEADERS_H
fi
if [ $SRS_HDS = YES ]; then
srs_define_macro "SRS_AUTO_HDS" $SRS_AUTO_HEADERS_H
else
@ -88,13 +82,6 @@ else
srs_undefine_macro "SRS_AUTO_UTEST" $SRS_AUTO_HEADERS_H
fi
# whether compile ffmpeg tool
if [ $SRS_FFMPEG_TOOL = YES ]; then
srs_define_macro "SRS_AUTO_FFMPEG_TOOL" $SRS_AUTO_HEADERS_H
else
srs_undefine_macro "SRS_AUTO_FFMPEG_TOOL" $SRS_AUTO_HEADERS_H
fi
# whatever the FFMPEG tools, if transcode and ingest specified,
# srs always compile the FFMPEG tool stub which used to start the FFMPEG process.
if [ $SRS_FFMPEG_STUB = YES ]; then

View file

@ -101,38 +101,6 @@ function Ubuntu_prepare()
echo "The valgrind-dev is installed."
fi
fi
if [ $SRS_NGINX = YES ]; then
if [[ ! -f /usr/include/pcre.h ]]; then
echo "Installing libpcre3-dev."
require_sudoer "sudo apt-get install -y --force-yes libpcre3-dev"
sudo apt-get install -y --force-yes libpcre3-dev; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
echo "The libpcre3-dev is installed."
fi
fi
if [ $SRS_FFMPEG_TOOL = YES ]; then
autoconf --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
echo "Installing autoconf."
require_sudoer "sudo apt-get install -y --force-yes autoconf"
sudo apt-get install -y --force-yes autoconf; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
echo "The autoconf is installed."
fi
libtool --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
echo "Installing libtool."
require_sudoer "sudo apt-get install -y --force-yes libtool"
sudo apt-get install -y --force-yes libtool; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
echo "The libtool is installed."
fi
if [[ ! -f /usr/include/zlib.h ]]; then
echo "Installing zlib1g-dev."
require_sudoer "sudo apt-get install -y --force-yes zlib1g-dev"
sudo apt-get install -y --force-yes zlib1g-dev; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
echo "The zlib1g-dev is installed."
fi
fi
echo "Tools for Ubuntu are installed."
return 0
@ -206,45 +174,6 @@ function Centos_prepare()
echo "The valgrind-devel is installed."
fi
fi
if [ $SRS_NGINX = YES ]; then
if [[ ! -f /usr/include/pcre.h ]]; then
echo "Installing pcre-devel."
require_sudoer "sudo yum install -y pcre-devel"
sudo yum install -y pcre-devel; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
echo "The pcre-devel is installed."
fi
fi
if [ $SRS_FFMPEG_TOOL = YES ]; then
automake --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
echo "Installing automake."
require_sudoer "sudo yum install -y automake"
sudo yum install -y automake; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
echo "The automake is installed."
fi
autoconf --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
echo "Installing autoconf."
require_sudoer "sudo yum install -y autoconf"
sudo yum install -y autoconf; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
echo "The autoconf is installed."
fi
libtool --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
echo "Installing libtool."
require_sudoer "sudo yum install -y libtool"
sudo yum install -y libtool; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
echo "The libtool is installed."
fi
if [[ ! -f /usr/include/zlib.h ]]; then
echo "Installing zlib-devel."
require_sudoer "sudo yum install -y zlib-devel"
sudo yum install -y zlib-devel; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
echo "The zlib-devel is installed."
fi
fi
echo "Tools for Centos are installed."
return 0
@ -328,45 +257,6 @@ function OSX_prepare()
echo "The valgrind is installed."
fi
fi
if [ $SRS_NGINX = YES ]; then
if [[ ! -f /usr/local/include/pcre.h ]]; then
echo "Installing pcre."
echo "brew install pcre"
brew install pcre; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
echo "The pcre is installed."
fi
fi
if [ $SRS_FFMPEG_TOOL = YES ]; then
automake --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
echo "Installing automake."
echo "brew install automake"
brew install automake; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
echo "The automake is installed."
fi
autoconf --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
echo "Installing autoconf."
echo "brew install autoconf"
brew install autoconf; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
echo "The autoconf is installed."
fi
which libtool >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
echo "Installing libtool."
echo "brew install libtool"
brew install libtool; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
echo "The libtool is installed."
fi
brew info zlib >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
echo "Installing zlib."
echo "brew install zlib"
brew install zlib; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
echo "The zlib is installed."
fi
fi
echo "Tools for OSX are installed."
return 0
@ -460,30 +350,6 @@ END
if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then
mkdir -p ${SRS_OBJS}/nginx
fi
# make nginx
__SRS_BUILD_NGINX=NO; if [ $SRS_NGINX = YES ]; then __SRS_BUILD_NGINX=YES; fi
if [ $__SRS_BUILD_NGINX = YES ]; then
if [[ -f ${SRS_OBJS}/nginx/sbin/nginx ]]; then
echo "The nginx-1.5.7 is ok.";
else
echo "Building nginx-1.5.7";
(
rm -rf ${SRS_OBJS}/nginx-1.5.7 && cd ${SRS_OBJS} &&
unzip -q ../3rdparty/nginx-1.5.7.zip && cd nginx-1.5.7 &&
./configure --prefix=`pwd`/_release && make ${SRS_JOBS} && make install &&
cd .. && rm -rf nginx && ln -sf nginx-1.5.7/_release nginx
)
fi
# check status
ret=$?; if [[ $ret -ne 0 ]]; then echo "Build nginx-1.5.7 failed, ret=$ret"; exit $ret; fi
if [ ! -f ${SRS_OBJS}/nginx/sbin/nginx ]; then echo "Build nginx-1.5.7 failed."; exit -1; fi
# use current user to config nginx,
# srs will write ts/m3u8 file use current user,
# nginx default use nobody, so cannot read the ts/m3u8 created by srs.
cp ${SRS_OBJS}/nginx/conf/nginx.conf ${SRS_OBJS}/nginx/conf/nginx.conf.bk
$SED "s/^.user nobody;/user `whoami`;/g" ${SRS_OBJS}/nginx/conf/nginx.conf
fi
# the demo dir.
if [ $SRS_EXPORT_LIBRTMP_PROJECT = NO ]; then

View file

@ -353,8 +353,6 @@ function apply_user_presets() {
# all disabled.
if [ $SRS_DISABLE_ALL = YES ]; then
SRS_HDS=NO
SRS_NGINX=NO
SRS_FFMPEG_TOOL=NO
SRS_LIBRTMP=NO
SRS_RESEARCH=NO
SRS_UTEST=NO
@ -364,8 +362,6 @@ function apply_user_presets() {
# all enabled.
if [ $SRS_ENABLE_ALL = YES ]; then
SRS_HDS=YES
SRS_NGINX=YES
SRS_FFMPEG_TOOL=YES
SRS_LIBRTMP=YES
SRS_RESEARCH=YES
SRS_UTEST=YES
@ -375,8 +371,6 @@ function apply_user_presets() {
# only rtmp vp6
if [ $SRS_FAST = YES ]; then
SRS_HDS=NO
SRS_NGINX=NO
SRS_FFMPEG_TOOL=NO
SRS_LIBRTMP=NO
SRS_RESEARCH=NO
SRS_UTEST=NO
@ -386,8 +380,6 @@ function apply_user_presets() {
# only ssl for RTMP with complex handshake.
if [ $SRS_PURE_RTMP = YES ]; then
SRS_HDS=NO
SRS_NGINX=NO
SRS_FFMPEG_TOOL=NO
SRS_LIBRTMP=NO
SRS_RESEARCH=NO
SRS_UTEST=NO
@ -397,8 +389,6 @@ function apply_user_presets() {
# defaults for x86/x64
if [ $SRS_X86_X64 = YES ]; then
SRS_HDS=YES
SRS_NGINX=NO
SRS_FFMPEG_TOOL=NO
SRS_LIBRTMP=YES
SRS_RESEARCH=NO
SRS_UTEST=YES
@ -408,8 +398,6 @@ function apply_user_presets() {
# for osx(darwin)
if [ $SRS_OSX = YES ]; then
SRS_HDS=YES
SRS_NGINX=NO
SRS_FFMPEG_TOOL=NO
SRS_LIBRTMP=YES
SRS_RESEARCH=NO
SRS_UTEST=YES
@ -422,8 +410,6 @@ function apply_user_presets() {
# if dev specified, open features if possible.
if [ $SRS_DEV = YES ]; then
SRS_HDS=YES
SRS_NGINX=NO
SRS_FFMPEG_TOOL=YES
SRS_LIBRTMP=YES
SRS_RESEARCH=YES
SRS_UTEST=YES
@ -433,8 +419,6 @@ function apply_user_presets() {
# if fast dev specified, open main server features.
if [ $SRS_FAST_DEV = YES ]; then
SRS_HDS=YES
SRS_NGINX=NO
SRS_FFMPEG_TOOL=NO
SRS_LIBRTMP=NO
SRS_RESEARCH=NO
SRS_UTEST=NO
@ -444,8 +428,6 @@ function apply_user_presets() {
# for srs demo
if [ $SRS_DEMO = YES ]; then
SRS_HDS=YES
SRS_NGINX=NO
SRS_FFMPEG_TOOL=YES
SRS_LIBRTMP=YES
SRS_RESEARCH=NO
SRS_UTEST=YES
@ -455,8 +437,6 @@ function apply_user_presets() {
# if raspberry-pi specified, open ssl/hls/static features
if [ $SRS_PI = YES ]; then
SRS_HDS=YES
SRS_NGINX=NO
SRS_FFMPEG_TOOL=NO
SRS_LIBRTMP=YES
SRS_RESEARCH=NO
SRS_UTEST=NO
@ -466,8 +446,6 @@ function apply_user_presets() {
# if cubieboard specified, open features except ffmpeg/nginx.
if [ $SRS_CUBIE = YES ]; then
SRS_HDS=YES
SRS_NGINX=NO
SRS_FFMPEG_TOOL=YES
SRS_LIBRTMP=YES
SRS_RESEARCH=NO
SRS_UTEST=NO
@ -519,9 +497,7 @@ function apply_user_detail_options() {
# disable almost all features for export srs-librtmp.
if [ $SRS_EXPORT_LIBRTMP_PROJECT != NO ]; then
SRS_HDS=NO
SRS_NGINX=NO
SRS_SSL=NO
SRS_FFMPEG_TOOL=NO
SRS_TRANSCODE=NO
SRS_HTTP_CALLBACK=NO
SRS_INGEST=NO
@ -549,9 +525,7 @@ SRS_AUTO_CONFIGURE="--prefix=${SRS_PREFIX}"
if [ $SRS_HLS = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-hls"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-hls"; fi
if [ $SRS_HDS = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-hds"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-hds"; fi
if [ $SRS_DVR = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-dvr"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-dvr"; fi
if [ $SRS_NGINX = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-nginx"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-nginx"; fi
if [ $SRS_SSL = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-ssl"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-ssl"; fi
if [ $SRS_FFMPEG_TOOL = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-ffmpeg"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-ffmpeg"; fi
if [ $SRS_TRANSCODE = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-transcode"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-transcode"; fi
if [ $SRS_INGEST = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-ingest"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-ingest"; fi
if [ $SRS_STAT = YES ]; then SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --with-stat"; else SRS_AUTO_CONFIGURE="${SRS_AUTO_CONFIGURE} --without-stat"; fi
@ -593,6 +567,16 @@ function check_option_conflicts() {
exit -1
fi
if [[ $SRS_NGINX == YES ]]; then
echo "Don't support building NGINX, please use docker https://github.com/ossrs/srs-docker"
exit -1
fi
if [[ $SRS_FFMPEG_TOOL == YES ]]; then
echo "Don't support building FFMPEG, please use docker https://github.com/ossrs/srs-docker"
exit -1
fi
# TODO: FIXME: check more os.
__check_ok=YES
@ -621,9 +605,7 @@ function check_option_conflicts() {
# check variable neccessary
if [ $SRS_HDS = RESERVED ]; then echo "you must specifies the hds, see: ./configure --help"; __check_ok=NO; fi
if [ $SRS_NGINX = RESERVED ]; then echo "you must specifies the nginx, see: ./configure --help"; __check_ok=NO; fi
if [ $SRS_SSL = RESERVED ]; then echo "you must specifies the ssl, see: ./configure --help"; __check_ok=NO; fi
if [ $SRS_FFMPEG_TOOL = RESERVED ]; then echo "you must specifies the ffmpeg, see: ./configure --help"; __check_ok=NO; fi
if [ $SRS_STREAM_CASTER = RESERVED ]; then echo "you must specifies the stream-caster, see: ./configure --help"; __check_ok=NO; fi
if [ $SRS_LIBRTMP = RESERVED ]; then echo "you must specifies the librtmp, see: ./configure --help"; __check_ok=NO; fi
if [ $SRS_RESEARCH = RESERVED ]; then echo "you must specifies the research, see: ./configure --help"; __check_ok=NO; fi