Compile icecast in the Unix-Like Environment: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 14: | Line 14: | ||
gragAndUntar () | gragAndUntar () | ||
{ | { | ||
echo "grab $1" | |||
if wget $1 | if wget $1 | ||
then echo " | then echo "Done" | ||
else exit 1 | else exit 1 | ||
fi | fi | ||
echo "untar $1" | |||
if tar --extract --ungzip --file $2 | if tar --extract --ungzip --file $2 | ||
then echo " | then echo "Done" | ||
else exit 1 | else exit 1 | ||
fi | fi | ||
| Line 27: | Line 29: | ||
gragAndUntar "ftp://xmlsoft.org/libxml2-2.6.17.tar.gz" "libxml2-2.6.17.tar.gz" | gragAndUntar "ftp://xmlsoft.org/libxml2-2.6.17.tar.gz" "libxml2-2.6.17.tar.gz" | ||
gragAndUntar "ftp://xmlsoft.org/libxslt-1.1.12.tar.gz" "libxslt-1.1.12.tar.gz" | gragAndUntar "ftp://xmlsoft.org/libxslt-1.1.12.tar.gz" "libxslt-1.1.12.tar.gz" | ||
gragAndUntar "http://www.libsdl.org/release/SDL-1. | gragAndUntar "http://www.libsdl.org/release/SDL-1.2.8.tar.gz" "SDL-1.2.8.tar.gz" | ||
gragAndUntar "http://www.vorbis.com/files/1.0.1/unix/libogg-1.1.tar.gz" "libogg-1.1.tar.gz" | gragAndUntar "http://www.vorbis.com/files/1.0.1/unix/libogg-1.1.tar.gz" "libogg-1.1.tar.gz" | ||
gragAndUntar "http://www.vorbis.com/files/1.0.1/unix/libvorbis-1.0.1.tar.gz" "libvorbis-1.0.1.tar.gz" | gragAndUntar "http://www.vorbis.com/files/1.0.1/unix/libvorbis-1.0.1.tar.gz" "libvorbis-1.0.1.tar.gz" | ||
| Line 35: | Line 37: | ||
makeInstall () | makeInstall () | ||
{ | { | ||
echo "working in $1" | |||
if cd $1 | if cd $1 | ||
then echo " | then echo "Done" | ||
else exit 1 | else exit 1 | ||
fi | fi | ||
echo "configure $1" | |||
if ./configure $2 | if ./configure $2 | ||
then echo " | then echo "Done" | ||
else exit 1 | else exit 1 | ||
fi | fi | ||
echo "make $1" | |||
if [ -z "$3" ] | if [ -z "$3" ] | ||
then | then | ||
if make | if make $3 | ||
then echo " | then echo "Done" | ||
else exit 1 | else exit 1 | ||
fi | fi | ||
else | else | ||
if make | if make | ||
then echo " | then echo "Done" | ||
else exit 1 | else exit 1 | ||
fi | fi | ||
fi | fi | ||
echo "make installe $1" | |||
if make install | if make install | ||
then echo " | then echo "Done" | ||
else exit 1 | else exit 1 | ||
fi | fi | ||
| Line 65: | Line 71: | ||
makeInstall "libxml2-2.6.17" "--prefix=$installPath" | makeInstall "libxml2-2.6.17" "--prefix=$installPath" | ||
makeInstall "libxslt-1.1.12" "--prefix=$installPath --with-libxml-prefix=$installPath" | makeInstall "libxslt-1.1.12" "--prefix=$installPath --with-libxml-prefix=$installPath" | ||
makeInstall "SDL-1. | makeInstall "SDL-1.2.8" "--prefix=$installPath" | ||
makeInstall "libogg-1.1" "--prefix=$installPath" | makeInstall "libogg-1.1" "--prefix=$installPath" | ||
makeInstall "libvorbis-1.0.1" "--prefix=$installPath --with-ogg=$installPath --disable-oggtest" | makeInstall "libvorbis-1.0.1" "--prefix=$installPath --with-ogg=$installPath --disable-oggtest" | ||
Revision as of 19:29, 15 June 2005
暫存:在 *nix 下編譯 icecast 麻瓜用教學 ( 作者 AndCycle )
#!/bin/bash
mkdir testCompile
cd testCompile
testCompilePath=`pwd`
mkdir install
cd install
installPath=`pwd`
cd ..
gragAndUntar ()
{
echo "grab $1"
if wget $1
then echo "Done"
else exit 1
fi
echo "untar $1"
if tar --extract --ungzip --file $2
then echo "Done"
else exit 1
fi
}
gragAndUntar "http://curl.haxx.se/download/curl-7.14.0.tar.gz" "curl-7.14.0.tar.gz"
gragAndUntar "ftp://xmlsoft.org/libxml2-2.6.17.tar.gz" "libxml2-2.6.17.tar.gz"
gragAndUntar "ftp://xmlsoft.org/libxslt-1.1.12.tar.gz" "libxslt-1.1.12.tar.gz"
gragAndUntar "http://www.libsdl.org/release/SDL-1.2.8.tar.gz" "SDL-1.2.8.tar.gz"
gragAndUntar "http://www.vorbis.com/files/1.0.1/unix/libogg-1.1.tar.gz" "libogg-1.1.tar.gz"
gragAndUntar "http://www.vorbis.com/files/1.0.1/unix/libvorbis-1.0.1.tar.gz" "libvorbis-1.0.1.tar.gz"
gragAndUntar "http://downloads.xiph.org/releases/theora/libtheora-1.0alpha4.tar.gz" "libtheora-1.0alpha4.tar.gz"
gragAndUntar "http://downloads.xiph.org/releases/icecast/icecast-2.2.0.tar.gz" "icecast-2.2.0.tar.gz"
makeInstall ()
{
echo "working in $1"
if cd $1
then echo "Done"
else exit 1
fi
echo "configure $1"
if ./configure $2
then echo "Done"
else exit 1
fi
echo "make $1"
if [ -z "$3" ]
then
if make $3
then echo "Done"
else exit 1
fi
else
if make
then echo "Done"
else exit 1
fi
fi
echo "make installe $1"
if make install
then echo "Done"
else exit 1
fi
cd $testCompilePath
}
makeInstall "curl-7.14.0" "--prefix=$installPath"
makeInstall "libxml2-2.6.17" "--prefix=$installPath"
makeInstall "libxslt-1.1.12" "--prefix=$installPath --with-libxml-prefix=$installPath"
makeInstall "SDL-1.2.8" "--prefix=$installPath"
makeInstall "libogg-1.1" "--prefix=$installPath"
makeInstall "libvorbis-1.0.1" "--prefix=$installPath --with-ogg=$installPath --disable-oggtest"
makeInstall "libtheora-1.0alpha4" "--prefix=$installPath --with-ogg=$installPath --with-vorbis=$installPath --with-sdl-prefix=$installPath --disable-oggtest --disable-vorbistest --disable-sdltest"
#icecast need blablabla-config executable
cd libxslt-1.1.12
chmod +x xslt-config
cd $testCompilePath
cd curl-7.14.0
chmod +x curl-config
cd $testCompilePath
makeInstall "icecast-2.2.0" "--prefix=$installPath --with-xslt-config=$testCompilePath/libxslt-1.1.12/xslt-config --with-curl-config=$testCompilePath/curl-7.14.0/curl-config --with-vorbis=$installPath --with-theora=$installPath" "static"
cp $installPath/bin/icecast ../
cd ..
rm -R -f $testCompilePath