Compile icecast in the Unix-Like Environment

From TestingMediawiki
Revision as of 17:32, 15 June 2005 by AndCycle (talk | contribs)
Jump to navigation Jump to search

暫存:在 *nix 下編譯 icecast 麻瓜用教學 ( 作者 AndCycle )

cd ~
mkdir testCompile
cd testCompile
testCompilePath=`pwd`
mkdir install
cd install
installPath=`pwd`
cd ..

wget http://www.libsdl.org/release/SDL-1.0.8.tar.gz
wget http://www.vorbis.com/files/1.0.1/unix/libvorbis-1.0.1.tar.gz
wget http://www.vorbis.com/files/1.0.1/unix/libogg-1.1.tar.gz
wget http://downloads.xiph.org/releases/icecast/icecast-2.2.0.tar.gz
wget ftp://xmlsoft.org/libxml2-2.6.17.tar.gz
wget ftp://xmlsoft.org/libxslt-1.1.12.tar.gz
wget http://downloads.xiph.org/releases/theora/libtheora-1.0alpha4.tar.gz

tar -zxvf SDL-1.0.8.tar.gz
tar -zxvf libvorbis-1.0.1.tar.gz
tar -zxvf libogg-1.1.tar.gz
tar -zxvf icecast-2.2.0.tar.gz
tar -zxvf libxml2-2.6.17.tar.gz
tar -zxvf libxslt-1.1.12.tar.gz
tar -zxvf libtheora-1.0alpha4.tar.gz

makeInstall ()
{
	cd $1
	./configure $2
	make -j 4
	make install
	cd $testCompilePath
}

makeInstall "libxml2-2.6.17" "--prefix=$installPath"
makeInstall "libxslt-1.1.12" "--prefix=$installPath --with-libxml-prefix=$installPath"
cd libxslt-1.1.12
chmod +x xslt-config
cd $testCompilePath
makeInstall "SDL-1.0.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"
makeInstall "icecast-2.2.0" "--prefix=$installPath --with-xslt-config=$testCompilePath/libxslt-1.1.12/xslt-config --with-vorbis=$installPath --with-theora=$installPath"
cp $installPath/bin/icecast $testCompilePath